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 aInetSocketAddress. Most network libraries will provide access to aInetSocketAddressso this is a convenient alternative toNetClientAttributesExtractor. There is no meaning to implement both in the same instrumentation.
-
-
Constructor Summary
Constructors Constructor Description InetSocketAddressNetClientAttributesGetter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract InetSocketAddressgetAddress(REQUEST request, RESPONSE response)StringpeerIp(REQUEST request, RESPONSE response)StringpeerName(REQUEST request, RESPONSE response)IntegerpeerPort(REQUEST request, RESPONSE response)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter
transport
-
-
-
-
Method Detail
-
getAddress
@Nullable public abstract InetSocketAddress getAddress(REQUEST request, @Nullable RESPONSE response)
-
peerName
@Nullable public final String peerName(REQUEST request, @Nullable RESPONSE response)
- Specified by:
peerNamein interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-
peerPort
@Nullable public final Integer peerPort(REQUEST request, @Nullable RESPONSE response)
- Specified by:
peerPortin interfaceNetClientAttributesGetter<REQUEST,RESPONSE>
-
-