mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-24 13:16:28 +00:00
improve code for init_process_observer
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ protos.workspace = true
|
|||||||
query = { workspace = true }
|
query = { workspace = true }
|
||||||
rmp-serde.workspace = true
|
rmp-serde.workspace = true
|
||||||
rustfs-event-notifier = { workspace = true }
|
rustfs-event-notifier = { workspace = true }
|
||||||
rustfs-obs = { workspace = true, features = ["gpu"] }
|
rustfs-obs = { workspace = true }
|
||||||
rustls.workspace = true
|
rustls.workspace = true
|
||||||
rustls-pemfile.workspace = true
|
rustls-pemfile.workspace = true
|
||||||
rustls-pki-types.workspace = true
|
rustls-pki-types.workspace = true
|
||||||
|
|||||||
+12
-10
@@ -249,17 +249,19 @@ async fn run(opt: config::Opt) -> Result<()> {
|
|||||||
b.build()
|
b.build()
|
||||||
};
|
};
|
||||||
|
|
||||||
// Record the PID-related metrics of the current process
|
tokio::spawn(async move {
|
||||||
let meter = opentelemetry::global::meter("system");
|
// Record the PID-related metrics of the current process
|
||||||
let obs_result = init_process_observer(meter).await;
|
let meter = opentelemetry::global::meter("system");
|
||||||
match obs_result {
|
let obs_result = init_process_observer(meter).await;
|
||||||
Ok(_) => {
|
match obs_result {
|
||||||
info!("Process observer initialized successfully");
|
Ok(_) => {
|
||||||
|
info!("Process observer initialized successfully");
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
error!("Failed to initialize process observer: {}", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Err(e) => {
|
});
|
||||||
error!("Failed to initialize process observer: {}", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let rpc_service = NodeServiceServer::with_interceptor(make_server(), check_auth);
|
let rpc_service = NodeServiceServer::with_interceptor(make_server(), check_auth);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user