obs-kit 0.1.0

Façade for the obs observability SDK; re-exports the everyday API (init, observer, sinks, macros).
Documentation
#![forbid(unsafe_code)]
#![warn(rust_2024_compatibility, missing_docs, missing_debug_implementations)]
#![cfg_attr(
    test,
    allow(
        clippy::unwrap_used,
        clippy::expect_used,
        clippy::panic,
        clippy::indexing_slicing
    )
)]

//! Façade crate — re-exports the everyday obs API.
//!
//! Most downstream apps depend only on `obs-kit`. Spec 61 § 2.11 +
//! boundary-review § 3.6 (`init_for_service`).

mod init;

pub use init::{InitBuilder, InitError, InitGuard, ServicePreset, init_for_service};
/// Typed wrappers for `Classification::Secret` fields. Decision D6-2:
/// SECRET-classified event fields should be declared as
/// `secrecy::SecretString` / `secrecy::SecretBox<T>` so the in-memory
/// value is also redacted at `Debug` time. The runtime scrubber (spec
/// 14 § 5) then redacts the encoded bytes before any sink sees them.
pub use obs_core::__private::secrecy;
#[cfg(feature = "dev")]
pub use obs_core::sink::FormatterStyle;
pub use obs_core::{
    BuildableTo, Cardinality, Classification, ENVELOPE_FORMAT_VER, Emit, EnumCount, EventSchema,
    EventsConfig, FanOutSink, FieldCapture, FieldKind, FieldMeta, FieldRole, Filter,
    InMemoryHandle, InMemoryObserver, InMemorySink, Instrument, Instrumented, LevelSplitWriter,
    MakeWriter, MetricEmitter, MetricKind, NdjsonFileSink, NonBlockingWriter, NoopObserver,
    NoopSink, ObsBatch, ObsCallsite, ObsEnvelope, ObsTraceCtx, Observer, RollingFileWriter,
    RollingFileWriterBuilder, RollingPolicy, SamplingConfig, SamplingReason, ScopeField,
    ScopeFrame, ScopeFrameBuilder, ScopeGuard, ScopeKind, Severity, Sink, SpanCtx, SpanFrame,
    SpanTrace, StandardObserver, StandardObserverBuilder, StderrWriter, StdoutSink, StdoutWriter,
    TeeWriter, Tier, W3cPropagator, WithObserver, WorkerCounters, WorkerGuard, extract_w3c,
    fresh_span_id, fresh_trace_id, inject_w3c, install_observer, install_panic_hook, observer,
    observer_weak, status_class, with_observer_task, with_observer_task_sync,
    with_observer_thread_local, with_test_observer,
};
/// In-process live-tail subscriber registry + Sink. Enable via the
/// `live-tail` feature. Boundary-review § 3.1.
#[cfg(feature = "live-tail")]
pub use obs_live_tail as live_tail;
pub use obs_macros::{Event, context, emit, forensic, include_schemas, instrument, scope};
/// Prometheus scrape exporter. Enable via the `prom` feature.
/// Phase 2 boundary-review § 3.2.
#[cfg(feature = "prom")]
pub use obs_prom as prom;
pub use obs_proto::obs::v1::{ObsFnEntered, ObsFnExecuted, ObsForensicEvent};
/// Generic batching sink framework (triggers + retry + spool +
/// escalation with a pluggable `BatchBackend` trait). Enable via the
/// `batch-sink` feature. Phase 2 boundary-review § 3.1.
#[cfg(feature = "batch-sink")]
pub use obs_sink_batch as sink_batch;

/// Test ergonomics — `assert_emitted!`, `#[obs::test]`. Spec 60 § 8.
#[cfg(feature = "test")]
pub mod test {
    pub use obs_core::test::*;
    pub use obs_macros::test;
}

/// Re-exports for code generated by `#[derive(Event)]` and `obs-build`.
/// Users do not depend on these directly.
#[doc(hidden)]
pub use obs_core::__private;
/// Severity ident shortcuts for use with `obs::emit!`. The macro form
/// accepts either `Severity::Warn` or the bare `WARN` ident.
pub use obs_core::Severity::{
    Debug as DEBUG, Error as ERROR, Fatal as FATAL, Info as INFO, Trace as TRACE, Warn as WARN,
};