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

A persisted telemetry log entry. More...

#include <telemetry_log_entry.hpp>

Collaboration diagram for telemetry_log_entry:
Collaboration graph

Public Attributes

boost::uuids::uuid id
 Unique identifier for this log entry.
 
std::chrono::system_clock::time_point timestamp
 When the log was emitted by the source.
 
telemetry_source source = telemetry_source::client
 Source type (client or server).
 
std::string source_name
 Name of the source application.
 
std::optional< boost::uuids::uuid > session_id
 Session ID for client logs.
 
std::optional< boost::uuids::uuid > account_id
 Account ID for authenticated logs.
 
std::string level = "info"
 Log severity level.
 
std::string component
 Logger/component name that emitted this log.
 
std::string message
 The actual log message.
 
std::string tag
 Optional tag for filtering.
 
std::chrono::system_clock::time_point recorded_at
 Server receipt timestamp.
 

Detailed Description

A persisted telemetry log entry.

This structure represents a log entry as stored in the telemetry_logs database table. It is designed for efficient storage and querying in a TimescaleDB hypertable.

The structure is intentionally simpler than the OpenTelemetry log_record structure, focusing on the fields needed for practical log analysis.

Member Data Documentation

◆ timestamp

std::chrono::system_clock::time_point timestamp

When the log was emitted by the source.

This is the partitioning key for the TimescaleDB hypertable.

◆ source_name

std::string source_name

Name of the source application.

Examples: "ores.qt", "ores.comms.shell", "ores.comms.service"

◆ session_id

std::optional<boost::uuids::uuid> session_id

Session ID for client logs.

Empty for server logs or pre-login client logs. Can be joined with sessions table for client version info.

◆ account_id

std::optional<boost::uuids::uuid> account_id

Account ID for authenticated logs.

Empty for server logs or pre-login client logs.

◆ level

std::string level = "info"

Log severity level.

Valid values: "trace", "debug", "info", "warn", "error"

◆ component

std::string component

Logger/component name that emitted this log.

Examples: "ores.qt.main_window", "ores.comms.client"

◆ tag

std::string tag

Optional tag for filtering.

Can be used for categorization (e.g., "security", "performance").

◆ recorded_at

std::chrono::system_clock::time_point recorded_at

Server receipt timestamp.

Set by the server when the log is received/persisted.