Top Description Fields Methods
io.vertx.core.spi.tracing

public Interface VertxTracer<I, O>

Imports
io.vertx.core.Context, io.vertx.core.tracing.TracingPolicy, java.util.Map, java.util.function.BiConsumer

The tracer SPI used by Vert.x components to report activities.
Author
Julien Viet

Field Summary

Modifier and TypeField and Description
public static final VertxTracer<I, O>
NOOP

Noop tracer.

Method Summary

Modifier and TypeMethod and Description
public default void
close()

Close the tracer.

public default <R> I

Returns:

the request trace
receiveRequest
(Context
the context data attached to the request
context
,
SpanKind
the span kind
kind
,
TracingPolicy
the policy to apply
policy
,
R
the request object
request
,
String
the request operation
operation
,
Iterable<Map.Entry<String, String>>
a read-only view of the request headers
headers
,
TagExtractor<R>
the request tag extractor
tagExtractor
)

Signal a request has been received and will be processed.

public default <R> void
receiveResponse(Context
the context data attached to the request
context
,
R
the response sent
response
,
O
the payload returned by sendRequest
payload
,
Throwable
the failure when not null
failure
,
TagExtractor<R>
the response tag extractor
tagExtractor
)

Signal a response has been received.

public default <R> O

Returns:

the request trace
sendRequest
(Context
the context data attached to the request
context
,
SpanKind
the span kind
kind
,
TracingPolicy
the policy to apply
policy
,
R
the request object
request
,
String
the request operation
operation
,
BiConsumer<String, String>
a write only-view of the request headers
headers
,
TagExtractor<R>
the request tag extractor
tagExtractor
)

Signal a request is sent.

public default <R> void
sendResponse(Context
the context data attached to the request
context
,
R
the response sent
response
,
I
the payload returned by receiveRequest
payload
,
Throwable
the failure when not null
failure
,
TagExtractor<R>
the response tag extractor
tagExtractor
)

Signal the response is sent.

Field Detail

NOOPback to summary
public static final VertxTracer<I, O> NOOP

Noop tracer.

Method Detail

closeback to summary
public default void close()

Close the tracer.

receiveRequestback to summary
public 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:Context

the context data attached to the request

kind:SpanKind

the span kind

policy:TracingPolicy

the policy to apply

request:R

the request object

operation:String

the request operation

headers:Iterable<Map.Entry<String, String>>

a read-only view of the request headers

tagExtractor:TagExtractor<R>

the request tag extractor

Returns:I

the request trace

receiveResponseback to summary
public default <R> void receiveResponse(Context context, R response, O payload, Throwable failure, TagExtractor<R> tagExtractor)

Signal a response has been received.

Parameters
context:Context

the context data attached to the request

response:R

the response sent

payload:O

the payload returned by sendRequest

failure:Throwable

the failure when not null

tagExtractor:TagExtractor<R>

the response tag extractor

sendRequestback to summary
public 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 call receiveResponse.

Parameters
context:Context

the context data attached to the request

kind:SpanKind

the span kind

policy:TracingPolicy

the policy to apply

request:R

the request object

operation:String

the request operation

headers:BiConsumer<String, String>

a write only-view of the request headers

tagExtractor:TagExtractor<R>

the request tag extractor

Returns:O

the request trace

sendResponseback to summary
public default <R> void sendResponse(Context context, R response, I payload, Throwable failure, TagExtractor<R> tagExtractor)

Signal the response is sent.

Parameters
context:Context

the context data attached to the request

response:R

the response sent

payload:I

the payload returned by receiveRequest

failure:Throwable

the failure when not null

tagExtractor:TagExtractor<R>

the response tag extractor