|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
9 #include <condition_variable>
15 #include "opentelemetry/sdk/common/circular_buffer.h"
16 #include "opentelemetry/sdk/trace/batch_span_processor_options.h"
17 #include "opentelemetry/sdk/trace/batch_span_processor_runtime_options.h"
18 #include "opentelemetry/sdk/trace/exporter.h"
19 #include "opentelemetry/sdk/trace/processor.h"
20 #include "opentelemetry/sdk/trace/recordable.h"
21 #include "opentelemetry/trace/span_context.h"
22 #include "opentelemetry/version.h"
75 const opentelemetry::trace::SpanContext &parent_context) noexcept
override;
82 void OnEnd(std::unique_ptr<Recordable> &&span) noexcept
override;
167 const std::unique_ptr<SpanExporter> &
exporter,
168 const std::shared_ptr<SynchronizationData> &synchronization_data);
171 std::chrono::time_point<std::chrono::system_clock> &start_time);
181 opentelemetry::sdk::common::CircularBuffer<Recordable>
buffer_;
opentelemetry::sdk::common::CircularBuffer< Recordable > buffer_
std::mutex force_flush_cv_m
bool Shutdown(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override
Shuts down the processor and does any cleanup required.
Maintains a representation of a span in a format that can be processed by a recorder.
virtual void Export()
Exports all ended spans to the configured exporter.
std::thread worker_thread_
std::condition_variable cv
Struct to hold batch SpanProcessor options.
void DrainQueue()
Called when Shutdown() is invoked.
const std::chrono::milliseconds schedule_delay_millis_
Struct to hold batch SpanProcessor runtime options.
void DoBackgroundWork()
The background routine performed by the worker thread.
std::unique_ptr< SpanExporter > exporter_
const size_t max_queue_size_
#define OPENTELEMETRY_BEGIN_NAMESPACE
std::shared_ptr< sdk::common::ThreadInstrumentation > worker_thread_instrumentation_
bool ForceFlush(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override
Export all ended spans that have not been exported yet.
int max(int a, int b)
Compute the component-wise maximum.
std::condition_variable force_flush_cv
~BatchSpanProcessor() override
Class destructor which invokes the Shutdown() method.
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 ...
std::atomic< bool > is_shutdown
#define OPENTELEMETRY_END_NAMESPACE
void OnEnd(std::unique_ptr< Recordable > &&span) noexcept override
Called when a span ends.
std::shared_ptr< SynchronizationData > synchronization_data_
void GetWaitAdjustedTime(std::chrono::microseconds &timeout, std::chrono::time_point< std::chrono::system_clock > &start_time)
void OnStart(Recordable &span, const opentelemetry::trace::SpanContext &parent_context) noexcept override
Called when a span is started.
std::atomic< bool > is_force_wakeup_background_worker
std::atomic< uint64_t > force_flush_pending_sequence
const size_t max_export_batch_size_
This is an implementation of the SpanProcessor which creates batches of finished spans and passes the...
std::unique_ptr< Recordable > MakeRecordable() noexcept override
Requests a Recordable(Span) from the configured exporter.
Span processor allow hooks for span start and end method invocations.
std::atomic< std::chrono::microseconds::rep > force_flush_timeout_us
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.
std::atomic< uint64_t > force_flush_notified_sequence
bool InternalShutdown(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept
Shuts down the processor and does any cleanup required.