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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterRequest(ClientRequestContext requestContext, ClientResponseContext responseContext) voidonException(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:
afterRequestin 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:
onExceptionin interfacePostInvocationInterceptor- Parameters:
requestContext- the request contextexceptionContext- the exception context
-