Interface SpanLinksExtractor<REQUEST>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SpanLinksExtractor<REQUEST>
Extractor of span links for a request.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    extract(SpanLinksBuilder spanLinks, io.opentelemetry.context.Context parentContext, REQUEST request)
    Extracts SpanContexts that should be linked to the newly created span and adds them to spanLinks.
    static <REQUEST> SpanLinksExtractor<REQUEST>
    extractFromRequest(io.opentelemetry.context.propagation.TextMapPropagator propagator, io.opentelemetry.context.propagation.TextMapGetter<REQUEST> getter)
    Returns a new SpanLinksExtractor that will extract a SpanContext from the request using configured TextMapPropagator.
  • Method Details

    • extract

      void extract(SpanLinksBuilder spanLinks, io.opentelemetry.context.Context parentContext, REQUEST request)
      Extracts SpanContexts that should be linked to the newly created span and adds them to spanLinks.
    • extractFromRequest

      static <REQUEST> SpanLinksExtractor<REQUEST> extractFromRequest(io.opentelemetry.context.propagation.TextMapPropagator propagator, io.opentelemetry.context.propagation.TextMapGetter<REQUEST> getter)
      Returns a new SpanLinksExtractor that will extract a SpanContext from the request using configured TextMapPropagator.