mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-28 07:57:01 +00:00
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:
+26
-26
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user