Class ReadableLogRecord
Defined in File readable_log_record.h
Inheritance Relationships
Base Type
public opentelemetry::sdk::logs::Recordable
(Class Recordable)
Derived Type
public opentelemetry::sdk::logs::ReadWriteLogRecord
(Class ReadWriteLogRecord)
Class Documentation
-
class ReadableLogRecord : public opentelemetry::sdk::logs::Recordable
Maintains a representation of a log in a format that can be processed by a recorder.
This class is thread-compatible.
Subclassed by opentelemetry::sdk::logs::ReadWriteLogRecord
Public Functions
-
virtual opentelemetry::common::SystemTimestamp GetTimestamp() const noexcept = 0
Get the timestamp of this log.
- Returns:
the timestamp of this log
-
virtual opentelemetry::common::SystemTimestamp GetObservedTimestamp() const noexcept = 0
Get the observed timestamp of this log.
- Returns:
the observed timestamp of this log
-
virtual opentelemetry::logs::Severity GetSeverity() const noexcept = 0
Get the severity of this log.
- Returns:
the severity of this log
-
virtual nostd::string_view GetSeverityText() const noexcept
Get the severity text of this log.
- Returns:
the severity text for this log
-
virtual const opentelemetry::common::AttributeValue &GetBody() const noexcept = 0
Get body field of this log.
- Returns:
the body field for this log.
-
virtual int64_t GetEventId() const noexcept = 0
Get the Event id.
- Returns:
the event id
-
virtual nostd::string_view GetEventName() const noexcept = 0
Get the Event Name.
- Returns:
the event name
-
virtual const opentelemetry::trace::TraceId &GetTraceId() const noexcept = 0
Get the trace id of this log.
- Returns:
the trace id of this log
-
virtual const opentelemetry::trace::SpanId &GetSpanId() const noexcept = 0
Get the span id of this log.
- Returns:
the span id of this log
-
virtual const opentelemetry::trace::TraceFlags &GetTraceFlags() const noexcept = 0
Inject trace_flags of this log.
- Returns:
trace_flags of this log
-
virtual const std::unordered_map<std::string, opentelemetry::common::AttributeValue> &GetAttributes() const noexcept = 0
Get attributes of this log.
- Returns:
the body field of this log
-
virtual const opentelemetry::sdk::resource::Resource &GetResource() const noexcept = 0
Get resource of this log
- Returns:
the resource of this log
-
virtual const opentelemetry::sdk::instrumentationscope::InstrumentationScope &GetInstrumentationScope() const noexcept = 0
Get instrumentation scope of this log.
- Returns:
the instrumentation scope of this log
Public Static Functions
-
static const opentelemetry::sdk::instrumentationscope::InstrumentationScope &GetDefaultInstrumentationScope() noexcept
Get default instrumentation scope of logs.
- Returns:
the default instrumentation scope of logs
-
virtual opentelemetry::common::SystemTimestamp GetTimestamp() const noexcept = 0