Package io.helidon.tracing.jersey.client
Class ClientTracingInterceptor
java.lang.Object
io.helidon.tracing.jersey.client.ClientTracingInterceptor
- All Implemented Interfaces:
PostInvocationInterceptor
A post-invocation client interceptor. If an exception (e.g. a connection timeout)
is thrown while executing a client request, this interceptor will ensure
that an active tracing span is properly finished --given that client response
filters will not be executed if an exception is thrown.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glassfish.jersey.client.spi.PostInvocationInterceptor
PostInvocationInterceptor.ExceptionContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterRequest
(ClientRequestContext requestContext, ClientResponseContext responseContext) void
onException
(ClientRequestContext requestContext, PostInvocationInterceptor.ExceptionContext exceptionContext) Upon encountering a client exception, and if there's an active span created by a tracing filter, finish the span.
-
Constructor Details
-
ClientTracingInterceptor
public ClientTracingInterceptor()
-
-
Method Details
-
afterRequest
public void afterRequest(ClientRequestContext requestContext, ClientResponseContext responseContext) - Specified by:
afterRequest
in interfacePostInvocationInterceptor
-
onException
public void onException(ClientRequestContext requestContext, PostInvocationInterceptor.ExceptionContext exceptionContext) Upon encountering a client exception, and if there's an active span created by a tracing filter, finish the span.- Specified by:
onException
in interfacePostInvocationInterceptor
- Parameters:
requestContext
- the request contextexceptionContext
- the exception context
-