Class OpenTelemetryAgentSpanContext
Object
OpenTelemetryAgentSpanContext
- All Implemented Interfaces:
SpanContext
This is exactly the same as the
OpenTelemetrySpanContextSupplier
. However, the
io.opentelemetry.api
package is relocated to
io.opentelemetry.javaagent.shaded.io.opentelemetry.api
in the OpenTelemetry agent.-
Field Summary
Fields inherited from interface SpanContext
EXEMPLAR_ATTRIBUTE_NAME, EXEMPLAR_ATTRIBUTE_VALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
boolean
void
-
Constructor Details
-
OpenTelemetryAgentSpanContext
public OpenTelemetryAgentSpanContext()
-
-
Method Details
-
isAvailable
-
getCurrentTraceId
- Specified by:
getCurrentTraceId
in interfaceSpanContext
- Returns:
- the current trace id, or
null
if this call is not happening within a span context.
-
getCurrentSpanId
- Specified by:
getCurrentSpanId
in interfaceSpanContext
- Returns:
- the current span id, or
null
if this call is not happening within a span context.
-
isCurrentSpanSampled
- Specified by:
isCurrentSpanSampled
in interfaceSpanContext
- Returns:
- the state of the current Span. If this value is false a component before in the chain take the decision to not record it. Subsequent calling service have to respect this value in order not to have partial TraceID with only some Span in it. This value is important to be sure to choose a recorded Trace in Examplar sampling process
-
markCurrentSpanAsExemplar
- Specified by:
markCurrentSpanAsExemplar
in interfaceSpanContext
-