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... | |
|
virtualdefault |
|
virtualdefault |
|
pure virtualnoexcept |
Set an attribute of a log.
| key | the name of the attribute |
| value | the attribute value |
Referenced by logs::detail::LogRecordSetterTrait< ValueType >::Set().
|
pure virtualnoexcept |
Set an attribute of a log.
| key | the name of the attribute |
| value | the attribute value |
|
pure virtualnoexcept |
Set body field for this log.
| message | the body to set |
Referenced by logs::detail::LogRecordSetterTrait< ValueType >::Set().
|
pure virtualnoexcept |
Set body field for this log.
| message | the body to set |
|
pure virtualnoexcept |
Set the Event Id.
| id | The event id to set |
| name | Optional event name to set |
Referenced by logs::detail::LogRecordSetterTrait< EventId >::Set().
|
pure virtualnoexcept |
Set the Event Id.
| id | The event id to set |
| name | Optional event name to set |
|
pure virtualnoexcept |
Set the observed timestamp for this log.
| timestamp | the timestamp to set |
|
pure virtualnoexcept |
Set the observed timestamp for this log.
| timestamp | the timestamp to set |
|
pure virtualnoexcept |
Set the severity for this log.
| severity | the severity of the event |
|
pure virtualnoexcept |
Set the severity for this log.
| severity | the severity of the event |
Referenced by logs::detail::LogRecordSetterTrait< Severity >::Set().
|
pure virtualnoexcept |
Set the span id for this log.
| span_id | the span id to set |
Referenced by logs::detail::LogRecordSetterTrait< trace::SpanContext >::Set(), and logs::detail::LogRecordSetterTrait< trace::SpanId >::Set().
|
pure virtualnoexcept |
Set the span id for this log.
| span_id | the span id to set |
|
pure virtualnoexcept |
Set the timestamp for this log.
| timestamp | the timestamp to set |
|
pure virtualnoexcept |
Set the timestamp for this log.
| timestamp | the timestamp to set |
Referenced by logs::detail::LogRecordSetterTrait< common::SystemTimestamp >::Set(), and logs::detail::LogRecordSetterTrait< std::chrono::system_clock::time_point >::Set().
|
pure virtualnoexcept |
Inject trace_flags for this log.
| trace_flags | the trace flags to set |
|
pure virtualnoexcept |
Inject trace_flags for this log.
| trace_flags | the trace flags to set |
Referenced by logs::detail::LogRecordSetterTrait< trace::TraceFlags >::Set().
|
pure virtualnoexcept |
Set the trace id for this log.
| trace_id | the trace id to set |
Referenced by logs::detail::LogRecordSetterTrait< trace::TraceId >::Set().
|
pure virtualnoexcept |
Set the trace id for this log.
| trace_id | the trace id to set |