diff --git a/packages/obs/examples/config.toml b/packages/obs/examples/config.toml index 135dd39a..0db8e820 100644 --- a/packages/obs/examples/config.toml +++ b/packages/obs/examples/config.toml @@ -1,11 +1,12 @@ [observability] -endpoint = "http://localhost:4317" -use_stdout = true +endpoint = "http://localhost:4317" # Default is "http://localhost:4317" if not specified +use_stdout = false # Output with stdout, true output, false no output sample_ratio = 1 meter_interval = 30 service_name = "rustfs_obs" service_version = "0.1.0" -deployment_environment = "develop" +environments = "develop" +logger_levela = "debug" [sinks] [sinks.kafka] @@ -17,7 +18,8 @@ batch_timeout_ms = 1000 # Default is 1000ms if not specified [sinks.webhook] enabled = false -url = "http://localhost:8080/webhook" +endpoint = "http://localhost:8080/webhook" +auth_token = "" batch_size = 100 # Default is 3 if not specified batch_timeout_ms = 1000 # Default is 100ms if not specified diff --git a/packages/obs/src/telemetry.rs b/packages/obs/src/telemetry.rs index f73d9b87..415e427f 100644 --- a/packages/obs/src/telemetry.rs +++ b/packages/obs/src/telemetry.rs @@ -258,7 +258,7 @@ pub fn init_telemetry(config: &OtelConfig) -> OtelGuard { } _ => { let mut filter = EnvFilter::new(logger_level); - for directive in ["hyper", "opentelemetry", "tonic", "h2", "reqwest"] { + for directive in ["hyper", "tonic", "h2", "reqwest"] { filter = filter.add_directive(format!("{}=off", directive).parse().unwrap()); } filter diff --git a/scripts/run.bat b/scripts/run.bat index e0ec7dc5..0dd48a44 100644 --- a/scripts/run.bat +++ b/scripts/run.bat @@ -24,6 +24,8 @@ set RUSTFS_ADDRESS=0.0.0.0:9000 set RUSTFS_CONSOLE_ENABLE=true set RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9002 rem set RUSTFS_SERVER_DOMAINS=localhost:9000 +rem 具体路径修改为配置文件真实路径,obs.example.toml 仅供参考 +set RUSTFS_OBS_CONFIG=.\config\obs.example.toml" if not "%~1"=="" ( set RUSTFS_VOLUMES=%~1