Macro event

macro_rules! event {
    ($name:literal) => { ... };
    ($name:literal, $($attributes:tt)+) => { ... };
}
Expand description

Adds an event to the current span.

Events are timestamped occurrences that happen during the execution of a span. They can include additional context through attributes.

ยงExamples

Add a simple event:

use veecle_telemetry::event;

event!("cache_miss");

Add an event with attributes:

use veecle_telemetry::event;

let key = "user:123";
let cache_type = "redis";
event!("cache_miss", key = key, cache_type = cache_type, "retry_count" = 3);