Interface NetServerAttributesGetter<REQUEST,RESPONSE>
- All Superinterfaces:
ClientAttributesGetter<REQUEST,,RESPONSE> NetworkAttributesGetter<REQUEST,,RESPONSE> ServerAttributesGetter<REQUEST,RESPONSE>
- All Known Subinterfaces:
HttpServerAttributesGetter<REQUEST,RESPONSE>
Instrumentation authors will create implementations of this interface for their specific
server library/framework. It will be used by the NetServerAttributesExtractor 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 StringgetSockFamily(REQUEST request) Deprecated.Returns the protocol address family which is used for communication.default StringgetTransport(REQUEST request) Deprecated.Methods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.network.ClientAttributesGetter
getClientAddress, getClientInetSocketAddress, getClientPort, getClientSocketAddress, getClientSocketPortMethods 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
-
getTransport
Deprecated. -
getSockFamily
Deprecated.Returns the protocol address family which is used for communication.Examples: `inet`, `inet6`.
By default, this method attempts to retrieve the address family using one of the
ClientAttributesGetter.getClientInetSocketAddress(Object, Object)andServerAttributesGetter.getServerInetSocketAddress(Object, Object)methods. If neither of these methods is implemented, it will simply returnnull. If the instrumented library does not exposeInetSocketAddressin its API, you might want to implement this method instead ofClientAttributesGetter.getClientInetSocketAddress(Object, Object)andServerAttributesGetter.getServerInetSocketAddress(Object, Object). -
getNetworkType
Deprecated.Returns the OSI Network Layer or non-OSI equivalent.Examples:
ipv4,ipv6- Specified by:
getNetworkTypein interfaceNetworkAttributesGetter<REQUEST,RESPONSE>
-
...networkpackage instead. This class will be removed in the 2.0 release.