Class NetServerAttributesExtractor<REQUEST,RESPONSE>
java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesExtractor<REQUEST,RESPONSE>
- All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE>
public final class NetServerAttributesExtractor<REQUEST,RESPONSE>
extends Object
implements io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE>
Extractor of Network
attributes. It is common to have access to
InetSocketAddress, in which case
it is more convenient to use InetSocketAddressNetServerAttributesGetter.-
Method Summary
Modifier and TypeMethodDescriptionstatic <REQUEST,RESPONSE>
NetServerAttributesExtractor<REQUEST,RESPONSE> create(NetServerAttributesGetter<REQUEST> getter) voidonEnd(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context context, REQUEST request, RESPONSE response, Throwable error) voidonStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, REQUEST request)
-
Method Details
-
create
public static <REQUEST,RESPONSE> NetServerAttributesExtractor<REQUEST,RESPONSE> create(NetServerAttributesGetter<REQUEST> getter) -
onStart
public void onStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, REQUEST request) -
onEnd
-