#[derive(Event)]
{
// Attributes available to this derive:
#[event]
#[obs]
}
Expand description
Derive macro for the Rust-first authoring path.
Container attributes:
#[event(tier = "log" | "metric" | "trace" | "audit")]#[event(default_sev = "trace" | "debug" | "info" | "warn" | "error" | "fatal")]#[event(full_name = "myapp.v1.ObsXxx")](defaults to<crate>.v1.<TypeName>derived frommodule_path!).
Field attributes:
#[obs(label, cardinality = "low" | "medium" | "high" | "unbounded")]#[obs(attribute, classification = "internal" | "pii" | "secret")]#[obs(measurement)]#[obs(trace_id)],#[obs(span_id)],#[obs(parent_span_id)]#[obs(forensic)]
Lints (compile-time const _: () = { assert!(...) } blocks):
- L001 — every
LABELfield must declare aLoworMediumcardinality. - L002 —
PII-classified fields must not beLABEL. - L003 —
SECRET-classified fields must not exist onLOGorAUDITtier events. - L011 — the type name must start with the workspace event prefix (default
Obs).
See spec 12 § 3.4.