NVIDIA DeepStream SDK API Reference

9.2 Release
logs::LogRecord Class Referenceabstract

Detailed Description

Maintains a representation of a log in a format that can be processed by a recorder.

This class is thread-compatible.

Definition at line 28 of file includes/opentelemetry/logs/log_record.h.

Public Member Functions

virtual ~LogRecord ()=default
 
virtual void SetTimestamp (common::SystemTimestamp timestamp) noexcept=0
 Set the timestamp for this log. More...
 
virtual void SetObservedTimestamp (common::SystemTimestamp timestamp) noexcept=0
 Set the observed timestamp for this log. More...
 
virtual void SetSeverity (logs::Severity severity) noexcept=0
 Set the severity for this log. More...
 
virtual void SetBody (const common::AttributeValue &message) noexcept=0
 Set body field for this log. More...
 
virtual void SetAttribute (nostd::string_view key, const common::AttributeValue &value) noexcept=0
 Set an attribute of a log. More...
 
virtual void SetEventId (int64_t id, nostd::string_view name={}) noexcept=0
 Set the Event Id. More...
 
virtual void SetTraceId (const trace::TraceId &trace_id) noexcept=0
 Set the trace id for this log. More...
 
virtual void SetSpanId (const trace::SpanId &span_id) noexcept=0
 Set the span id for this log. More...
 
virtual void SetTraceFlags (const trace::TraceFlags &trace_flags) noexcept=0
 Inject trace_flags for this log. More...
 
virtual ~LogRecord ()=default
 
virtual void SetTimestamp (common::SystemTimestamp timestamp) noexcept=0
 Set the timestamp for this log. More...
 
virtual void SetObservedTimestamp (common::SystemTimestamp timestamp) noexcept=0
 Set the observed timestamp for this log. More...
 
virtual void SetSeverity (logs::Severity severity) noexcept=0
 Set the severity for this log. More...
 
virtual void SetBody (const common::AttributeValue &message) noexcept=0
 Set body field for this log. More...
 
virtual void SetAttribute (nostd::string_view key, const common::AttributeValue &value) noexcept=0
 Set an attribute of a log. More...
 
virtual void SetEventId (int64_t id, nostd::string_view name={}) noexcept=0
 Set the Event Id. More...
 
virtual void SetTraceId (const trace::TraceId &trace_id) noexcept=0
 Set the trace id for this log. More...
 
virtual void SetSpanId (const trace::SpanId &span_id) noexcept=0
 Set the span id for this log. More...
 
virtual void SetTraceFlags (const trace::TraceFlags &trace_flags) noexcept=0
 Inject trace_flags for this log. More...
 

Constructor & Destructor Documentation

◆ ~LogRecord() [1/2]

virtual logs::LogRecord::~LogRecord ( )
virtualdefault

◆ ~LogRecord() [2/2]

virtual logs::LogRecord::~LogRecord ( )
virtualdefault

Member Function Documentation

◆ SetAttribute() [1/2]

virtual void logs::LogRecord::SetAttribute ( nostd::string_view  key,
const common::AttributeValue &  value 
)
pure virtualnoexcept

Set an attribute of a log.

Parameters
keythe name of the attribute
valuethe attribute value

Referenced by logs::detail::LogRecordSetterTrait< ValueType >::Set().

◆ SetAttribute() [2/2]

virtual void logs::LogRecord::SetAttribute ( nostd::string_view  key,
const common::AttributeValue &  value 
)
pure virtualnoexcept

Set an attribute of a log.

Parameters
keythe name of the attribute
valuethe attribute value

◆ SetBody() [1/2]

virtual void logs::LogRecord::SetBody ( const common::AttributeValue &  message)
pure virtualnoexcept

Set body field for this log.

Parameters
messagethe body to set

Referenced by logs::detail::LogRecordSetterTrait< ValueType >::Set().

◆ SetBody() [2/2]

virtual void logs::LogRecord::SetBody ( const common::AttributeValue &  message)
pure virtualnoexcept

