This is an implementation of the SpanProcessor which creates batches of finished spans and passes the export-friendly span data representations to the configured SpanExporter.
Definition at line 34 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.


Data Structures | |
| struct | SynchronizationData |
Public Member Functions | |
| BatchSpanProcessor (std::unique_ptr< SpanExporter > &&exporter, const BatchSpanProcessorOptions &options) | |
| Creates a batch span processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| BatchSpanProcessor (std::unique_ptr< SpanExporter > &&exporter, const BatchSpanProcessorOptions &options, const BatchSpanProcessorRuntimeOptions &runtime_options) | |
| Creates a batch span processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| std::unique_ptr< Recordable > | MakeRecordable () noexcept override |
| Requests a Recordable(Span) from the configured exporter. More... | |
| void | OnStart (Recordable &span, const opentelemetry::trace::SpanContext &parent_context) noexcept override |
| Called when a span is started. More... | |
| void | OnEnd (std::unique_ptr< Recordable > &&span) noexcept override |
| Called when a span ends. More... | |
| bool | ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override |
| Export all ended spans that have not been exported yet. More... | |
| bool | Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override |
| Shuts down the processor and does any cleanup required. More... | |
| ~BatchSpanProcessor () override | |
| Class destructor which invokes the Shutdown() method. More... | |
| BatchSpanProcessor (std::unique_ptr< SpanExporter > &&exporter, const BatchSpanProcessorOptions &options) | |
| Creates a batch span processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| BatchSpanProcessor (std::unique_ptr< SpanExporter > &&exporter, const BatchSpanProcessorOptions &options, const BatchSpanProcessorRuntimeOptions &runtime_options) | |
| Creates a batch span processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs. More... | |
| std::unique_ptr< Recordable > | MakeRecordable () noexcept override |
| Requests a Recordable(Span) from the configured exporter. More... | |
| void | OnStart (Recordable &span, const opentelemetry::trace::SpanContext &parent_context) noexcept override |
| Called when a span is started. More... | |
| void | OnEnd (std::unique_ptr< Recordable > &&span) noexcept override |
| Called when a span ends. More... | |
| bool | ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override |
| Export all ended spans that have not been exported yet. More... | |
| bool | Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override |
| Shuts down the processor and does any cleanup required. More... | |
| ~BatchSpanProcessor () override | |
| Class destructor which invokes the Shutdown() method. More... | |
Protected Member Functions | |
| bool | InternalShutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept |
| Shuts down the processor and does any cleanup required. More... | |
| void | DoBackgroundWork () |
| The background routine performed by the worker thread. More... | |
| virtual void | Export () |
| Exports all ended spans to the configured exporter. More... | |
| void | DrainQueue () |
| Called when Shutdown() is invoked. More... | |
| void | GetWaitAdjustedTime (std::chrono::microseconds &timeout, std::chrono::time_point< std::chrono::system_clock > &start_time) |
| bool | InternalShutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept |
| Shuts down the processor and does any cleanup required. More... | |
| void | DoBackgroundWork () |
| The background routine performed by the worker thread. More... | |
| virtual void | Export () |
| Exports all ended spans to the configured exporter. More... | |
| void | DrainQueue () |
| Called when Shutdown() is invoked. More... | |
| void | GetWaitAdjustedTime (std::chrono::microseconds &timeout, std::chrono::time_point< std::chrono::system_clock > &start_time) |
Static Protected Member Functions | |
| static void | NotifyCompletion (uint64_t notify_force_flush, const std::unique_ptr< SpanExporter > &exporter, const std::shared_ptr< SynchronizationData > &synchronization_data) |
| Notify completion of shutdown and force flush. More... | |
| static void | NotifyCompletion (uint64_t notify_force_flush, const std::unique_ptr< SpanExporter > &exporter, const std::shared_ptr< SynchronizationData > &synchronization_data) |
| Notify completion of shutdown and force flush. More... | |
Protected Attributes | |
| std::unique_ptr< SpanExporter > | exporter_ |
| const size_t | max_queue_size_ |
| const std::chrono::milliseconds | schedule_delay_millis_ |
| const size_t | max_export_batch_size_ |
| opentelemetry::sdk::common::CircularBuffer< Recordable > | buffer_ |
| std::shared_ptr< SynchronizationData > | synchronization_data_ |
| std::shared_ptr< sdk::common::ThreadInstrumentation > | worker_thread_instrumentation_ |
| std::thread | worker_thread_ |
| sdk::trace::BatchSpanProcessor::BatchSpanProcessor | ( | std::unique_ptr< SpanExporter > && | exporter, |
| const BatchSpanProcessorOptions & | options | ||
| ) |
Creates a batch span processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | The backend exporter to pass the ended spans to. |
| options | The batch SpanProcessor configuration options. |
| sdk::trace::BatchSpanProcessor::BatchSpanProcessor | ( | std::unique_ptr< SpanExporter > && | exporter, |
| const BatchSpanProcessorOptions & | options, | ||
| const BatchSpanProcessorRuntimeOptions & | runtime_options | ||
| ) |
Creates a batch span processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | The backend exporter to pass the ended spans to. |
| options | The batch SpanProcessor configuration options. |
| runtime_options | The batch SpanProcessor runtime options. |
|
override |
Class destructor which invokes the Shutdown() method.
The Shutdown() method is supposed to be invoked when the Tracer is shutdown (as per other languages), but the C++ Tracer only takes shared ownership of the processor, and thus doesn't call Shutdown (as the processor might be shared with other Tracers).
| sdk::trace::BatchSpanProcessor::BatchSpanProcessor | ( | std::unique_ptr< SpanExporter > && | exporter, |
| const BatchSpanProcessorOptions & | options | ||
| ) |
Creates a batch span processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | The backend exporter to pass the ended spans to. |
| options | The batch SpanProcessor configuration options. |
| sdk::trace::BatchSpanProcessor::BatchSpanProcessor | ( | std::unique_ptr< SpanExporter > && | exporter, |
| const BatchSpanProcessorOptions & | options, | ||
| const BatchSpanProcessorRuntimeOptions & | runtime_options | ||
| ) |
Creates a batch span processor by configuring the specified exporter and other parameters as per the official, language-agnostic opentelemetry specs.
| exporter | The backend exporter to pass the ended spans to. |
| options | The batch SpanProcessor configuration options. |
| runtime_options | The batch SpanProcessor runtime options. |
|
override |
Class destructor which invokes the Shutdown() method.
The Shutdown() method is supposed to be invoked when the Tracer is shutdown (as per other languages), but the C++ Tracer only takes shared ownership of the processor, and thus doesn't call Shutdown (as the processor might be shared with other Tracers).
|
protected |
The background routine performed by the worker thread.
|
protected |
The background routine performed by the worker thread.
|
protected |
Called when Shutdown() is invoked.
Completely drains the queue of all its ended spans and passes them to the exporter.
|
protected |
Called when Shutdown() is invoked.
Completely drains the queue of all its ended spans and passes them to the exporter.
|
protectedvirtual |
Exports all ended spans to the configured exporter.
|
protectedvirtual |
Exports all ended spans to the configured exporter.
|
overridevirtualnoexcept |
Export all ended spans that have not been exported yet.
NOTE: Timeout functionality not supported yet.
Implements sdk::trace::SpanProcessor.
|
overridevirtualnoexcept |
Export all ended spans that have not been exported yet.
NOTE: Timeout functionality not supported yet.
Implements sdk::trace::SpanProcessor.
|
protected |
|
protected |
|
protectednoexcept |
Shuts down the processor and does any cleanup required.
Completely drains the buffer/queue of all its ended spans and passes them to the exporter.
| timeout | minimum amount of microseconds to wait for shutdown before giving up and returning failure. |
|
protectednoexcept |
Shuts down the processor and does any cleanup required.
Completely drains the buffer/queue of all its ended spans and passes them to the exporter.
| timeout | minimum amount of microseconds to wait for shutdown before giving up and returning failure. |
|
overridevirtualnoexcept |
Requests a Recordable(Span) from the configured exporter.
Implements sdk::trace::SpanProcessor.
|
overridevirtualnoexcept |
Requests a Recordable(Span) from the configured exporter.
Implements sdk::trace::SpanProcessor.
|
staticprotected |
Notify completion of shutdown and force flush.
This may be called from the any thread at any time
| notify_force_flush | Sequence to indicate whether to notify force flush completion. |
| synchronization_data | Synchronization data to be notified. |
|
staticprotected |
Notify completion of shutdown and force flush.
This may be called from the any thread at any time
| notify_force_flush | Sequence to indicate whether to notify force flush completion. |
| synchronization_data | Synchronization data to be notified. |
|
overridevirtualnoexcept |
Called when a span ends.
| span | - A recordable for a span that just ended |
Implements sdk::trace::SpanProcessor.
|
overridevirtualnoexcept |
Called when a span ends.
| span | - A recordable for a span that just ended |
Implements sdk::trace::SpanProcessor.
|
overridevirtualnoexcept |
Called when a span is started.
NOTE: This method is a no-op.
| span | - The span that just started |
| parent_context | - The parent context of the span that just started |
Implements sdk::trace::SpanProcessor.
|
overridevirtualnoexcept |
Called when a span is started.
NOTE: This method is a no-op.
| span | - The span that just started |
| parent_context | - The parent context of the span that just started |
Implements sdk::trace::SpanProcessor.
|
overridevirtualnoexcept |
Shuts down the processor and does any cleanup required.
Completely drains the buffer/queue of all its ended spans and passes them to the exporter.
| timeout | minimum amount of microseconds to wait for shutdown before giving up and returning failure. |
Implements sdk::trace::SpanProcessor.
|
overridevirtualnoexcept |
Shuts down the processor and does any cleanup required.
Completely drains the buffer/queue of all its ended spans and passes them to the exporter.
| timeout | minimum amount of microseconds to wait for shutdown before giving up and returning failure. |
Implements sdk::trace::SpanProcessor.
|
protected |
Definition at line 181 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.
|
protected |
Definition at line 173 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.
|
protected |
Definition at line 178 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.
|
protected |
Definition at line 176 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.
|
protected |
Definition at line 177 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.
|
protected |
Definition at line 183 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.
|
protected |
Definition at line 187 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.
|
protected |
Definition at line 186 of file includes/opentelemetry/sdk/trace/batch_span_processor.h.