Interface TraceContext.Extractor<R>

Enclosing class:
TraceContext

public static interface TraceContext.Extractor<R>
Used to continue an incoming trace. For example, by reading http headers.

Note: This type is safe to implement as a lambda, or use as a method reference as it is effectively a FunctionalInterface. It isn't annotated as such because the project has a minimum Java language level 6.

Since:
4.0
See Also:
Tracer.nextSpan(TraceContextOrSamplingFlags)
  • Method Summary

    Modifier and Type Method Description
    TraceContextOrSamplingFlags extract​(R request)
    Returns either a trace context or sampling flags parsed from the request.
  • Method Details

    • extract

      TraceContextOrSamplingFlags extract​(R request)
      Returns either a trace context or sampling flags parsed from the request. If nothing was parsable, sampling flags will be set to SamplingFlags.EMPTY.
      Parameters:
      request - holds propagation fields. For example, an incoming message or http request.