Class InetSocketAddressNetAttributesExtractor<REQUEST,RESPONSE>
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE>
-
- io.opentelemetry.instrumentation.api.instrumenter.net.NetAttributesExtractor<REQUEST,RESPONSE>
-
- io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetAttributesExtractor<REQUEST,RESPONSE>
-
public abstract class InetSocketAddressNetAttributesExtractor<REQUEST,RESPONSE> extends NetAttributesExtractor<REQUEST,RESPONSE>
Extractor of Network attributes from aInetSocketAddress. Most network libraries will provide access to aInetSocketAddressso this is a convenient alternative toNetAttributesExtractor. There is no meaning to implement both in the same instrumentation.
-
-
Constructor Summary
Constructors Constructor Description InetSocketAddressNetAttributesExtractor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract @Nullable InetSocketAddressgetAddress(REQUEST request, @Nullable RESPONSE response)This method will be called twice: both when the request starts (responseis always null then) and when the response ends.@Nullable StringpeerIp(REQUEST request, @Nullable RESPONSE response)This method will be called twice: both when the request starts (responseis always null then) and when the response ends.@Nullable StringpeerName(REQUEST request, @Nullable RESPONSE response)This method will be called twice: both when the request starts (responseis always null then) and when the response ends.@Nullable IntegerpeerPort(REQUEST request, @Nullable RESPONSE response)This method will be called twice: both when the request starts (responseis always null then) and when the response ends.-
Methods inherited from class io.opentelemetry.instrumentation.api.instrumenter.net.NetAttributesExtractor
onEnd, onStart, transport
-
Methods inherited from class io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor
set
-
-
-
-
Method Detail
-
getAddress
public abstract @Nullable InetSocketAddress getAddress(REQUEST request, @Nullable RESPONSE response)
This method will be called twice: both when the request starts (responseis always null then) and when the response ends. This way it is possible to capture net attributes in both phases of processing.
-
peerName
public final @Nullable String peerName(REQUEST request, @Nullable RESPONSE response)
Description copied from class:NetAttributesExtractorThis method will be called twice: both when the request starts (responseis always null then) and when the response ends. This way it is possible to capture net attributes in both phases of processing.- Specified by:
peerNamein classNetAttributesExtractor<REQUEST,RESPONSE>
-
peerPort
public final @Nullable Integer peerPort(REQUEST request, @Nullable RESPONSE response)
Description copied from class:NetAttributesExtractorThis method will be called twice: both when the request starts (responseis always null then) and when the response ends. This way it is possible to capture net attributes in both phases of processing.- Specified by:
peerPortin classNetAttributesExtractor<REQUEST,RESPONSE>
-
peerIp
public final @Nullable String peerIp(REQUEST request, @Nullable RESPONSE response)
Description copied from class:NetAttributesExtractorThis method will be called twice: both when the request starts (responseis always null then) and when the response ends. This way it is possible to capture net attributes in both phases of processing.- Specified by:
peerIpin classNetAttributesExtractor<REQUEST,RESPONSE>
-
-