indexbus_platform_obs/
lib.rs

1//! `indexbus-platform-obs` provides observability integrations for IndexBus applications.
2//!
3//! This crate is **std-first** and feature-gated:
4//! - `tracing`: tracing + tracing-subscriber setup helpers
5//! - `metrics`: metrics façade helpers
6//! - `metrics-prometheus`: optional Prometheus exporter wiring
7//!
8//! **Contracts**
9//! - Initialization helpers are best-effort and return a crate-local error type intended for
10//!   diagnostics.
11//! - Tracing initialization is process-global: calling init more than once is an error.
12
13#![cfg_attr(not(feature = "std"), no_std)]
14#![deny(missing_docs)]
15
16#[cfg(all(not(feature = "std"), not(doc)))]
17compile_error!("indexbus-platform-obs currently requires the `std` feature");
18
19#[cfg(feature = "std")]
20extern crate std;
21
22/// Error types and `Result` aliases.
23pub mod errors;
24/// Common re-exports for consumers of this crate.
25pub mod prelude;
26
27/// Tracing initialization helpers.
28pub mod tracing_init;
29
30/// Metrics initialization helpers.
31pub mod metrics_init;
32
33mod internal;