Class ReadWriteLogRecord
Defined in File read_write_log_record.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public opentelemetry::sdk::logs::ReadableLogRecord
(Class ReadableLogRecord)
Class Documentation
-
class ReadWriteLogRecord : public opentelemetry::sdk::logs::ReadableLogRecord
Maintains a representation of a log in a format that can be processed by a recorder.
This class is thread-compatible.
Public Functions
-
ReadWriteLogRecord()
-
~ReadWriteLogRecord() override
-
virtual void SetTimestamp(opentelemetry::common::SystemTimestamp timestamp) noexcept override
Set the timestamp for this log.
- Parameters:
timestamp – the timestamp to set
-
virtual opentelemetry::common::SystemTimestamp GetTimestamp() const noexcept override
Get the timestamp of this log.
- Returns:
the timestamp of this log
-
virtual void SetObservedTimestamp(opentelemetry::common::SystemTimestamp timestamp) noexcept override
Set the observed timestamp for this log.
- Parameters:
timestamp – the timestamp to set
-
virtual opentelemetry::common::SystemTimestamp GetObservedTimestamp() const noexcept override
Get the observed timestamp of this log.
- Returns:
the observed timestamp of this log
-
virtual void SetSeverity(opentelemetry::logs::Severity severity) noexcept override
Set the severity for this log.
- Parameters:
severity – the severity of the event
-
virtual opentelemetry::logs::Severity GetSeverity() const noexcept override
Get the severity of this log.
- Returns:
the severity of this log
-
virtual void SetBody(const opentelemetry::common::AttributeValue &message) noexcept override
Set body field for this log.
- Parameters:
message – the body to set
-
virtual const opentelemetry::common::AttributeValue &GetBody() const noexcept override
Get body field of this log.
- Returns:
the body field for this log.
-
virtual void SetEventId(int64_t id, nostd::string_view name) noexcept override
Set the Event Id object
- Parameters:
id – the event Id to set
name – the event name to set
-
virtual int64_t GetEventId() const noexcept override
Get event Id of this log.
- Returns:
the event Id of this log.
-
virtual nostd::string_view GetEventName() const noexcept override
Get event name of this log.
- Returns:
the event name of this log.
-
virtual void SetTraceId(const opentelemetry::trace::TraceId &trace_id) noexcept override
Set the trace id for this log.
- Parameters:
trace_id – the trace id to set
-
virtual const opentelemetry::trace::TraceId &GetTraceId() const noexcept override
Get the trace id of this log.
- Returns:
the trace id of this log
-
virtual void SetSpanId(const opentelemetry::trace::SpanId &span_id) noexcept override
Set the span id for this log.
- Parameters:
span_id – the span id to set
-
virtual const opentelemetry::trace::SpanId &GetSpanId() const noexcept override
Get the span id of this log.
- Returns:
the span id of this log
-
virtual void SetTraceFlags(const opentelemetry::trace::TraceFlags &trace_flags) noexcept override
Inject trace_flags for this log.
- Parameters:
trace_flags – the trace flags to set
-
virtual const opentelemetry::trace::TraceFlags &GetTraceFlags() const noexcept override
Inject trace_flags of this log.
- Returns:
trace_flags of this log
-
virtual void SetAttribute(nostd::string_view key, const opentelemetry::common::AttributeValue &value) noexcept override
Set an attribute of a log.
- Parameters:
key – the name of the attribute
value – the attribute value
-
virtual const std::unordered_map<std::string, opentelemetry::common::AttributeValue> &GetAttributes() const noexcept override
Get attributes of this log.
- Returns:
the body field of this log
-
virtual const opentelemetry::sdk::resource::Resource &GetResource() const noexcept override
Get resource of this log
- Returns:
the resource of this log
-
virtual void SetResource(const opentelemetry::sdk::resource::Resource &resource) noexcept override
Set Resource of this log
- Parameters:
Resource – the resource to set
-
virtual const opentelemetry::sdk::instrumentationscope::InstrumentationScope &GetInstrumentationScope() const noexcept override
Get instrumentation_scope of this log.
- Returns:
the instrumentation_scope of this log
-
virtual void SetInstrumentationScope(const opentelemetry::sdk::instrumentationscope::InstrumentationScope &instrumentation_scope) noexcept override
Set instrumentation_scope for this log.
- Parameters:
instrumentation_scope – the instrumentation scope to set
-
ReadWriteLogRecord()