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§
- Execution
Id - An Id uniquely identifying an execution.
- Instance
Message - A telemetry message associated with a specific execution.
- LogMessage
- A structured log message with severity, timestamp, and attributes.
- Span
AddEvent Message - Message indicating an event has been added to a span.
- Span
AddLink Message - Message indicating a link has been added to a span.
- Span
Close Message - Message indicating a span has been closed (completed).
- Span
Create Message - Message indicating the creation of a new span.
- Span
Enter Message - Message indicating a span has been entered.
- Span
Exit Message - Message indicating a span has been exited.
- Span
SetAttribute Message - Message indicating an attribute has been set on a span.
- Time
Sync Message - A time synchronization message for coordinating clocks between systems.
Enums§
- Severity
- Log message severity levels.
- Telemetry
Message - An enumeration of all possible telemetry message types.
- Tracing
Message - Messages related to distributed tracing operations.
Functions§
- attribute_
list_ from_ slice - A specialised form of
list_from_slice
for attributes.
Type Aliases§
- Attribute
List Type - Type alias for a list of attributes.