Class NetServerAttributesExtractor<REQUEST,RESPONSE>
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesExtractor<REQUEST,RESPONSE>
-
- All Implemented Interfaces:
AttributesExtractor<REQUEST,RESPONSE>
- Direct Known Subclasses:
InetSocketAddressNetServerAttributesExtractor
public abstract class NetServerAttributesExtractor<REQUEST,RESPONSE> extends Object implements AttributesExtractor<REQUEST,RESPONSE>
Extractor of Network attributes. It is common to have access toInetSocketAddress, in which case it is more convenient to useInetSocketAddressNetServerAttributesExtractor.
-
-
Constructor Summary
Constructors Constructor Description NetServerAttributesExtractor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidonEnd(io.opentelemetry.api.common.AttributesBuilder attributes, REQUEST request, RESPONSE response, Throwable error)Extracts attributes from theAttributesExtractorand eitherAttributesExtractororerrorinto theAttributesBuilderat the end of a request.voidonStart(io.opentelemetry.api.common.AttributesBuilder attributes, REQUEST request)Extracts attributes from theAttributesExtractorinto theAttributesBuilderat the beginning of a request.abstract StringpeerIp(REQUEST request)abstract StringpeerName(REQUEST request)abstract IntegerpeerPort(REQUEST request)abstract Stringtransport(REQUEST request)-
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.AttributesExtractor
set
-
-
-
-
Method Detail
-
onStart
public final void onStart(io.opentelemetry.api.common.AttributesBuilder attributes, REQUEST request)Description copied from interface:AttributesExtractorExtracts attributes from theAttributesExtractorinto theAttributesBuilderat the beginning of a request.- Specified by:
onStartin interfaceAttributesExtractor<REQUEST,RESPONSE>
-
onEnd
public final void onEnd(io.opentelemetry.api.common.AttributesBuilder attributes, REQUEST request, @Nullable RESPONSE response, @Nullable Throwable error)Description copied from interface:AttributesExtractorExtracts attributes from theAttributesExtractorand eitherAttributesExtractororerrorinto theAttributesBuilderat the end of a request.- Specified by:
onEndin interfaceAttributesExtractor<REQUEST,RESPONSE>
-
-