osproxy-observe 1.0.2

Observability: shape-only span schema, runtime diagnostics directives, /debug/explain assembly.
Documentation
//! Observability.
//!
//! Emits the per-request causal trace (shapes, ids, field names, never values,
//! `docs/05`) and assembles the `/debug/explain/{request_id}` document for LLM
//! consumption. Read-only: it never mutates routing or cluster state
//! (`docs/decisions/005`).
//!
//! The [`RequestTrace`] is **shape-only by construction**, its setters accept
//! only id newtypes, compile-time labels, and sizes, so there is no API path by
//! which a tenant value or secret can reach telemetry (`docs/05` ยง7). The
//! [`ExplainStore`] retains the most recent explanations for the debug endpoint.
//!
//! Directive evaluation (runtime verbosity control) lives in `osproxy-control`;
//! [`resource_spans`] encodes that same shape-only trace as an OTLP/HTTP JSON
//! payload for export (the wire emission is the I/O layer's job, M7).
#![deny(missing_docs)]

mod breakglass;
mod decode;
mod diagnostic_sink;
mod directive;
mod explain;
mod export;
mod otlp;
mod stats;
mod store;
mod trace;

pub use breakglass::BreakGlassBuffer;
pub use decode::decode_directive_set;
pub use diagnostic_sink::{DiagnosticSink, NoopDiagnosticSink};
pub use directive::{
    DiagLevel, DiagnosticsDirective, DirectiveMatch, DirectiveSet, DirectiveVerifier, NoVerifier,
    RequestAttrs,
};
pub use explain::{explain_json, ExplainStore};
pub use export::{NoopExporter, SpanExporter};
pub use otlp::resource_spans;
pub use stats::{Metrics, PoolSnapshot, StatsSnapshot};
pub use store::{DirectiveStore, InMemoryDirectiveStore};
pub use trace::{
    ClassifyInfo, DispatchInfo, EgressInfo, IngressInfo, RequestTrace, ResolveInfo, RewriteInfo,
};