pub fn event() -> EventBuilderExpand description
Create an event builder for ergonomic event construction (builder-based API).
This returns a builder that allows you to configure the event through method chaining
before calling .call() to record it. For a direct function interface, see record_event().
ยงExamples
use lambda_otel_lite::events::{event, EventLevel};
// Basic event
event()
.level(EventLevel::Info)
.message("User action completed")
.call();
// Event with individual attributes
event()
.level(EventLevel::Info)
.message("User logged in")
.attribute("user_id", "123")
.attribute("count", 42)
.attribute("is_admin", true)
.call();