Class UrlAttributesExtractor<REQUEST,RESPONSE>
java.lang.Object
io.opentelemetry.instrumentation.api.semconv.url.UrlAttributesExtractor<REQUEST,RESPONSE>
- All Implemented Interfaces:
AttributesExtractor<REQUEST,RESPONSE>
public final class UrlAttributesExtractor<REQUEST,RESPONSE>
extends Object
implements AttributesExtractor<REQUEST,RESPONSE>
Extractor of URL
attributes.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <REQUEST,RESPONSE>
UrlAttributesExtractor<REQUEST, RESPONSE> create(UrlAttributesGetter<REQUEST> getter) Creates the URL attributes extractor.voidonEnd(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context context, REQUEST request, RESPONSE response, Throwable error) Extracts attributes from theContext, theAttributesExtractorand eitherAttributesExtractororerrorinto theAttributesBuilderat the end of a request.voidonStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, REQUEST request) Extracts attributes from theContextand theAttributesExtractorinto theAttributesBuilderat the beginning of a request.
-
Method Details
-
create
public static <REQUEST,RESPONSE> UrlAttributesExtractor<REQUEST,RESPONSE> create(UrlAttributesGetter<REQUEST> getter) Creates the URL attributes extractor.- See Also:
-
onStart
public void onStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, REQUEST request) Description copied from interface:AttributesExtractorExtracts attributes from theContextand theAttributesExtractorinto theAttributesBuilderat the beginning of a request.- Specified by:
onStartin interfaceAttributesExtractor<REQUEST,RESPONSE>
-
onEnd
public void onEnd(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context context, REQUEST request, @Nullable RESPONSE response, @Nullable Throwable error) Description copied from interface:AttributesExtractorExtracts attributes from theContext, theAttributesExtractorand eitherAttributesExtractororerrorinto theAttributesBuilderat the end of a request.- Specified by:
onEndin interfaceAttributesExtractor<REQUEST,RESPONSE>
-