|
|
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/logs/batch_log_record_processor_options.h"
17 #include "opentelemetry/sdk/logs/batch_log_record_processor_runtime_options.h"
18 #include "opentelemetry/sdk/logs/exporter.h"
19 #include "opentelemetry/sdk/logs/processor.h"
20 #include "opentelemetry/sdk/logs/recordable.h"
21 #include "opentelemetry/version.h"
49 std::unique_ptr<LogRecordExporter> &&
exporter,
50 const size_t max_queue_size = 2048,
51 const std::chrono::milliseconds scheduled_delay_millis = std::chrono::milliseconds(5000),
52 const size_t max_export_batch_size = 512);
84 void OnEmit(std::unique_ptr<Recordable> &&record) noexcept
override;
162 const std::unique_ptr<LogRecordExporter> &
exporter,
163 const std::shared_ptr<SynchronizationData> &synchronization_data);
166 std::chrono::time_point<std::chrono::system_clock> &start_time);
176 opentelemetry::sdk::common::CircularBuffer<Recordable>
buffer_;
std::atomic< std::chrono::microseconds::rep > force_flush_timeout_us
std::condition_variable force_flush_cv
Struct to hold batch SpanProcessor runtime options.
std::mutex force_flush_cv_m
void DrainQueue()
Called when Shutdown() is invoked.
bool Shutdown(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override
Shuts down the processor and does any cleanup required.
Struct to hold batch LogRecordProcessor options.
const size_t max_queue_size_
std::atomic< uint64_t > force_flush_pending_sequence
std::shared_ptr< SynchronizationData > synchronization_data_
bool InternalShutdown(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept
Shuts down the processor and does any cleanup required.
std::unique_ptr< LogRecordExporter > exporter_
const size_t max_export_batch_size_
#define OPENTELEMETRY_BEGIN_NAMESPACE
void OnEmit(std::unique_ptr< Recordable > &&record) noexcept override
Called when the Logger's log method creates a log record.
virtual void Export()
Exports all logs to the configured exporter.
std::thread worker_thread_
std::condition_variable cv
std::shared_ptr< sdk::common::ThreadInstrumentation > worker_thread_instrumentation_
std::atomic< bool > is_force_wakeup_background_worker
int max(int a, int b)
Compute the component-wise maximum.
#define OPENTELEMETRY_END_NAMESPACE
std::atomic< uint64_t > force_flush_notified_sequence
void GetWaitAdjustedTime(std::chrono::microseconds &timeout, std::chrono::time_point< std::chrono::system_clock > &start_time)
BatchLogRecordProcessor(std::unique_ptr< LogRecordExporter > &&exporter, const size_t max_queue_size=2048, const std::chrono::milliseconds scheduled_delay_millis=std::chrono::milliseconds(5000), const size_t max_export_batch_size=512)
Creates a batch log processor by configuring the specified exporter and other parameters as per the o...
void DoBackgroundWork()
The background routine performed by the worker thread.
~BatchLogRecordProcessor() override
Class destructor which invokes the Shutdown() method.
opentelemetry::sdk::common::CircularBuffer< Recordable > buffer_
static void NotifyCompletion(uint64_t notify_force_flush, const std::unique_ptr< LogRecordExporter > &exporter, const std::shared_ptr< SynchronizationData > &synchronization_data)
Notify completion of shutdown and force flush.
This is an implementation of the LogRecordProcessor which creates batches of finished logs and passes...
const std::chrono::milliseconds scheduled_delay_millis_
std::atomic< bool > is_shutdown
bool ForceFlush(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept override
Export all log records that have not been exported yet.
std::unique_ptr< Recordable > MakeRecordable() noexcept override
Makes a new recordable.
The Log Processor is responsible for passing log records to the configured exporter.