Interface Tracer
- All Superinterfaces:
AutoCloseable,Closeable,TransportTracer
- All Known Implementing Classes:
NoopTracer
Tracer is the interface used to create a
Span
It automatically handles the context propagation between threads, tasks, nodes etc.
All methods on the Tracer object are multi-thread safe.
- Opensearch.experimental:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the current span.booleanTells if the traces are being recorded or notstartScopedSpan(SpanCreationContext spanCreationContext) Start the span and scoped it.startSpan(SpanCreationContext context) Starts theSpanwith givenSpanCreationContextwithSpanInScope(Span span) Creates the Span Scope for a current thread.Methods inherited from interface org.opensearch.telemetry.tracing.transport.TransportTracer
startSpan
-
Method Details
-
startSpan
Starts theSpanwith givenSpanCreationContext- Parameters:
context- span context- Returns:
- span, must be closed.
-
getCurrentSpan
-
startScopedSpan
-
withSpanInScope
-
isRecording
boolean isRecording()Tells if the traces are being recorded or not- Returns:
- boolean
-