/** * Wrapper method to add key-value pair to TraceInfo of actual span */ public static void addKVAnnotation(String key, String value){ Span span = Tracer.getCurrentSpan(); if (span != null) { span.addKVAnnotation(key, value); } }
/** * Wrapper method to add timeline annotiation to current span with given message */ public static void addTimelineAnnotation(String msg) { Span span = Tracer.getCurrentSpan(); if (span != null) { span.addTimelineAnnotation(msg); } }
/** * Default base class constructor. */ public EventHandler(Server server, EventType eventType) { this.parent = Tracer.getCurrentSpan(); this.server = server; this.eventType = eventType; seqid = seqids.incrementAndGet(); if (server != null) { this.waitingTimeForEvents = server.getConfiguration(). getInt("hbase.master.event.waiting.time", 1000); } }
protected Call(int id, final Descriptors.MethodDescriptor md, Message param, final CellScanner cells, final Message responseDefaultType, int timeout, int priority, RpcCallback<Call> callback, MetricsConnection.CallStats callStats) { this.param = param; this.md = md; this.cells = cells; this.callStats = callStats; this.callStats.setStartTime(EnvironmentEdgeManager.currentTime()); this.responseDefaultType = responseDefaultType; this.id = id; this.timeout = timeout; this.priority = priority; this.callback = callback; this.span = Tracer.getCurrentSpan(); }
LOG.debug("Connecting to "+server); Span span = Tracer.getCurrentSpan(); if (span != null) { span.addTimelineAnnotation("IPC client connecting to " + server); span = Tracer.getCurrentSpan(); if (span != null) { span.addTimelineAnnotation("IPC client connected to " + server);
TraceUtil.addSampler(loopSampler); for (int i = 0; i < numIterations; ++i) { assert Tracer.getCurrentSpan() == threadScope.getSpan() : "Span leak detected."; try (TraceScope loopScope = TraceUtil.createTrace("runLoopIter" + i)) { long now = System.nanoTime();
Span span = Tracer.getCurrentSpan(); if (span != null) { result.setTraceInfo(RPCTraceInfoProto.newBuilder()
protected Call(int id, final Descriptors.MethodDescriptor md, Message param, final CellScanner cells, final Message responseDefaultType, int timeout, int priority, RpcCallback<Call> callback, MetricsConnection.CallStats callStats) { this.param = param; this.md = md; this.cells = cells; this.callStats = callStats; this.callStats.setStartTime(EnvironmentEdgeManager.currentTime()); this.responseDefaultType = responseDefaultType; this.id = id; this.timeout = timeout; this.priority = priority; this.callback = callback; this.span = Tracer.getCurrentSpan(); }
Span span = Tracer.getCurrentSpan(); if (span != null) { span.addKVAnnotation("maxWriteToDiskMs",
/** * Wrapper method to add key-value pair to TraceInfo of actual span */ public static void addKVAnnotation(String key, String value){ Span span = Tracer.getCurrentSpan(); if (span != null) { span.addKVAnnotation(key, value); } }
/** * Wrapper method to add timeline annotiation to current span with given message */ public static void addTimelineAnnotation(String msg) { Span span = Tracer.getCurrentSpan(); if (span != null) { span.addTimelineAnnotation(msg); } }
/** * Wrapper method to add timeline annotiation to current span with given message */ public static void addTimelineAnnotation(String msg) { Span span = Tracer.getCurrentSpan(); if (span != null) { span.addTimelineAnnotation(msg); } }
/** * Wrapper method to add key-value pair to TraceInfo of actual span */ public static void addKVAnnotation(String key, String value){ Span span = Tracer.getCurrentSpan(); if (span != null) { span.addKVAnnotation(key, value); } }
protected Call(int id, final Descriptors.MethodDescriptor md, Message param, final CellScanner cells, final Message responseDefaultType, int timeout, int priority, RpcCallback<Call> callback, MetricsConnection.CallStats callStats) { this.param = param; this.md = md; this.cells = cells; this.callStats = callStats; this.callStats.setStartTime(EnvironmentEdgeManager.currentTime()); this.responseDefaultType = responseDefaultType; this.id = id; this.timeout = timeout; this.priority = priority; this.callback = callback; this.span = Tracer.getCurrentSpan(); }
@Override public SpanId call() throws Exception { return Tracer.getCurrentSpan().getParents()[0]; } }, "child");
@Override public void run() { description.set(Tracer.getCurrentSpan().getDescription()); } }).get(WAIT_TIME_SECONDS, TimeUnit.SECONDS);
@Override public String call() throws Exception { return Tracer.getCurrentSpan().getDescription(); } }).get(WAIT_TIME_SECONDS, TimeUnit.SECONDS);
@Override public String call() throws InterruptedException { startLatch.countDown(); // Prevent any task from exiting until every task has started assertTrue(continueLatch.await(WAIT_TIME_SECONDS, TimeUnit.SECONDS)); // Annotate on the presumed child trace Tracer.getCurrentSpan().addTimelineAnnotation( Thread.currentThread().getName()); return Tracer.getCurrentSpan().getDescription(); } };
public void pretendRpcSend() { Span span = tracer.getCurrentSpan(); pretendRpcReceiveWithTraceInfo(span.getSpanId()); }
Span span = Tracer.getCurrentSpan(); if (span != null) { result.setTraceInfo(RPCTraceInfoProto.newBuilder()