Interface HttpServerAttributesGetter<REQUEST,RESPONSE>
- All Superinterfaces:
ClientAttributesGetter<REQUEST,,RESPONSE> HttpCommonAttributesGetter<REQUEST,,RESPONSE> NetServerAttributesGetter<REQUEST,,RESPONSE> NetworkAttributesGetter<REQUEST,,RESPONSE> ServerAttributesGetter<REQUEST,,RESPONSE> UrlAttributesGetter<REQUEST>
public interface HttpServerAttributesGetter<REQUEST,RESPONSE>
extends HttpCommonAttributesGetter<REQUEST,RESPONSE>, UrlAttributesGetter<REQUEST>, NetServerAttributesGetter<REQUEST,RESPONSE>, NetworkAttributesGetter<REQUEST,RESPONSE>, ServerAttributesGetter<REQUEST,RESPONSE>, ClientAttributesGetter<REQUEST,RESPONSE>
An interface for getting HTTP server attributes.
Instrumentation authors will create implementations of this interface for their specific
library/framework. It will be used by the HttpServerAttributesExtractor to obtain the
various HTTP server attributes in a type-generic way.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetHttpRoute(REQUEST request) Returns the matched route (path template in the format used by the respective server framework).getUrlPath(REQUEST request) Returns the URI path component.getUrlQuery(REQUEST request) Returns the URI query component.getUrlScheme(REQUEST request) Returns the URI scheme component identifying the used protocol.Methods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.network.ClientAttributesGetter
getClientAddress, getClientInetSocketAddress, getClientPort, getClientSocketAddress, getClientSocketPortMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpCommonAttributesGetter
getErrorType, getHttpRequestHeader, getHttpRequestMethod, getHttpResponseHeader, getHttpResponseStatusCodeMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter
getNetworkType, getSockFamily, getTransportMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.network.NetworkAttributesGetter
getNetworkProtocolName, getNetworkProtocolVersion, getNetworkTransportMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.network.ServerAttributesGetter
getServerAddress, getServerInetSocketAddress, getServerPort, getServerSocketAddress, getServerSocketDomain, getServerSocketPort
-
Method Details
-
getUrlScheme
Returns the URI scheme component identifying the used protocol.Examples:
https,ftp,telnet- Specified by:
getUrlSchemein interfaceUrlAttributesGetter<REQUEST>
-
getUrlPath
Returns the URI path component.Examples:
/search- Specified by:
getUrlPathin interfaceUrlAttributesGetter<REQUEST>
-
getUrlQuery
Returns the URI query component.Examples:
q=OpenTelemetry- Specified by:
getUrlQueryin interfaceUrlAttributesGetter<REQUEST>
-
getHttpRoute
Returns the matched route (path template in the format used by the respective server framework).Examples:
/users/:userID?,{controller}/{action}/{id?}
-