Module protocol

Expand description

Telemetry protocol types and message definitions.

This module defines the core data structures used for telemetry message exchange. It includes message types for logging, tracing, and time synchronization, as well as supporting types for execution tracking and attribute management.

§Message Types

The protocol supports several categories of telemetry messages:

  • Log Messages - Structured logging with severity levels and attributes
  • Tracing Messages - Distributed tracing with spans, events, and links
  • Time Sync Messages - Time synchronization between systems

§Execution Tracking

Each message is associated with an ExecutionId that uniquely identifies the execution context. This allows telemetry data from multiple executions to be correlated and analyzed separately.

§Serialization

All protocol types implement serde::Serialize and optionally serde::Deserialize (when the alloc feature is enabled) for easy serialization to various formats.

Structs§

ExecutionId
An Id uniquely identifying an execution.
InstanceMessage
A telemetry message associated with a specific execution.
LogMessage
A structured log message with severity, timestamp, and attributes.
SpanAddEventMessage
Message indicating an event has been added to a span.
SpanAddLinkMessage
Message indicating a link has been added to a span.
SpanCloseMessage
Message indicating a span has been closed (completed).
SpanCreateMessage
Message indicating the creation of a new span.
SpanEnterMessage
Message indicating a span has been entered.
SpanExitMessage
Message indicating a span has been exited.
SpanSetAttributeMessage
Message indicating an attribute has been set on a span.
TimeSyncMessage
A time synchronization message for coordinating clocks between systems.

Enums§

Severity
Log message severity levels.
TelemetryMessage
An enumeration of all possible telemetry message types.
TracingMessage
Messages related to distributed tracing operations.

Functions§

attribute_list_from_slice
A specialised form of list_from_slice for attributes.

Type Aliases§

AttributeListType
Type alias for a list of attributes.