Interface HttpClientAttributesGetter<REQUEST,RESPONSE>
- All Superinterfaces:
HttpCommonAttributesGetter<REQUEST,,RESPONSE> NetworkAttributesGetter<REQUEST,,RESPONSE> ServerAttributesGetter<REQUEST>
public interface HttpClientAttributesGetter<REQUEST,RESPONSE>
extends HttpCommonAttributesGetter<REQUEST,RESPONSE>, NetworkAttributesGetter<REQUEST,RESPONSE>, ServerAttributesGetter<REQUEST>
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.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptiongetServerAddress(REQUEST request) Returns the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.getServerPort(REQUEST request) Return the 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.semconv.http.HttpCommonAttributesGetter
getErrorType, getHttpRequestHeader, getHttpRequestMethod, getHttpResponseHeader, getHttpResponseStatusCodeMethods inherited from interface io.opentelemetry.instrumentation.api.semconv.network.NetworkAttributesGetter
getNetworkLocalAddress, getNetworkLocalInetSocketAddress, getNetworkLocalPort, getNetworkPeerAddress, getNetworkPeerInetSocketAddress, getNetworkPeerPort, getNetworkProtocolName, getNetworkProtocolVersion, getNetworkTransport, getNetworkType
-
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
Returns the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.Examples:
client.example.com,10.1.2.80,/tmp/my.sock- Specified by:
getServerAddressin interfaceServerAttributesGetter<REQUEST>
-
getServerPort
Return the server port number.Examples:
80,8080,443- Specified by:
getServerPortin interfaceServerAttributesGetter<REQUEST>
-