-
public interface DatadogTracerDatadogTracer is a simple, thin interface for span creation and propagation across arbitrary transports.
-
-
Method Summary
Modifier and Type Method Description abstract DatadogSpanactiveSpan()Retrieves the currently active span in the context of the tracer. DatadogPropagationpropagate()Provides an implementation of the DatadogPropagation interface to be used for span propagation. abstract DatadogScopeactivateSpan(DatadogSpan span)Activates the provided span within the current context of the tracer. abstract DatadogSpanBuilderbuildSpan(CharSequence spanName)Creates a new span builder instance with the specified span name. abstract DatadogSpanBuilderbuildSpan(String instrumentationName, CharSequence spanName)Creates a new span builder instance with the specified instrumentation and span names. abstract UnitaddScopeListener(DatadogScopeListener scopeListener)Adds a listener to be notified when a scope is activated or closed. -
-
Method Detail
-
activeSpan
abstract DatadogSpan activeSpan()
Retrieves the currently active span in the context of the tracer.
-
propagate
DatadogPropagation propagate()
Provides an implementation of the DatadogPropagation interface to be used for span propagation.
-
activateSpan
abstract DatadogScope activateSpan(DatadogSpan span)
Activates the provided span within the current context of the tracer. Once activated, the span becomes the currently active span, and any operations requiring an active span will use this one until it is explicitly deactivated.
- Parameters:
span- The span to be activated.
-
buildSpan
abstract DatadogSpanBuilder buildSpan(CharSequence spanName)
Creates a new span builder instance with the specified span name.
- Parameters:
spanName- The name of the span to be built.
-
buildSpan
abstract DatadogSpanBuilder buildSpan(String instrumentationName, CharSequence spanName)
Creates a new span builder instance with the specified instrumentation and span names.
- Parameters:
instrumentationName- The name of the instrumentation associated with the span.spanName- The name of the span to be built.
-
addScopeListener
abstract Unit addScopeListener(DatadogScopeListener scopeListener)
Adds a listener to be notified when a scope is activated or closed.
- Parameters:
scopeListener- The listener to be added.
-
-
-
-