Class InetSocketAddressNetClientAttributesGetter<REQUEST,RESPONSE>
java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter<REQUEST,RESPONSE>
- All Implemented Interfaces:
NetClientAttributesGetter<REQUEST,RESPONSE>
public abstract class InetSocketAddressNetClientAttributesGetter<REQUEST,RESPONSE>
extends Object
implements NetClientAttributesGetter<REQUEST,RESPONSE>
Extractor of Network
attributes from a
InetSocketAddress. Most network libraries will provide access to a
InetSocketAddress so this is a convenient alternative to NetClientAttributesExtractor. There is no meaning to implement both in the same instrumentation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract InetSocketAddressgetPeerSocketAddress(REQUEST request, RESPONSE response) getSockFamily(REQUEST request, RESPONSE response) final StringgetSockPeerAddr(REQUEST request, RESPONSE response) getSockPeerName(REQUEST request, RESPONSE response) getSockPeerPort(REQUEST request, RESPONSE response) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter
getPeerName, getPeerPort, getTransport, peerName, peerPort, sockFamily, sockPeerAddr, sockPeerName, sockPeerPort, transport
-
Constructor Details
-
InetSocketAddressNetClientAttributesGetter
public InetSocketAddressNetClientAttributesGetter()
-
-
Method Details
-
getPeerSocketAddress
@Nullable protected abstract InetSocketAddress getPeerSocketAddress(REQUEST request, @Nullable RESPONSE response) -
getSockFamily
- Specified by:
getSockFamilyin interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-
getSockPeerAddr
- Specified by:
getSockPeerAddrin interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-
getSockPeerName
- Specified by:
getSockPeerNamein interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-
getSockPeerPort
- Specified by:
getSockPeerPortin interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-