NVIDIA DeepStream SDK API Reference

9.2 Release
sdk::logs::LogRecordExporter Class Referenceabstract

Detailed Description

LogRecordExporter defines the interface that log exporters must implement.

Definition at line 22 of file includes/opentelemetry/sdk/logs/exporter.h.

Public Member Functions

 LogRecordExporter ()
 
virtual ~LogRecordExporter ()
 
virtual std::unique_ptr< Recordable > MakeRecordable () noexcept=0
 Create a log recordable. More...
 
virtual sdk::common::ExportResult Export (const nostd::span< std::unique_ptr< Recordable >> &records) noexcept=0
 Exports the batch of log records to their export destination. More...
 
virtual bool ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Force flush the log records pushed into this log exporter. More...
 
virtual bool Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Marks the exporter as ShutDown and cleans up any resources as required. More...
 
 LogRecordExporter ()
 
virtual ~LogRecordExporter ()
 
virtual std::unique_ptr< Recordable > MakeRecordable () noexcept=0
 Create a log recordable. More...
 
virtual sdk::common::ExportResult Export (const nostd::span< std::unique_ptr< Recordable >> &records) noexcept=0
 Exports the batch of log records to their export destination. More...
 
virtual bool ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Force flush the log records pushed into this log exporter. More...
 
virtual bool Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Marks the exporter as ShutDown and cleans up any resources as required. More...
 

Constructor & Destructor Documentation

◆ LogRecordExporter() [1/2]

sdk::logs::LogRecordExporter::LogRecordExporter ( )

◆ ~LogRecordExporter() [1/2]

virtual sdk::logs::LogRecordExporter::~LogRecordExporter ( )
virtual

◆ LogRecordExporter() [2/2]

sdk::logs::LogRecordExporter::LogRecordExporter ( )

◆ ~LogRecordExporter() [2/2]

virtual sdk::logs::LogRecordExporter::~LogRecordExporter ( )
virtual

Member Function Documentation

◆ Export() [1/2]

virtual sdk::common::ExportResult sdk::logs::LogRecordExporter::Export ( const nostd::span< std::unique_ptr< Recordable >> &  records)
pure virtualnoexcept

Exports the batch of log records to their export destination.

This method must not be called concurrently for the same exporter instance. The exporter may attempt to retry sending the batch, but should drop and return kFailure after a certain timeout.

Parameters
recordsa span of unique pointers to log records
Returns
an ExportResult code (whether export was success or failure)

◆ Export() [2/2]

virtual sdk::common::ExportResult sdk::logs::LogRecordExporter::Export ( const nostd::span< std::unique_ptr< Recordable >> &  records)
pure virtualnoexcept

Exports the batch of log records to their export destination.

This method must not be called concurrently for the same exporter instance. The exporter may attempt to retry sending the batch, but should drop and return kFailure after a certain timeout.

Parameters
recordsa span of unique pointers to log records
Returns
an ExportResult code (whether export was success or failure)

◆ ForceFlush() [1/2]

virtual bool sdk::logs::LogRecordExporter::ForceFlush ( std::chrono::microseconds  timeout = (std::chrono::microseconds::max)())
pure virtualnoexcept

Force flush the log records pushed into this log exporter.

◆ ForceFlush() [2/2]

virtual bool sdk::logs::LogRecordExporter::ForceFlush ( std::chrono::microseconds  timeout = (std::chrono::microseconds::max)())
pure virtualnoexcept

Force flush the log records pushed into this log exporter.

◆ MakeRecordable() [1/2]

virtual std::unique_ptr<Recordable> sdk::logs::LogRecordExporter::MakeRecordable ( )
pure virtualnoexcept

Create a log recordable.

This object will be used to record log data and will subsequently be passed to LogRecordExporter::Export. Vendors can implement custom recordables or use the default ReadWriteLogRecord recordable provided by the SDK.

Returns
a newly initialized Recordable object

Note: This method must be callable from multiple threads.

◆ MakeRecordable() [2/2]

virtual std::unique_ptr<Recordable> sdk::logs::LogRecordExporter::MakeRecordable ( )
pure virtualnoexcept

Create a log recordable.

This object will be used to record log data and will subsequently be passed to LogRecordExporter::Export. Vendors can implement custom recordables or use the default ReadWriteLogRecord recordable provided by the SDK.

Returns
a newly initialized Recordable object

Note: This method must be callable from multiple threads.

◆ Shutdown() [1/2]

virtual bool sdk::logs::LogRecordExporter::Shutdown ( std::chrono::microseconds  timeout = (std::chrono::microseconds::max)())
pure virtualnoexcept

Marks the exporter as ShutDown and cleans up any resources as required.

Shutdown should be called only once for each Exporter instance.

Parameters
timeoutminimum amount of microseconds to wait for shutdown before giving up and returning failure.
Returns
true if the exporter shutdown succeeded, false otherwise

◆ Shutdown() [2/2]

virtual bool sdk::logs::LogRecordExporter::Shutdown ( std::chrono::microseconds  timeout = (std::chrono::microseconds::max)())
pure virtualnoexcept

Marks the exporter as ShutDown and cleans up any resources as required.

Shutdown should be called only once for each Exporter instance.

Parameters
timeoutminimum amount of microseconds to wait for shutdown before giving up and returning failure.
Returns
true if the exporter shutdown succeeded, false otherwise

The documentation for this class was generated from the following file: