ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Attributes | List of all members
log_record Struct Referencefinal

A log record with trace correlation. More...

#include <log_record.hpp>

Collaboration diagram for log_record:
Collaboration graph

Public Attributes

std::chrono::system_clock::time_point timestamp
 When the log was emitted.
 
std::optional< std::chrono::system_clock::time_point > observed_timestamp
 When the event that the log describes occurred.
 
severity_level severity = severity_level::info
 The severity of the log message.
 
std::string body
 The log message body.
 
std::optional< trace_idtrace
 The trace this log belongs to, if any.
 
std::optional< span_idspan
 The span this log was emitted from, if any.
 
std::string logger_name
 The name of the logger/component that emitted this log.
 
attributes attrs
 Additional attributes providing context.
 
std::shared_ptr< resourcesource_resource
 The resource that produced this log.
 

Detailed Description

A log record with trace correlation.

This represents a single log entry that can be correlated with a trace and span. By including trace_id and span_id, logs can be filtered and associated with specific operations in the distributed trace.

This structure follows the OpenTelemetry log data model.

Member Data Documentation

◆ observed_timestamp

std::optional<std::chrono::system_clock::time_point> observed_timestamp

When the event that the log describes occurred.

This may differ from timestamp if the log is emitted after the fact.

◆ source_resource

std::shared_ptr<resource> source_resource

The resource that produced this log.

Shared across all logs from the same source.