Пример #1
0
 /**
  * @param traceName
  * @param attrName
  * @param tag
  * @param value
  */
 public void newTraceAttr(String traceName, String attrName, String tag, Object value) {
   tracer
       .getHandler()
       .newAttr(
           symbolRegistry.symbolId(traceName),
           symbolRegistry.symbolId(attrName),
           new TaggedValue(symbolRegistry.symbolId(tag), value));
 }
Пример #2
0
 public SpyProcessor traceFlags(String srcField, String traceName, int flags) {
   return new TraceFlagsProcessor(tracer, srcField, symbolRegistry.symbolId(traceName), flags);
 }
Пример #3
0
 /**
  * Adds trace attribute to trace record immediately. This is useful for programmatic attribute
  * setting.
  *
  * @param attrName attribute name
  * @param value attribute value
  */
 public void newAttr(String attrName, Object value) {
   tracer.getHandler().newAttr(-1, symbolRegistry.symbolId(attrName), value);
 }
Пример #4
0
 public boolean isInTrace(String traceName) {
   return tracer.getHandler().isInTrace(symbolRegistry.symbolId(traceName));
 }
Пример #5
0
 public SpyProcessor inTrace(String traceName) {
   return new TraceCheckerProcessor(tracer, symbolRegistry.symbolId(traceName));
 }
Пример #6
0
 public void traceBegin(String name, long minimumTraceTime, int flags) {
   TraceBuilder traceBuilder = tracer.getHandler();
   traceBuilder.traceBegin(symbolRegistry.symbolId(name), System.currentTimeMillis(), flags);
   traceBuilder.setMinimumTraceTime(minimumTraceTime);
 }
Пример #7
0
 /**
  * Starts new trace.
  *
  * @param name trace name
  * @param minimumTraceTime minimum trace time
  * @param flags initial flags
  * @return spy processor object marking new trace
  */
 public SpyProcessor begin(String name, long minimumTraceTime, int flags) {
   return new TraceBeginProcessor(
       tracer, symbolRegistry.symbolId(name), minimumTraceTime * 1000000L, flags);
 }