This commit is contained in:
houseme
2025-04-28 22:59:29 +08:00
parent 95ababe7a8
commit 19cdf9660b
2 changed files with 8 additions and 5 deletions

View File

@@ -3,10 +3,11 @@ endpoint = "http://localhost:4317" # Default is "http://localhost:4317" if not s
use_stdout = false # Output with stdout, true output, false no output
sample_ratio = 1
meter_interval = 30
service_name = "rustfs_obs"
service_name = "rustfs"
service_version = "0.1.0"
environments = "develop"
logger_level = "debug"
local_logging_enabled = true # Default is false if not specified
[sinks]
[sinks.kafka]

View File

@@ -38,10 +38,12 @@ async fn run(bucket: String, object: String, user: String, service_name: String)
&[opentelemetry::KeyValue::new("operation", "run")],
);
match init_process_observer(meter).await {
Ok(_) => info!("Process observer initialized successfully"),
Err(e) => error!("Failed to initialize process observer: {:?}", e),
}
tokio::spawn(async move {
match init_process_observer(meter).await {
Ok(_) => info!("Process observer initialized successfully"),
Err(e) => error!("Failed to initialize process observer: {:?}", e),
}
});
let base_entry = BaseLogEntry::new()
.message(Some("run logger api_handler info".to_string()))