feat(obs): add advanced log management configuration (#2016)

Co-authored-by: houseme <housemecn@gmail.com>
Co-authored-by: 安正超 <anzhengchao@gmail.com>
Co-authored-by: 唐小鸭 <tangtang1251@qq.com>
This commit is contained in:
heihutu
2026-03-01 03:23:48 +08:00
committed by GitHub
parent e7466eb1cc
commit 2c01b8c49d
26 changed files with 2560 additions and 1305 deletions
+26 -26
View File
@@ -30,39 +30,39 @@
//! # use all functions
//! rustfs-obs = { version = "0.1.0", features = ["full"] }
//! ```
///
/// ## Usage
///
/// ```no_run
/// use rustfs_obs::init_obs;
///
/// # #[tokio::main]
/// # async fn main() {
/// # let _guard = match init_obs(None).await {
/// # Ok(g) => g,
/// # Err(e) => {
/// # panic!("Failed to initialize observability: {:?}", e);
/// # }
/// # };
/// # // Application logic here
/// # {
/// # // Simulate some work
/// # tokio::time::sleep(std::time::Duration::from_secs(2)).await;
/// # println!("Application is running...");
/// # }
/// # // Guard will be dropped here, flushing telemetry data
/// # }
/// ```
//!
//! ## Usage
//!
//! ```no_run
//! use rustfs_obs::init_obs;
//!
//! # #[tokio::main]
//! # async fn main() {
//! # let _guard = match init_obs(None).await {
//! # Ok(g) => g,
//! # Err(e) => {
//! # panic!("Failed to initialize observability: {:?}", e);
//! # }
//! # };
//! # // Application logic here
//! # {
//! # // Simulate some work
//! # tokio::time::sleep(std::time::Duration::from_secs(2)).await;
//! # println!("Application is running...");
//! # }
//! # // Guard will be dropped here, flushing telemetry data
//! # }
//! ```
mod config;
mod error;
mod global;
mod recorder;
mod log_cleanup;
mod system;
mod telemetry;
pub use config::*;
pub use error::*;
pub use global::*;
pub use recorder::*;
pub use log_cleanup::*;
pub use system::SystemObserver;
pub use telemetry::OtelGuard;
pub use telemetry::{OtelGuard, Recorder};