Interface VertxTracer<I,O>
- All Known Implementing Classes:
OpenTracingTracer, ZipkinTracer
public interface VertxTracer<I,O>
The tracer SPI used by Vert.x components to report activities.
- Author:
- Julien Viet
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Close the tracer.default <R> IreceiveRequest(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.default <R> voidreceiveResponse(Context context, R response, O payload, Throwable failure, TagExtractor<R> tagExtractor) Signal a response has been received.default <R> OsendRequest(Context context, SpanKind kind, TracingPolicy policy, R request, String operation, BiConsumer<String, String> headers, TagExtractor<R> tagExtractor) Signal a request is sent.default <R> voidsendResponse(Context context, R response, I payload, Throwable failure, TagExtractor<R> tagExtractor) Signal the response is sent.
-
Field Details
-
NOOP
Noop tracer.
-
-
Method Details
-
receiveRequest
default <R> I 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.- Parameters:
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 extractor- Returns:
- the request trace
-
sendResponse
default <R> void sendResponse(Context context, R response, I payload, Throwable failure, TagExtractor<R> tagExtractor) Signal the response is sent.- Parameters:
context- the context data attached to the requestresponse- the response sentpayload- the payload returned byreceiveRequest(Context, SpanKind, TracingPolicy, R, String, Iterable, TagExtractor)failure- the failure when notnulltagExtractor- the response tag extractor
-
sendRequest
default <R> O sendRequest(Context context, SpanKind kind, TracingPolicy policy, R request, String operation, BiConsumer<String, String> headers, TagExtractor<R> tagExtractor) Signal a request is sent.When the method returns
null, no propagation happens and the client shall not callreceiveResponse(Context, R, O, Throwable, TagExtractor).- Parameters:
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 extractor- Returns:
- the request trace
-
receiveResponse
default <R> void receiveResponse(Context context, R response, O payload, Throwable failure, TagExtractor<R> tagExtractor) Signal a response has been received.- Parameters:
context- the context data attached to the requestresponse- the response sentpayload- the payload returned bysendRequest(Context, SpanKind, TracingPolicy, R, String, BiConsumer, TagExtractor)failure- the failure when notnulltagExtractor- the response tag extractor
-
close
default void close()Close the tracer.
-