Expand description
For message headers and latency tracking. Message headers and latency tracking functionality for the mailbox system.
This module provides header attributes and utilities for message metadata, including latency tracking timestamps used to measure message processing times.
Statics§
- RUST_
MESSAGE_ TYPE - The rust type of the message.
- SENDER_
ACTOR_ ID_ HASH - Hashed ActorId of the message sender, injected in post_unchecked().
- SEND_
TIMESTAMP - Send timestamp for message latency tracking
- TELEMETRY_
MESSAGE_ ID - Telemetry message ID for correlating lifecycle events, injected in post_unchecked().
- TELEMETRY_
PORT_ ID - Port index the message was delivered to, injected in post_unchecked().
Functions§
- log_
message_ latency_ if_ sampling - This function checks the configured sampling rate and, if the random sample passes, calculates the latency between the send timestamp and the current time, then records the latency metric with the associated actor ID.
- set_
rust_ message_ type - Set the send timestamp for latency tracking if timestamp not already set.
- set_
send_ timestamp - Set the send timestamp for latency tracking if timestamp not already set.