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 InetSocketAddressgetClientInetSocketAddress(REQUEST request, RESPONSE response) Deprecated.Returns anInetSocketAddressobject representing the immediate client socket address.default StringgetClientSocketAddress(REQUEST request, RESPONSE response) Deprecated.Returns the immediate client peer address - unix domain socket name, IPv4 or IPv6 address.default IntegergetClientSocketPort(REQUEST request, RESPONSE response) Deprecated.Returns the immediate client peer port number.default 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) 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, getClientPortMethods 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`, `inet6`.
By default, this method attempts to retrieve the address family using one of the
getClientInetSocketAddress(Object, Object)andgetServerInetSocketAddress(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 ofgetClientInetSocketAddress(Object, Object)andgetServerInetSocketAddress(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>
-
getClientInetSocketAddress
@Nullable default InetSocketAddress getClientInetSocketAddress(REQUEST request, @Nullable RESPONSE response) Deprecated.Description copied from interface:ClientAttributesGetterReturns anInetSocketAddressobject representing the immediate client socket address.Implementing this method is equivalent to implementing all of
ClientAttributesGetter.getClientSocketAddress(Object, Object)andClientAttributesGetter.getClientSocketPort(Object, Object).- Specified by:
getClientInetSocketAddressin interfaceClientAttributesGetter<REQUEST,RESPONSE>
-
getClientSocketAddress
Deprecated.Description copied from interface:ClientAttributesGetterReturns the immediate client peer address - unix domain socket name, IPv4 or IPv6 address.Examples:
/tmp/my.sock,127.0.0.1By default, this method attempts to retrieve the immediate client address using the
ClientAttributesGetter.getClientInetSocketAddress(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 ofClientAttributesGetter.getClientInetSocketAddress(Object, Object).- Specified by:
getClientSocketAddressin interfaceClientAttributesGetter<REQUEST,RESPONSE>
-
getClientSocketPort
Deprecated.Description copied from interface:ClientAttributesGetterReturns the immediate client peer port number.Examples:
35555By default, this method attempts to retrieve the immediate client port using the
ClientAttributesGetter.getClientInetSocketAddress(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 ofClientAttributesGetter.getClientInetSocketAddress(Object, Object).- Specified by:
getClientSocketPortin interfaceClientAttributesGetter<REQUEST,RESPONSE>
-
...networkpackage instead. This class will be removed in the 2.0 release.