Package 

Object DatadogTracingToolkit


  • 
    public class DatadogTracingToolkit
    
                        

    For library usage only. Provides implementation for specific interfaces to dependent modules

    • Method Detail

      • setTraceId128BitGenerationEnabled

         final DatadogTracerBuilder setTraceId128BitGenerationEnabled(DatadogTracerBuilder builder)

        Enables 128-bit trace ID generation for the provided Datadog tracer builder.

      • setSdkV2Compatible

         final DatadogTracerBuilder setSdkV2Compatible(DatadogTracerBuilder builder)

        Enables compatibility mode with SDK v2 for sampling factory strategy.

      • addThrowable

         final static Unit addThrowable(DatadogSpan span, Throwable throwable, Byte errorPriority)

        Associates a throwable with the current span, marking it as an error. Note that error flag will be set only if priority is higher than the current one.

        Parameters:
        span - The span to associate the throwable with.
        throwable - The throwable to associate with the current span.
        errorPriority - The priority level of the error, represented as a byte.
      • activateSpan

         final static DatadogScope activateSpan(DatadogTracer tracer, DatadogSpan span, Boolean asyncPropagating)

        Activates the provided span within the current context of the tracer. If asyncPropagating is set to true, the span is propagated asynchronously. Once activated, the span becomes the currently active span until it is explicitly deactivated.

        Parameters:
        tracer - The tracer instance to be used for activation.
        span - The span to be activated.
        asyncPropagating - If true, this context will propagate across async boundaries.
      • mergeBaggage

         final String mergeBaggage(String oldHeader, String newHeader)

        Merges two baggage headers into a single string representation. The oldHeader represents the previously existing baggage header, and the newHeader represents the new baggage information to be merged with the old one.

        Parameters:
        oldHeader - The existing baggage header, which may be null.
        newHeader - The new baggage header to be merged, must not be null.
      • getSpanIdConverter

         final DatadogSpanIdConverter getSpanIdConverter()

        Provides a mechanism for converting Datadog span IDs between decimal and hexadecimal representations.

        This converter is utilized to ensure span ID consistency and proper formatting for distributed tracing when working with the Datadog SDK.

      • getPropagationHelper

         final DatadogPropagationHelper getPropagationHelper()

        Providing helper function to extract DatadogSpanContext from tracing context added by addParentSpan method.

        This property is intended for internal usage only and should not be altered externally.