Class PropagatorBasedSpanLinksExtractor<REQUEST>

java.lang.Object
io.opentelemetry.instrumentation.api.internal.PropagatorBasedSpanLinksExtractor<REQUEST>
All Implemented Interfaces:
SpanLinksExtractor<REQUEST>

public final class PropagatorBasedSpanLinksExtractor<REQUEST> extends Object implements SpanLinksExtractor<REQUEST>
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
  • Constructor Details

    • PropagatorBasedSpanLinksExtractor

      public PropagatorBasedSpanLinksExtractor(io.opentelemetry.context.propagation.TextMapPropagator propagator, io.opentelemetry.context.propagation.TextMapGetter<REQUEST> getter)
  • Method Details

    • extract

      public void extract(SpanLinksBuilder spanLinks, io.opentelemetry.context.Context parentContext, REQUEST request)
      Description copied from interface: SpanLinksExtractor
      Extracts SpanContexts that should be linked to the newly created span and adds them to spanLinks.

      A link points to a related span other than the parent (for example, the producer span of a message being processed). Implementations should not derive link targets from the span currently in parentContext; parentContext is provided for access to request-scoped state attached via ContextKeys (for example, baggage set earlier in the pipeline).

      Specified by:
      extract in interface SpanLinksExtractor<REQUEST>