public class OpenTracingTracer extends Object implements VertxTracer<io.opentracing.Span,io.opentracing.Span>
NOOP| Constructor and Description |
|---|
OpenTracingTracer(boolean closeTracer,
io.opentracing.Tracer tracer)
Instantiate a OpenTracing tracer using the specified
tracer. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the tracer.
|
<R> io.opentracing.Span |
receiveRequest(Context context,
SpanKind kind,
TracingPolicy policy,
R request,
String operation,
Iterable<Map.Entry<String,String>> headers,
TagExtractor<R> tagExtractor)
Signal a request has been received and will be processed.
|
<R> void |
receiveResponse(Context context,
R response,
io.opentracing.Span span,
Throwable failure,
TagExtractor<R> tagExtractor)
Signal a response has been received.
|
<R> io.opentracing.Span |
sendRequest(Context context,
SpanKind kind,
TracingPolicy policy,
R request,
String operation,
java.util.function.BiConsumer<String,String> headers,
TagExtractor<R> tagExtractor)
Signal a request is sent.
|
<R> void |
sendResponse(Context context,
R response,
io.opentracing.Span span,
Throwable failure,
TagExtractor<R> tagExtractor)
Signal the response is sent.
|
public OpenTracingTracer(boolean closeTracer,
io.opentracing.Tracer tracer)
tracer.closeTracer - close the tracer when necessarytracer - the tracer instancepublic <R> io.opentracing.Span receiveRequest(Context context, SpanKind kind, TracingPolicy policy, R request, String operation, Iterable<Map.Entry<String,String>> headers, TagExtractor<R> tagExtractor)
VertxTracerreceiveRequest in interface VertxTracer<io.opentracing.Span,io.opentracing.Span>context - the context data attached to the requestkind - the span kindpolicy - the policy to applyrequest - the request objectoperation - the request operationheaders - a read-only view of the request headerstagExtractor - the request tag extractorpublic <R> void sendResponse(Context context, R response, io.opentracing.Span span, Throwable failure, TagExtractor<R> tagExtractor)
VertxTracersendResponse in interface VertxTracer<io.opentracing.Span,io.opentracing.Span>context - the context data attached to the requestresponse - the response sentspan - the payload returned by VertxTracer.receiveRequest(io.vertx.core.Context, io.vertx.core.spi.tracing.SpanKind, io.vertx.core.tracing.TracingPolicy, R, java.lang.String, java.lang.Iterable<java.util.Map.Entry<java.lang.String, java.lang.String>>, io.vertx.core.spi.tracing.TagExtractor<R>)failure - the failure when not nulltagExtractor - the response tag extractorpublic <R> io.opentracing.Span sendRequest(Context context, SpanKind kind, TracingPolicy policy, R request, String operation, java.util.function.BiConsumer<String,String> headers, TagExtractor<R> tagExtractor)
VertxTracer When the method returns null, no propagation happens and the client
shall not call VertxTracer.receiveResponse(io.vertx.core.Context, R, O, java.lang.Throwable, io.vertx.core.spi.tracing.TagExtractor<R>).
sendRequest in interface VertxTracer<io.opentracing.Span,io.opentracing.Span>context - the context data attached to the requestkind - the span kindpolicy - the policy to applyrequest - the request objectoperation - the request operationheaders - a write only-view of the request headerstagExtractor - the request tag extractorpublic <R> void receiveResponse(Context context, R response, io.opentracing.Span span, Throwable failure, TagExtractor<R> tagExtractor)
VertxTracerreceiveResponse in interface VertxTracer<io.opentracing.Span,io.opentracing.Span>context - the context data attached to the requestresponse - the response sentspan - the payload returned by VertxTracer.sendRequest(io.vertx.core.Context, io.vertx.core.spi.tracing.SpanKind, io.vertx.core.tracing.TracingPolicy, R, java.lang.String, java.util.function.BiConsumer<java.lang.String, java.lang.String>, io.vertx.core.spi.tracing.TagExtractor<R>)failure - the failure when not nulltagExtractor - the response tag extractorpublic void close()
VertxTracerclose in interface VertxTracer<io.opentracing.Span,io.opentracing.Span>Copyright © 2021 Eclipse. All rights reserved.