Class 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 the AsyncInvocationInterceptor interface that propagates OpenTelemetry Span and Context across asynchronous invocation boundaries.
    • Constructor Detail

      • AsyncContextPropagator

        public AsyncContextPropagator()
    • Method Detail

      • prepareContext

        public void prepareContext()
        Prepares the context for propagation by starting the PropagationHelper object.
        Specified by:
        prepareContext in interface org.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 interface org.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 interface org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor