Class HttpServerRouteBuilder<REQUEST>
java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.http.HttpServerRouteBuilder<REQUEST>
A builder of
HttpSpanNameExtractor.-
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.instrumentation.api.instrumenter.ContextCustomizer<REQUEST>build()Returns aContextCustomizerthat initializes anHttpServerRoutein theContextreturned fromInstrumenter.start(Context, Object).setKnownMethods(Set<String> knownMethods) Configures the customizer to recognize an alternative set of HTTP request methods.
-
Method Details
-
setKnownMethods
@CanIgnoreReturnValue public HttpServerRouteBuilder<REQUEST> setKnownMethods(Set<String> knownMethods) Configures the customizer to recognize an alternative set of HTTP request methods.By default, this customizer defines "known" methods as the ones listed in RFC9110 and the PATCH method defined in RFC5789. If an unknown method is encountered, the customizer will use the value "_OTHER" instead.
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 aContextCustomizerthat initializes anHttpServerRoutein theContextreturned fromInstrumenter.start(Context, Object). The returned customizer is configured with the settings of thisHttpServerRouteBuilder.
-