event

Macro event 

Source
macro_rules! event {
    ($event_name:expr $(, $key:literal = $value:expr)* $(,)?) => { ... };
}
Expand description

Adds an event to the current span with optional attributes.

§Examples

// Simple event
otel::event!("query.start");

// Event with attributes
otel::event!("query.result",
  "record_count" = 42,
  "partition_key" = "users"
);