Class HttpSpanNameExtractor<REQUEST>
java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor<REQUEST>
- All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST>
public final class HttpSpanNameExtractor<REQUEST>
extends Object
implements io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST>
Extractor of the HTTP
span name. Instrumentation of HTTP server or client frameworks should use this class to
comply with OpenTelemetry HTTP semantic conventions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <REQUEST> HttpSpanNameExtractorBuilder<REQUEST>builder(HttpCommonAttributesGetter<REQUEST, ?> getter) Returns a newHttpSpanNameExtractorBuilderthat can be used to configure the HTTP span name extractor.static <REQUEST> io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST>create(HttpCommonAttributesGetter<REQUEST, ?> getter) Returns aSpanNameExtractorwhich should be used for HTTP requests with default configuration.
-
Method Details
-
create
public static <REQUEST> io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST> create(HttpCommonAttributesGetter<REQUEST, ?> getter) Returns aSpanNameExtractorwhich should be used for HTTP requests with default configuration. HTTP attributes will be examined to determine the name of the span. -
builder
public static <REQUEST> HttpSpanNameExtractorBuilder<REQUEST> builder(HttpCommonAttributesGetter<REQUEST, ?> getter) Returns a newHttpSpanNameExtractorBuilderthat can be used to configure the HTTP span name extractor. -
extract
- Specified by:
extractin interfaceio.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST>
-