public interface VertxTracer<I,O>
Modifier and Type | Field and Description |
---|---|
static VertxTracer |
NOOP
Noop tracer.
|
Modifier and Type | Method and Description |
---|---|
default void |
close()
Close the tracer.
|
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.
|
default <R> void |
receiveResponse(Context context,
R response,
O payload,
Throwable failure,
TagExtractor<R> tagExtractor)
Signal a response has been received.
|
default <R> O |
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.
|
default <R> void |
sendResponse(Context context,
R response,
I payload,
Throwable failure,
TagExtractor<R> tagExtractor)
Signal the response is sent.
|
static final VertxTracer NOOP
default <R> I receiveRequest(Context context, SpanKind kind, TracingPolicy policy, R request, String operation, Iterable<Map.Entry<String,String>> headers, TagExtractor<R> tagExtractor)
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 extractordefault <R> void sendResponse(Context context, R response, I payload, Throwable failure, TagExtractor<R> tagExtractor)
context
- the context data attached to the requestresponse
- the response sentpayload
- the payload returned by 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 null
tagExtractor
- the response tag extractordefault <R> O sendRequest(Context context, SpanKind kind, TracingPolicy policy, R request, String operation, java.util.function.BiConsumer<String,String> headers, TagExtractor<R> tagExtractor)
When the method returns null
, no propagation happens and the client
shall not call receiveResponse(io.vertx.core.Context, R, O, java.lang.Throwable, io.vertx.core.spi.tracing.TagExtractor<R>)
.
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 extractordefault <R> void receiveResponse(Context context, R response, O payload, Throwable failure, TagExtractor<R> tagExtractor)
context
- the context data attached to the requestresponse
- the response sentpayload
- the payload returned by 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 null
tagExtractor
- the response tag extractordefault void close()
Copyright © 2024 Eclipse. All rights reserved.