Class HttpClientPeerServiceAttributesExtractor<REQUEST,RESPONSE>
java.lang.Object
io.opentelemetry.instrumentation.api.incubator.semconv.http.HttpClientPeerServiceAttributesExtractor<REQUEST,RESPONSE>
- All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE>
public final class HttpClientPeerServiceAttributesExtractor<REQUEST,RESPONSE>
extends Object
implements io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE>
Extractor of the
peer.service span attribute, described in the
specification.-
Method Summary
Modifier and TypeMethodDescriptionstatic <REQUEST,RESPONSE>
HttpClientPeerServiceAttributesExtractor<REQUEST, RESPONSE> create(io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesGetter<REQUEST, RESPONSE> attributesGetter, PeerServiceResolver peerServiceResolver) Returns a newHttpClientPeerServiceAttributesExtractorthat will use the passedattributesGetterinstance to determine the value of thepeer.serviceattribute.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> HttpClientPeerServiceAttributesExtractor<REQUEST,RESPONSE> create(io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesGetter<REQUEST, RESPONSE> attributesGetter, PeerServiceResolver peerServiceResolver) Returns a newHttpClientPeerServiceAttributesExtractorthat will use the passedattributesGetterinstance to determine the value of thepeer.serviceattribute. -
onStart
public void onStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, REQUEST request) -
onEnd
-