Class HttpSpanNameExtractorBuilder<REQUEST>
HttpSpanNameExtractor.- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionHttpSpanNameExtractorBuilder(HttpClientAttributesGetter<REQUEST, ?> clientGetter, HttpServerAttributesGetter<REQUEST, ?> serverGetter) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newHttpSpanNameExtractorwith the settings of thisHttpSpanNameExtractorBuilder.setKnownMethods(Collection<String> knownMethods) Configures the extractor to recognize an alternative set of HTTP request methods.setKnownMethods(Set<String> knownMethods) Configures the extractor to recognize an alternative set of HTTP request methods.
-
Constructor Details
-
HttpSpanNameExtractorBuilder
public HttpSpanNameExtractorBuilder(@Nullable HttpClientAttributesGetter<REQUEST, ?> clientGetter, @Nullable HttpServerAttributesGetter<REQUEST, ?> serverGetter)
-
-
Method Details
-
setKnownMethods
@CanIgnoreReturnValue public HttpSpanNameExtractorBuilder<REQUEST> setKnownMethods(Collection<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.
-
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.- See Also:
-