Set body field for this log.

Parameters
messagethe body to set

◆ SetEventId() [1/2]

virtual void logs::LogRecord::SetEventId ( int64_t  id,
nostd::string_view  name = {} 
)
pure virtualnoexcept

Set the Event Id.

Parameters
idThe event id to set
nameOptional event name to set

Referenced by logs::detail::LogRecordSetterTrait< EventId >::Set().

◆ SetEventId() [2/2]

virtual void logs::LogRecord::SetEventId ( int64_t  id,
nostd::string_view  name = {} 
)
pure virtualnoexcept

Set the Event Id.

Parameters
idThe event id to set
nameOptional event name to set

◆ SetObservedTimestamp() [1/2]

virtual void logs::LogRecord::SetObservedTimestamp ( common::SystemTimestamp  timestamp)
pure virtualnoexcept

Set the observed timestamp for this log.

Parameters
timestampthe timestamp to set

◆ SetObservedTimestamp() [2/2]

virtual void logs::LogRecord::SetObservedTimestamp ( common::SystemTimestamp  timestamp)
pure virtualnoexcept

Set the observed timestamp for this log.

Parameters
timestampthe timestamp to set

◆ SetSeverity() [1/2]

virtual void logs::LogRecord::SetSeverity ( logs::Severity  severity)
pure virtualnoexcept

Set the severity for this log.

Parameters
severitythe severity of the event

◆ SetSeverity() [2/2]

virtual void logs::LogRecord::SetSeverity ( logs::Severity  severity)
pure virtualnoexcept

Set the severity for this log.

Parameters
severitythe severity of the event

Referenced by logs::detail::LogRecordSetterTrait< Severity >::Set().

◆ SetSpanId() [1/2]

virtual void logs::LogRecord::SetSpanId ( const trace::SpanId &  span_id)
pure virtualnoexcept

Set the span id for this log.

Parameters
span_idthe span id to set

Referenced by logs::detail::LogRecordSetterTrait< trace::SpanContext >::Set(), and logs::detail::LogRecordSetterTrait< trace::SpanId >::Set().

◆ SetSpanId() [2/2]

virtual void logs::LogRecord::SetSpanId ( const trace::SpanId &  span_id)
pure virtualnoexcept

Set the span id for this log.

Parameters
span_idthe span id to set

◆ SetTimestamp() [1/2]

virtual void logs::LogRecord::SetTimestamp ( common::SystemTimestamp  timestamp)
pure virtualnoexcept

Set the timestamp for this log.

Parameters
timestampthe timestamp to set

◆ SetTimestamp() [2/2]

virtual void logs::LogRecord::SetTimestamp ( common::SystemTimestamp  timestamp)
pure virtualnoexcept

◆ SetTraceFlags() [1/2]

virtual void logs::LogRecord::SetTraceFlags ( const trace::TraceFlags &  trace_flags)
pure virtualnoexcept

Inject trace_flags for this log.

Parameters
trace_flagsthe trace flags to set

◆ SetTraceFlags() [2/2]

virtual void logs::LogRecord::SetTraceFlags ( const trace::TraceFlags &  trace_flags)
pure virtualnoexcept

Inject trace_flags for this log.

Parameters
trace_flagsthe trace flags to set

Referenced by logs::detail::LogRecordSetterTrait< trace::TraceFlags >::Set().

◆ SetTraceId() [1/2]

virtual void logs::LogRecord::SetTraceId ( const trace::TraceId &  trace_id)
pure virtualnoexcept

Set the trace id for this log.

Parameters
trace_idthe trace id to set

Referenced by logs::detail::LogRecordSetterTrait< trace::TraceId >::Set().

◆ SetTraceId() [2/2]

virtual void logs::LogRecord::SetTraceId ( const trace::TraceId &  trace_id)
pure virtualnoexcept

Set the trace id for this log.

Parameters
trace_idthe trace id to set

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