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.
Extractor of span links for a request.
-
Method Summary
Modifier and TypeMethodDescriptionvoidextract(SpanLinksBuilder spanLinks, io.opentelemetry.context.Context parentContext, REQUEST request) ExtractsSpanContexts that should be linked to the newly created span and adds them tospanLinks.static <REQUEST> SpanLinksExtractor<REQUEST>extractFromRequest(io.opentelemetry.context.propagation.TextMapPropagator propagator, io.opentelemetry.context.propagation.TextMapGetter<REQUEST> getter) Returns a newSpanLinksExtractorthat will extract aSpanContextfrom the request using configuredTextMapPropagator.static <REQUEST> SpanLinksExtractor<REQUEST>fromUpstreamRequest(io.opentelemetry.context.propagation.ContextPropagators propagators, io.opentelemetry.context.propagation.TextMapGetter<REQUEST> getter) Deprecated.
-
Method Details
-
extract
void extract(SpanLinksBuilder spanLinks, io.opentelemetry.context.Context parentContext, REQUEST request) ExtractsSpanContexts that should be linked to the newly created span and adds them tospanLinks. -
fromUpstreamRequest
@Deprecated static <REQUEST> SpanLinksExtractor<REQUEST> fromUpstreamRequest(io.opentelemetry.context.propagation.ContextPropagators propagators, io.opentelemetry.context.propagation.TextMapGetter<REQUEST> getter) Deprecated.UseextractFromRequest(TextMapPropagator, TextMapGetter)instead.Returns a newSpanLinksExtractorthat will extract aSpanContextfrom the request using configuredpropagators. -
extractFromRequest
static <REQUEST> SpanLinksExtractor<REQUEST> extractFromRequest(io.opentelemetry.context.propagation.TextMapPropagator propagator, io.opentelemetry.context.propagation.TextMapGetter<REQUEST> getter) Returns a newSpanLinksExtractorthat will extract aSpanContextfrom the request using configuredTextMapPropagator.
-
extractFromRequest(TextMapPropagator, TextMapGetter)instead.