improve code for obs

This commit is contained in:
houseme
2025-05-29 21:10:04 +08:00
parent ace04bcd97
commit 3ceec7b5f2
9 changed files with 755 additions and 288 deletions
+2 -2
View File
@@ -64,8 +64,8 @@ pub struct Opt {
/// Observability configuration file
/// Default value: config/obs.toml
#[arg(long, default_value_t = rustfs_config::DEFAULT_OBS_CONFIG.to_string(), env = "RUSTFS_OBS_CONFIG")]
pub obs_config: String,
#[arg(long, default_value_t = rustfs_config::DEFAULT_OBS_ENDPOINT.to_string(), env = "RUSTFS_OBS_ENDPOINT")]
pub obs_endpoint: String,
/// tls path for rustfs api and console.
#[arg(long, env = "RUSTFS_TLS_PATH")]
+1 -1
View File
@@ -103,7 +103,7 @@ async fn main() -> Result<()> {
init_license(opt.license.clone());
// Load the configuration file
let config = load_config(Some(opt.clone().obs_config));
let config = load_config(Some(opt.clone().obs_endpoint));
// Initialize Observability
let (_logger, guard) = init_obs(config.clone()).await;