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) sockFamily(REQUEST request, RESPONSE response) final StringsockPeerAddr(REQUEST request, RESPONSE response) sockPeerName(REQUEST request, RESPONSE response) sockPeerPort(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
peerName, peerPort, transport
-
Constructor Details
-
InetSocketAddressNetClientAttributesGetter
public InetSocketAddressNetClientAttributesGetter()
-
-
Method Details
-
getPeerSocketAddress
@Nullable protected abstract InetSocketAddress getPeerSocketAddress(REQUEST request, @Nullable RESPONSE response) -
sockFamily
- Specified by:
sockFamilyin interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-
sockPeerAddr
- Specified by:
sockPeerAddrin interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-
sockPeerName
- Specified by:
sockPeerNamein interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-
sockPeerPort
- Specified by:
sockPeerPortin interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-