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 theAsyncInvocationInterceptorinterface that propagates OpenTelemetrySpanandContextacross asynchronous invocation boundaries.
-
-
Constructor Summary
Constructors Constructor Description AsyncContextPropagator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyContext()Applies the propagated context and span to the current thread's context and span using a local scope.voidprepareContext()Prepares the context for propagation by starting the PropagationHelper object.voidremoveContext()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:
prepareContextin 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:
applyContextin 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:
removeContextin interfaceorg.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor
-
-