Interface NetClientAttributesGetter<REQUEST,RESPONSE>
- All Superinterfaces:
NetworkAttributesGetter<REQUEST,,RESPONSE> ServerAttributesGetter<REQUEST,RESPONSE>
- All Known Subinterfaces:
HttpClientAttributesGetter<REQUEST,RESPONSE>
Instrumentation authors will create implementations of this interface for their specific library/framework. It will be used by the NetClientAttributesExtractor to obtain the various network attributes in a type-generic way.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetNetworkType(REQUEST request, RESPONSE response) Deprecated.Returns the OSI network layer or non-OSI equivalent.default InetSocketAddressgetServerInetSocketAddress(REQUEST request, RESPONSE response) Deprecated.Returns anInetSocketAddressobject representing the server socket address.default StringgetServerSocketAddress(REQUEST request, RESPONSE response) Deprecated.Return the physical server IP address or Unix socket address.default IntegergetServerSocketPort(REQUEST request, RESPONSE response) Deprecated.Return the physical server port.default StringgetSockFamily(REQUEST request, RESPONSE response) Deprecated.Returns the protocol address family which is used for communication.default StringgetTransport(REQUEST request, RESPONSE response) Deprecated.Methods 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
getServerAddress, getServerPort, getServerSocketDomain
-
Method Details
-
getTransport
Deprecated. -
getSockFamily
Deprecated.Returns the protocol address family which is used for communication.Examples:
inet,inet6By default, this method attempts to retrieve the address family using the
getServerInetSocketAddress(Object, Object)method. If it is not implemented, it will simply returnnull. If the instrumented library does not exposeInetSocketAddressin its API, you might want to implement this method instead ofgetServerSocketAddress(Object, Object). -
getNetworkType
Deprecated.Returns the OSI network layer or non-OSI equivalent.Examples:
ipv4,ipv6- Specified by:
getNetworkTypein interfaceNetworkAttributesGetter<REQUEST,RESPONSE>
-
getServerInetSocketAddress
@Nullable default InetSocketAddress getServerInetSocketAddress(REQUEST request, @Nullable RESPONSE response) Deprecated.Description copied from interface:ServerAttributesGetterReturns anInetSocketAddressobject representing the server socket address.Implementing this method is equivalent to implementing all of
ServerAttributesGetter.getServerSocketDomain(Object, Object),ServerAttributesGetter.getServerSocketAddress(Object, Object)andServerAttributesGetter.getServerSocketPort(Object, Object).- Specified by:
getServerInetSocketAddressin interfaceServerAttributesGetter<REQUEST,RESPONSE>
-
getServerSocketAddress
Deprecated.Description copied from interface:ServerAttributesGetterReturn the physical server IP address or Unix socket address.Examples:
10.5.3.2By default, this method attempts to retrieve the server address using the
ServerAttributesGetter.getServerInetSocketAddress(Object, Object)method. If this method is not implemented, it will simply returnnull. If the instrumented library does not exposeInetSocketAddressin its API, you might want to implement this method instead ofServerAttributesGetter.getServerInetSocketAddress(Object, Object).- Specified by:
getServerSocketAddressin interfaceServerAttributesGetter<REQUEST,RESPONSE>
-
getServerSocketPort
Deprecated.Description copied from interface:ServerAttributesGetterReturn the physical server port.Examples:
16456By default, this method attempts to retrieve the server port using the
ServerAttributesGetter.getServerInetSocketAddress(Object, Object)method. If this method is not implemented, it will simply returnnull. If the instrumented library does not exposeInetSocketAddressin its API, you might want to implement this method instead ofServerAttributesGetter.getServerInetSocketAddress(Object, Object).- Specified by:
getServerSocketPortin interfaceServerAttributesGetter<REQUEST,RESPONSE>
-
...networkpackage instead. This class will be removed in the 2.0 release.