Class HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE>
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.instrumenter.http.HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE>
-
public final class HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE> extends Object
A builder ofHttpServerAttributesExtractor.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HttpServerAttributesExtractor<REQUEST,RESPONSE>build()Returns a newHttpServerAttributesExtractorwith the settings of thisHttpServerAttributesExtractorBuilder.HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE>captureHttpHeaders(CapturedHttpHeaders capturedHttpHeaders)Deprecated.UsesetCapturedRequestHeaders(List)andsetCapturedResponseHeaders(List)instead.HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE>setCapturedRequestHeaders(List<String> requestHeaders)Configures the HTTP request headers that will be captured as span attributes.HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE>setCapturedResponseHeaders(List<String> responseHeaders)Configures the HTTP response headers that will be captured as span attributes.
-
-
-
Method Detail
-
captureHttpHeaders
@Deprecated public HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE> captureHttpHeaders(CapturedHttpHeaders capturedHttpHeaders)
Deprecated.UsesetCapturedRequestHeaders(List)andsetCapturedResponseHeaders(List)instead.Configures the HTTP headers that will be captured as span attributes.- Parameters:
capturedHttpHeaders- A configuration object specifying which HTTP request and response headers should be captured as span attributes.
-
setCapturedRequestHeaders
public HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE> setCapturedRequestHeaders(List<String> requestHeaders)
Configures the HTTP request headers that will be captured as span attributes.- Parameters:
requestHeaders- A list of HTTP header names.
-
setCapturedResponseHeaders
public HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE> setCapturedResponseHeaders(List<String> responseHeaders)
Configures the HTTP response headers that will be captured as span attributes.- Parameters:
responseHeaders- A list of HTTP header names.
-
build
public HttpServerAttributesExtractor<REQUEST,RESPONSE> build()
Returns a newHttpServerAttributesExtractorwith the settings of thisHttpServerAttributesExtractorBuilder.
-
-