public class OpenTracingTracer extends Object implements VertxTracer<io.opentracing.Scope,io.opentracing.Scope>
| 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.Scope |
receiveRequest(Context context,
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.Scope scope,
Throwable failure,
TagExtractor<R> tagExtractor)
Signal a response has been received.
|
<R> io.opentracing.Scope |
sendRequest(Context context,
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.Scope scope,
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.Scope receiveRequest(Context context, R request, String operation, Iterable<Map.Entry<String,String>> headers, TagExtractor<R> tagExtractor)
VertxTracerreceiveRequest in interface VertxTracer<io.opentracing.Scope,io.opentracing.Scope>context - the context data attached to the requestrequest - 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.Scope scope, Throwable failure, TagExtractor<R> tagExtractor)
VertxTracersendResponse in interface VertxTracer<io.opentracing.Scope,io.opentracing.Scope>context - the context data attached to the requestresponse - the response sentscope - the payload returned by VertxTracer.receiveRequest(io.vertx.core.Context, 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.Scope sendRequest(Context context, R request, String operation, java.util.function.BiConsumer<String,String> headers, TagExtractor<R> tagExtractor)
VertxTracersendRequest in interface VertxTracer<io.opentracing.Scope,io.opentracing.Scope>context - the context data attached to the requestrequest - 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.Scope scope, Throwable failure, TagExtractor<R> tagExtractor)
VertxTracerreceiveResponse in interface VertxTracer<io.opentracing.Scope,io.opentracing.Scope>context - the context data attached to the requestresponse - the response sentscope - the payload returned by VertxTracer.sendRequest(io.vertx.core.Context, 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.Scope,io.opentracing.Scope>Copyright © 2019 Eclipse. All rights reserved.