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, that is, the path template in the format used by the respective server framework.default StringgetServerAddress(REQUEST request) Deprecated.This method is deprecated and will be removed without replacement.default IntegergetServerPort(REQUEST request) Deprecated.This method is deprecated and will be removed without replacement.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, getClientPortMethods 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
getClientInetSocketAddress, getClientSocketAddress, getClientSocketPort, getNetworkType, getServerInetSocketAddress, getServerSocketAddress, getServerSocketPort, getSockFamily, getTransportMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.network.NetworkAttributesGetter
getNetworkLocalAddress, getNetworkLocalInetSocketAddress, getNetworkLocalPort, getNetworkPeerAddress, getNetworkPeerInetSocketAddress, getNetworkPeerPort, getNetworkProtocolName, getNetworkProtocolVersion, getNetworkTransportMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.network.ServerAttributesGetter
getServerSocketDomain
-
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, that is, the path template in the format used by the respective server framework.Examples:
/users/:userID?,{controller}/{action}/{id?} -
getServerAddress
Deprecated.This method is deprecated and will be removed without replacement. TheHttpServerAttributesExtractornow extracts the server address and port from the received HTTP request's headers.Returns the name of the local HTTP server that received the request.- Specified by:
getServerAddressin interfaceServerAttributesGetter<REQUEST,RESPONSE>
-
getServerPort
Deprecated.This method is deprecated and will be removed without replacement. TheHttpServerAttributesExtractornow extracts the server address and port from the received HTTP request's headers.Returns the port of the local HTTP server that received the request.- Specified by:
getServerPortin interfaceServerAttributesGetter<REQUEST,RESPONSE>
-