Class ServerAttributesExtractor<REQUEST,RESPONSE>
java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.network.ServerAttributesExtractor<REQUEST,RESPONSE>
- All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE>
public final class ServerAttributesExtractor<REQUEST,RESPONSE>
extends Object
implements io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE>
Extractor of server
attributes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <REQUEST,RESPONSE>
ServerAttributesExtractor<REQUEST,RESPONSE> create(ServerAttributesGetter<REQUEST, RESPONSE> getter) Returns a newServerAttributesExtractorthat will use the passedServerAttributesGetter.static <REQUEST,RESPONSE>
ServerAttributesExtractor<REQUEST,RESPONSE> createForServerSide(ServerAttributesGetter<REQUEST, RESPONSE> getter) Deprecated.This method will be removed in the 2.0 release.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> ServerAttributesExtractor<REQUEST,RESPONSE> create(ServerAttributesGetter<REQUEST, RESPONSE> getter) Returns a newServerAttributesExtractorthat will use the passedServerAttributesGetter. -
createForServerSide
@Deprecated public static <REQUEST,RESPONSE> ServerAttributesExtractor<REQUEST,RESPONSE> createForServerSide(ServerAttributesGetter<REQUEST, RESPONSE> getter) Deprecated.This method will be removed in the 2.0 release. It was only introduced to ease the transition from using the oldNetServerAttributesGetterto the new...networkattribute getter classes.Returns a newServerAttributesExtractorthat will use the passedServerAttributesGetter. -
onStart
public void onStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, REQUEST request) -
onEnd
-