-
public interface DatadogHttpHeadersPropagationInterface for handling trace context propagation via HTTP headers. Implementations of this interface are responsible for injecting trace context headers into HTTP requests based on the sampling decision.
-
-
Method Summary
Modifier and Type Method Description abstract HttpRequestInfoBuilderhandleSampledHeaders(HttpRequestInfoBuilder requestInfoBuilder, DatadogTracer tracer, DatadogSpan span)Handles HTTP header injection for sampled requests. abstract HttpRequestInfoBuilderhandleNotSampledHeaders(HttpRequestInfoBuilder requestInfoBuilder, DatadogTracer tracer, DatadogSpan span)Handles HTTP header injection for non-sampled requests. -
-
Method Detail
-
handleSampledHeaders
abstract HttpRequestInfoBuilder handleSampledHeaders(HttpRequestInfoBuilder requestInfoBuilder, DatadogTracer tracer, DatadogSpan span)
Handles HTTP header injection for sampled requests. This method is called when a request has been sampled and trace context headers should be injected to propagate the trace to downstream services.
- Parameters:
requestInfoBuilder- the modifier to use for adding headers to the request.tracer- the tracer instance used for context propagation.span- the span associated with this request.
-
handleNotSampledHeaders
abstract HttpRequestInfoBuilder handleNotSampledHeaders(HttpRequestInfoBuilder requestInfoBuilder, DatadogTracer tracer, DatadogSpan span)
Handles HTTP header injection for non-sampled requests. This method is called when a request has not been sampled. Depending on the trace context injection strategy, headers may or may not be injected.
- Parameters:
requestInfoBuilder- the modifier to use for adding headers to the request.tracer- the tracer instance used for context propagation.span- the span associated with this request.
-
-
-
-