Span processor allow hooks for span start and end method invocations.
Built-in span processors are responsible for batching and conversion of spans to exportable representation and passing batches to exporters.
Definition at line 29 of file includes/opentelemetry/sdk/trace/processor.h.

Public Member Functions | |
| virtual | ~SpanProcessor ()=default |
| virtual std::unique_ptr< Recordable > | MakeRecordable () noexcept=0 |
| Create a span recordable. More... | |
| virtual void | OnStart (Recordable &span, const opentelemetry::trace::SpanContext &parent_context) noexcept=0 |
| OnStart is called when a span is started. More... | |
| virtual void | OnEnd (std::unique_ptr< Recordable > &&span) noexcept=0 |
| OnEnd is called when a span is ended. More... | |
| virtual bool | ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0 |
| Export all ended spans that have not yet been exported. More... | |
| virtual bool | Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0 |
| Shut down the processor and do any cleanup required. More... | |
| virtual | ~SpanProcessor ()=default |
| virtual std::unique_ptr< Recordable > | MakeRecordable () noexcept=0 |
| Create a span recordable. More... | |
| virtual void | OnStart (Recordable &span, const opentelemetry::trace::SpanContext &parent_context) noexcept=0 |
| OnStart is called when a span is started. More... | |
| virtual void | OnEnd (std::unique_ptr< Recordable > &&span) noexcept=0 |
| OnEnd is called when a span is ended. More... | |
| virtual bool | ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0 |
| Export all ended spans that have not yet been exported. More... | |
| virtual bool | Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0 |
| Shut down the processor and do any cleanup required. More... | |
|
virtualdefault |
|
virtualdefault |
|
pure virtualnoexcept |
Export all ended spans that have not yet been exported.
| timeout | an optional timeout, the default timeout means that no timeout is applied. |
Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
Export all ended spans that have not yet been exported.
| timeout | an optional timeout, the default timeout means that no timeout is applied. |
Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
Create a span recordable.
This requests a new span recordable from the associated exporter.
Note: This method must be callable from multiple threads.
Implemented in sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
Create a span recordable.
This requests a new span recordable from the associated exporter.
Note: This method must be callable from multiple threads.
Implemented in sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
OnEnd is called when a span is ended.
| span | a recordable for a span that was ended |
Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
OnEnd is called when a span is ended.
| span | a recordable for a span that was ended |
Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
OnStart is called when a span is started.
| span | a recordable for a span that was just started |
| parent_context | The parent context of the span that just started |
Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
OnStart is called when a span is started.
| span | a recordable for a span that was just started |
| parent_context | The parent context of the span that just started |
Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
Shut down the processor and do any cleanup required.
Ended spans are exported before shutdown. After the call to Shutdown, subsequent calls to OnStart, OnEnd, ForceFlush or Shutdown will return immediately without doing anything.
| timeout | an optional timeout, the default timeout means that no timeout is applied. |
Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.
|
pure virtualnoexcept |
Shut down the processor and do any cleanup required.
Ended spans are exported before shutdown. After the call to Shutdown, subsequent calls to OnStart, OnEnd, ForceFlush or Shutdown will return immediately without doing anything.
| timeout | an optional timeout, the default timeout means that no timeout is applied. |
Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.