NVIDIA DeepStream SDK API Reference

9.2 Release
sdk::logs::LogRecordProcessor Class Referenceabstract

Detailed Description

The Log Processor is responsible for passing log records to the configured exporter.

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

Inheritance diagram for sdk::logs::LogRecordProcessor:

Public Member Functions

virtual ~LogRecordProcessor ()=default
 
virtual std::unique_ptr< Recordable > MakeRecordable () noexcept=0
 Create a log recordable. More...
 
virtual void OnEmit (std::unique_ptr< Recordable > &&record) noexcept=0
 OnEmit is called by the SDK once a log record has been successfully created. More...
 
virtual bool ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Exports all log records that have not yet been exported to the configured Exporter. More...
 
virtual bool Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Shuts down the processor and does any cleanup required. More...
 
virtual ~LogRecordProcessor ()=default
 
virtual std::unique_ptr< Recordable > MakeRecordable () noexcept=0
 Create a log recordable. More...
 
virtual void OnEmit (std::unique_ptr< Recordable > &&record) noexcept=0
 OnEmit is called by the SDK once a log record has been successfully created. More...
 
virtual bool ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Exports all log records that have not yet been exported to the configured Exporter. More...
 
virtual bool Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Shuts down the processor and does any cleanup required. More...
 

Constructor & Destructor Documentation

◆ ~LogRecordProcessor() [1/2]

virtual sdk::logs::LogRecordProcessor::~LogRecordProcessor ( )
virtualdefault

◆ ~LogRecordProcessor() [2/2]

virtual sdk::logs::LogRecordProcessor::~LogRecordProcessor ( )
virtualdefault

Member Function Documentation

◆ ForceFlush() [1/2]

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

Exports all log records that have not yet been exported to the configured Exporter.

Parameters
timeoutthat the forceflush is required to finish within.
Returns
a result code indicating whether it succeeded, failed or timed out

Implemented in sdk::logs::BatchLogRecordProcessor, sdk::logs::BatchLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, and sdk::logs::SimpleLogRecordProcessor.

◆ ForceFlush() [2/2]

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

Exports all log records that have not yet been exported to the configured Exporter.

Parameters
timeoutthat the forceflush is required to finish within.
Returns
a result code indicating whether it succeeded, failed or timed out

Implemented in sdk::logs::BatchLogRecordProcessor, sdk::logs::BatchLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, and sdk::logs::SimpleLogRecordProcessor.

◆ MakeRecordable() [1/2]

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

Create a log recordable.

This requests a new log recordable from the associated exporter.

Returns
a newly initialized recordable

Note: This method must be callable from multiple threads.

Implemented in sdk::logs::BatchLogRecordProcessor, sdk::logs::BatchLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, and sdk::logs::MultiLogRecordProcessor.

◆ MakeRecordable() [2/2]

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

Create a log recordable.

This requests a new log recordable from the associated exporter.

Returns
a newly initialized recordable

Note: This method must be callable from multiple threads.

Implemented in sdk::logs::BatchLogRecordProcessor, sdk::logs::BatchLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, and sdk::logs::MultiLogRecordProcessor.

◆ OnEmit() [1/2]

virtual void sdk::logs::LogRecordProcessor::OnEmit ( std::unique_ptr< Recordable > &&  record)
pure virtualnoexcept

OnEmit is called by the SDK once a log record has been successfully created.

Parameters
recordthe log recordable object

Implemented in sdk::logs::BatchLogRecordProcessor, sdk::logs::BatchLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, and sdk::logs::SimpleLogRecordProcessor.

◆ OnEmit() [2/2]

virtual void sdk::logs::LogRecordProcessor::OnEmit ( std::unique_ptr< Recordable > &&  record)
pure virtualnoexcept

OnEmit is called by the SDK once a log record has been successfully created.

Parameters
recordthe log recordable object

Implemented in sdk::logs::BatchLogRecordProcessor, sdk::logs::BatchLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, and sdk::logs::SimpleLogRecordProcessor.

◆ Shutdown() [1/2]

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

Shuts down the processor and does any cleanup required.

ShutDown should only be called once for each processor.

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

Implemented in sdk::logs::BatchLogRecordProcessor, sdk::logs::BatchLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, and sdk::logs::SimpleLogRecordProcessor.

◆ Shutdown() [2/2]

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

Shuts down the processor and does any cleanup required.

ShutDown should only be called once for each processor.

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

Implemented in sdk::logs::BatchLogRecordProcessor, sdk::logs::BatchLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::MultiLogRecordProcessor, sdk::logs::SimpleLogRecordProcessor, and sdk::logs::SimpleLogRecordProcessor.


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