Expand description
Canonical event schema. OTel logs data model + ECS attribute
conventions, with a zeroclaw.* namespace for the alias-bound
domain attribution fields.
On-disk JSON shape is the canonical contract — third-party tail
consumers parse serde_json::Value and walk the keys. This struct is
pub(crate) to keep external consumers off the typed surface.
Structs§
- Event
- One emission’s call-site descriptor. Built by the
record!macro from the Event constructor + builder calls and consumed by the layer. Everything is by-value; the macro takes&Eventto keep call sites non-moving. - Event
Descriptor - ECS-style nested event descriptor.
- LogEvent
- One row in the canonical log stream.
- Service
Descriptor - Service-identifier block. Constant for the daemon’s lifetime.
- Zeroclaw
Attribution - ZeroClaw-domain attribution. Every field is alias-bound where
applicable:
channelis the<type>.<alias>composite,model_provideris the<type>.<alias>composite, etc. Composites are stored as three keys (<prefix>,<prefix>_type,<prefix>_alias) so filters can match either coarse or precise.
Enums§
- Action
- Closed
event.actiontaxonomy. Adding a verb requires extending this enum — noOther(&str)escape hatch on purpose. The snake_case form of each variant is the on-diskevent.actionstring, derived viastrum::IntoStaticStr. - Event
Category - ECS-style event.category coarse axis.
- Event
Outcome - ECS event.outcome. Default unknown.
- Severity
- OTel severity buckets. Stored alongside
severity_numberso consumers can range-compare numerically and pattern-match textually.
Constants§
- ATTRIBUTION_
FIELDS - Plain alias-bound attribution fields. Adding to this list is the ONLY per-field change needed — Layer/reader/gateway/UI all read this list at runtime instead of hardcoding the per-field plumbing.
- COMPOSITE_
PREFIXES - Composite alias-bound prefixes. Each prefix gets three on-disk keys:
<prefix>(full<type>.<alias>),<prefix>_type,<prefix>_alias. Adding to this list propagates to every consumer the same way asATTRIBUTION_FIELDS.
Functions§
- alias_
field - Derive the
_aliasdecomposed key for a composite prefix. Single source of the_aliassuffix. - is_
attribution_ field - True when
namematches a known plain attribution field, a composite prefix, or a composite’s decomposed_type/_aliassuffix. - severity_
text_ from_ number - Lookup helper used by callers that already have an OTel-style severity number and want the text bucket.
- severity_
text_ from_ tracing_ level - type_
field - Derive the
_typedecomposed key for a composite prefix. Single source of the_typesuffix — every reader/writer routes through this.