ores.telemetry.logs

Table of Contents

The log surface: a filtered read of the stored log entries, and a fire-and-forget publish that ingests entries from a wrapper node.

These are operations rather than entity verbs. The list is a filtered read over the log store, and the publish arrives from outside the service and is stored as it arrives, so neither is a row a caller reaches by primary key.

1. Physical space

The shell commands are switched off. The shell has no telemetry part, so a generated unit would have nowhere to land. The log reads and the ingest publish serve the UI and the log pipeline rather than a REPL session.

2. Includes

#include "ores.telemetry.core/domain/telemetry_source.hpp"
#include <boost/uuid/uuid.hpp>
#include <chrono>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <vector>

3. Messages

3.1. telemetry_log_entry

/**
 * @brief A persisted telemetry log entry.
 */

3.1.1. id

/**
 * @brief Unique identifier for this log entry.
 */

3.1.2. timestamp

/**
 * @brief When the log was emitted by the source.
 */

3.1.3. source

/**
 * @brief Source type, client or server.
 */

3.1.4. source_name

/**
 * @brief Name of the source application, for example @c ores.shell.
 */

3.1.5. session_id

/**
 * @brief Session identifier for client logs.
 */

3.1.6. account_id

/**
 * @brief Account identifier for authenticated logs.
 */

3.1.7. level

/**
 * @brief Log severity level.
 */

3.1.8. component

/**
 * @brief Logger or component that emitted this log.
 */

3.1.9. message

/**
 * @brief The log message.
 */

3.1.10. tag

/**
 * @brief Optional tag for filtering.
 */

3.1.11. recorded_at

/**
 * @brief Server receipt timestamp.
 */

3.2. telemetry_query

/**
 * @brief Query parameters for retrieving telemetry logs.
 *
 * All filter fields are optional, and multiple filters combine with AND
 * logic.
 */

3.2.1. start_time

/**
 * @brief Start of the time range, inclusive.
 */

3.2.2. end_time

/**
 * @brief End of the time range, exclusive.
 */

3.2.3. source

/**
 * @brief Filter by source type, client or server.
 */

3.2.4. source_name

/**
 * @brief Filter by source application name.
 */

3.2.5. session_id

/**
 * @brief Filter by session identifier.
 */

3.2.6. account_id

/**
 * @brief Filter by account identifier.
 */

3.2.7. level

/**
 * @brief Filter by log level.
 */

3.2.8. min_level

/**
 * @brief Filter by minimum log level.
 */

3.2.9. component

/**
 * @brief Filter by component name.
 */

3.2.10. tag

/**
 * @brief Filter by tag.
 */

3.2.11. message_contains

/**
 * @brief Search text in the message body.
 */

3.2.12. limit

/**
 * @brief Maximum number of results to return.
 */

3.2.13. offset

/**
 * @brief Number of results to skip, for pagination.
 */

3.3. get_telemetry_logs_request

/**
 * @brief Asks for the log entries a filter selects.
 */

3.3.1. query

/**
 * @brief The time range and filters the read applies.
 */

3.4. get_telemetry_logs_response

/**
 * @brief The log entries the filter selected.
 */

3.4.1. success

/**
 * @brief Whether the entries were read.
 */

3.4.2. message

/**
 * @brief Why they were not, when they were not.
 */

3.4.3. entries

/**
 * @brief The entries the read returned.
 */

3.4.4. total_count

/**
 * @brief How many entries the filter matches in total.
 */

3.5. publish_log_entry_item

/**
 * @brief A single log entry for the fire-and-forget publish protocol.
 */

3.5.1. level

/**
 * @brief Log severity level.
 */

3.5.2. timestamp_ms

/**
 * @brief When the log was emitted, in milliseconds since the epoch.
 */

3.5.3. component

/**
 * @brief Logger or component that emitted this log.
 */

3.5.4. message

/**
 * @brief The log message.
 */

3.6. publish_log_entries_request

/**
 * @brief Publishes a batch of log entries, fire-and-forget.
 *
 * A wrapper node publishes it to ingest engine logs into the telemetry
 * store. It carries no response, so the publisher does not wait for one.
 */

3.6.1. source_name

/**
 * @brief Name of the source application that emitted the entries.
 */

3.6.2. tag

/**
 * @brief Tag applied to every entry in the batch.
 */

3.6.3. entries

/**
 * @brief The entries the batch carries.
 */

4. See also

Emacs 29.3 (Org mode 9.6.15)