Package 

Interface DatadogHttpHeadersPropagation


  • 
    public interface DatadogHttpHeadersPropagation
    
                        

    Interface 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 HttpRequestInfoBuilder handleSampledHeaders(HttpRequestInfoBuilder requestInfoBuilder, DatadogTracer tracer, DatadogSpan span) Handles HTTP header injection for sampled requests.
      abstract HttpRequestInfoBuilder handleNotSampledHeaders(HttpRequestInfoBuilder requestInfoBuilder, DatadogTracer tracer, DatadogSpan span) Handles HTTP header injection for non-sampled requests.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.