Class HttpSpanNameExtractor<REQUEST>
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor<REQUEST>
-
- All Implemented Interfaces:
SpanNameExtractor<REQUEST>
public final class HttpSpanNameExtractor<REQUEST> extends Object implements 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <REQUEST> SpanNameExtractor<REQUEST>create(HttpAttributesExtractor<REQUEST,?> attributesExtractor)Returns aSpanNameExtractorwhich should be used for HTTP requests.Stringextract(REQUEST request)Returns the span name.
-
-
-
Method Detail
-
create
public static <REQUEST> SpanNameExtractor<REQUEST> create(HttpAttributesExtractor<REQUEST,?> attributesExtractor)
Returns aSpanNameExtractorwhich should be used for HTTP requests. HTTP attributes will be examined to determine the name of the span.
-
extract
public String extract(REQUEST request)
Description copied from interface:SpanNameExtractorReturns the span name.- Specified by:
extractin interfaceSpanNameExtractor<REQUEST>
-
-