Interface HttpClientAttributesGetter<REQUEST,RESPONSE>
- All Superinterfaces:
HttpCommonAttributesGetter<REQUEST,,RESPONSE> NetClientAttributesGetter<REQUEST,,RESPONSE> NetworkAttributesGetter<REQUEST,,RESPONSE> ServerAttributesGetter<REQUEST,RESPONSE>
public interface HttpClientAttributesGetter<REQUEST,RESPONSE>
extends HttpCommonAttributesGetter<REQUEST,RESPONSE>, NetClientAttributesGetter<REQUEST,RESPONSE>, NetworkAttributesGetter<REQUEST,RESPONSE>, ServerAttributesGetter<REQUEST,RESPONSE>
An interface for getting HTTP client attributes.
Instrumentation authors will create implementations of this interface for their specific
library/framework. It will be used by the HttpClientAttributesExtractor to obtain the
various HTTP client attributes in a type-generic way.
-
Method Summary
Modifier and TypeMethodDescriptiongetServerAddress(REQUEST request) Return the logical server hostname that matches server FQDN if available, and IP or socket address if FQDN is not known.getServerPort(REQUEST request) Return the logical server port number.getUrlFull(REQUEST request) Returns the absolute URL describing a network resource according to RFC3986.Methods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpCommonAttributesGetter
getErrorType, getHttpRequestHeader, getHttpRequestMethod, getHttpResponseHeader, getHttpResponseStatusCodeMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter
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
getServerInetSocketAddress, getServerSocketAddress, getServerSocketDomain, getServerSocketPort
-
Method Details
-
getUrlFull
Returns the absolute URL describing a network resource according to RFC3986.Examples:
https://www.foo.bar/search?q=OpenTelemetry#SemConv;//localhost -
getServerAddress
Return the logical server hostname that matches server FQDN if available, and IP or socket address if FQDN is not known.Examples:
example.com- Specified by:
getServerAddressin interfaceServerAttributesGetter<REQUEST,RESPONSE>
-
getServerPort
Return the logical server port number.Examples:
80,8080,443- Specified by:
getServerPortin interfaceServerAttributesGetter<REQUEST,RESPONSE>
-