Expand description
Foundation enums for the obs SDK.
Every other crate in the workspace depends on this one. The seven enums
defined here form the vocabulary of the wire envelope (10-data-model.md
§ 2-5) — Tier, Severity, FieldKind,
Cardinality, Classification, MetricKind, SamplingReason.
All enums:
- derive
Copy + Clone + Debug + PartialEq + Eq + Hash, - implement
buffa::Enumerationso they live on the wire, - serialize/deserialize via
serdeforobs.yamlconfig, - expose
const fnhelpers used by compile-time lints (e.g.Cardinality::is_label_compatible,Cardinality::cap,Severity::as_str).
Vocabulary changes here cause an envelope format_ver bump (per
10-data-model.md § 6 and
61-crates-and-features.md § 4).
That’s the intended forcing function.
Structs§
- Unknown
Variant - Error returned by
TryFrom<&str>andFromStrparsers when an unknown enum name is encountered. Each enum in this crate uses this type to preserve a uniform error surface across the vocabulary.
Enums§
- Cardinality
- Bound on the number of distinct values a field admits at runtime.
- Classification
- Security/PII classification of a field.
- Field
Kind - Role of a field on a wide event. Drives codegen, OTel mapping, and lints.
- Metric
Kind - Metric type for a
MEASUREMENTfield. See 12-schema-and-codegen.md § 2. - Sampling
Reason - Provenance recorded on the envelope explaining why an event was kept.
- Severity
- Six-level severity matching OTel
SeverityNumberbuckets. - Tier
- Primary durable destination for an event.