Skip to main content

Crate obs_types

Crate obs_types 

Source
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:

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§

UnknownVariant
Error returned by TryFrom<&str> and FromStr parsers 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.
FieldKind
Role of a field on a wide event. Drives codegen, OTel mapping, and lints.
MetricKind
Metric type for a MEASUREMENT field. See 12-schema-and-codegen.md § 2.
SamplingReason
Provenance recorded on the envelope explaining why an event was kept.
Severity
Six-level severity matching OTel SeverityNumber buckets.
Tier
Primary durable destination for an event.