public interface SpanProcessor
TracerSdk uses to allow synchronous hooks for when a
Span is started or when a Span is ended.| Modifier and Type | Method and Description |
|---|---|
io.opentelemetry.sdk.common.CompletableResultCode |
forceFlush()
Processes all span events that have not yet been processed.
|
boolean |
isEndRequired()
Returns
true if this SpanProcessor requires end events. |
boolean |
isStartRequired()
Returns
true if this SpanProcessor requires start events. |
void |
onEnd(ReadableSpan span)
Called when a
Span is ended, if the Span.isRecording()
returns true. |
void |
onStart(ReadWriteSpan span)
Called when a
Span is started, if the Span.isRecording()
returns true. |
io.opentelemetry.sdk.common.CompletableResultCode |
shutdown()
Processes all span events that have not yet been processed and closes used resources.
|
void onStart(ReadWriteSpan span)
Span is started, if the Span.isRecording()
returns true.
This method is called synchronously on the execution thread, should not throw or block the execution thread.
span - the ReadableSpan that just started.boolean isStartRequired()
true if this SpanProcessor requires start events.true if this SpanProcessor requires start events.void onEnd(ReadableSpan span)
Span is ended, if the Span.isRecording()
returns true.
This method is called synchronously on the execution thread, should not throw or block the execution thread.
span - the ReadableSpan that just ended.boolean isEndRequired()
true if this SpanProcessor requires end events.true if this SpanProcessor requires end events.io.opentelemetry.sdk.common.CompletableResultCode shutdown()
CompletableResultCode which completes when shutdown is finished.io.opentelemetry.sdk.common.CompletableResultCode forceFlush()
CompletableResultCode which completes when currently queued spans are
finished processing.