Class AsyncContextPropagator
- java.lang.Object
-
- fish.payara.microprofile.telemetry.tracing.jaxrs.client.AsyncContextPropagator
-
- All Implemented Interfaces:
org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor
public class AsyncContextPropagator extends Object implements org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor
An implementation of theAsyncInvocationInterceptor
interface that propagates OpenTelemetrySpan
andContext
across asynchronous invocation boundaries.
-
-
Constructor Summary
Constructors Constructor Description AsyncContextPropagator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyContext()
Applies the propagated context and span to the current thread's context and span using a local scope.void
prepareContext()
Prepares the context for propagation by starting the PropagationHelper object.void
removeContext()
Removes the propagated context and span from the current thread's context and span.
-
-
-
Method Detail
-
prepareContext
public void prepareContext()
Prepares the context for propagation by starting the PropagationHelper object.- Specified by:
prepareContext
in interfaceorg.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor
-
applyContext
public void applyContext()
Applies the propagated context and span to the current thread's context and span using a local scope.- Specified by:
applyContext
in interfaceorg.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor
-
removeContext
public void removeContext()
Removes the propagated context and span from the current thread's context and span.- Specified by:
removeContext
in interfaceorg.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor
-
-