Class HttpSpanNameExtractorBuilder<REQUEST>
java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractorBuilder<REQUEST>
A builder of
HttpSpanNameExtractor.-
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST>build()Returns a newHttpSpanNameExtractorwith the settings of thisHttpSpanNameExtractorBuilder.setKnownMethods(Set<String> knownMethods) Configures the extractor to recognize an alternative set of HTTP request methods.
-
Method Details
-
setKnownMethods
@CanIgnoreReturnValue public HttpSpanNameExtractorBuilder<REQUEST> setKnownMethods(Set<String> knownMethods) Configures the extractor to recognize an alternative set of HTTP request methods.By default, this extractor defines "known" methods as the ones listed in RFC9110 and the PATCH method defined in RFC5789. If an unknown method is encountered, the extractor will use the value "_OTHER" instead of it and put the original value in an extra
http.request.method_originalattribute.Note: calling this method overrides the default known method sets completely; it does not supplement it.
- Parameters:
knownMethods- A set of recognized HTTP request methods.
-
build
Returns a newHttpSpanNameExtractorwith the settings of thisHttpSpanNameExtractorBuilder.
-