Skip to main content

rustev_otel/
lib.rs

1//! Rustev's OpenTelemetry evidence sink (spec 028).
2//!
3//! Telemetry is derived after the fact from the run record the runtime
4//! already delivers: the runtime gains no hook, and attaching the sink
5//! changes no judgment and no record byte. Every exported value passes the
6//! redaction policy of `rustev_contract::redaction`, which defaults to deny
7//! for caller, third-party, attributed-claim and generated text.
8//!
9//! Telemetry describes a proposal or an unresolved outcome; no span,
10//! status, receipt or sampling decision is or implies an authorization
11//! (principle VI).
12#![forbid(unsafe_code)]
13
14pub mod config;
15pub mod context;
16pub mod endpoint;
17pub mod ids;
18pub mod jsonl;
19pub mod metrics;
20#[cfg(any(feature = "otlp-grpc", feature = "otlp-http"))]
21pub mod otlp;
22#[cfg(feature = "otlp-http")]
23mod otlp_http_client;
24pub mod project;
25pub mod sink;
26
27pub use config::{
28    AckMode, AlwaysSampleOn, ConfigError, ParentSampling, RootSampling, Sampling, SinkConfig,
29};
30pub use ids::{IdSource, RandomIds, SeededIds};
31pub use jsonl::{JsonlError, JsonlExporter};
32pub use project::{
33    Anchor, AnchorKind, Bindings, Projected, ProjectionInput, ProjectionUnknown, RootIds,
34    UsageKeys, project,
35};
36pub use sink::{
37    BeginError, Begun, DecisionTelemetry, ExportError, Flow, LogRecord, Measurement, OtelSink,
38    OtelStats, SinkClock, SystemClock, TeeSink, TelemetryExporter,
39};