-
- All Implemented Interfaces:
-
com.datadog.android.trace.api.propagation.DatadogPropagation
public final class NoOpDatadogPropagation implements DatadogPropagation
A no-operation implementation of the DatadogPropagation interface.
This implementation is intended as a placeholder making possible to create other NoOp.* classes.
-
-
Constructor Summary
Constructors Constructor Description NoOpDatadogPropagation()
-
Method Summary
Modifier and Type Method Description <C extends Any> Unitinject(DatadogSpanContext context, C carrier, Function3<C, String, String, Unit> setter)Injects the span context into a specified carrier using the provided setter function. <C extends Any> DatadogSpanContextextract(C carrier, Function2<C, Function2<String, String, Boolean>, Unit> getter)Extracts a DatadogSpanContext from the provided carrier using the specified getter function. -
-
Method Detail
-
inject
<C extends Any> Unit inject(DatadogSpanContext context, C carrier, Function3<C, String, String, Unit> setter)
Injects the span context into a specified carrier using the provided setter function. This method facilitates the propagation of trace information across process boundaries or systems by embedding relevant span context data into the carrier.
- Parameters:
context- The DatadogSpanContext containing the trace and span information to inject.carrier- The carrier object where the trace information will be injected.setter- A function used to set key-value pairs into the carrier.
-
extract
<C extends Any> DatadogSpanContext extract(C carrier, Function2<C, Function2<String, String, Boolean>, Unit> getter)
Extracts a DatadogSpanContext from the provided carrier using the specified getter function. This method is used to propagate Datadog span context information across systems by retrieving trace and span information from the carrier.
- Parameters:
carrier- The carrier object from which the span context will be extracted.getter- A function that retrieves key-value pairs from the carrier, using a classifier function to match desired key-value pairs.
-
-
-
-