Class OkHttpTracingBuilder
- java.lang.Object
-
- io.opentelemetry.instrumentation.okhttp.v3_0.OkHttpTracingBuilder
-
public final class OkHttpTracingBuilder extends Object
A builder ofOkHttpTracing.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OkHttpTracingBuilderaddAttributesExtractor(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<okhttp3.Request,okhttp3.Response> attributesExtractor)Adds an additionalAttributesExtractorto invoke to set attributes to instrumented items.OkHttpTracingbuild()Returns a newOkHttpTracingwith the settings of thisOkHttpTracingBuilder.OkHttpTracingBuildercaptureHttpHeaders(io.opentelemetry.instrumentation.api.instrumenter.http.CapturedHttpHeaders capturedHttpHeaders)Configure the instrumentation to capture chosen HTTP request and response headers as span attributes.
-
-
-
Method Detail
-
addAttributesExtractor
public OkHttpTracingBuilder addAttributesExtractor(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<okhttp3.Request,okhttp3.Response> attributesExtractor)
Adds an additionalAttributesExtractorto invoke to set attributes to instrumented items.
-
captureHttpHeaders
public OkHttpTracingBuilder captureHttpHeaders(io.opentelemetry.instrumentation.api.instrumenter.http.CapturedHttpHeaders capturedHttpHeaders)
Configure the instrumentation to capture chosen HTTP request and response headers as span attributes.- Parameters:
capturedHttpHeaders- An instance ofCapturedHttpHeaderscontaining the configured HTTP request and response names.
-
build
public OkHttpTracing build()
Returns a newOkHttpTracingwith the settings of thisOkHttpTracingBuilder.
-
-