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 |
|---|---|
void |
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(ReadableSpan span)
Called when a
Span is started, if the Span.isRecording()
returns true. |
void |
shutdown()
Called when
TracerSdkProvider.shutdown() is called. |
void onStart(ReadableSpan 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.void shutdown()
TracerSdkProvider.shutdown() is called.
Implementations must ensure that all span events are processed before returning.
void forceFlush()
This method is called synchronously on the execution thread, and should not throw exceptions.