feat(metrics): migrate system monitoring from rustfs-obs to rustfs-metrics (#2242)

Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
heihutu
2026-03-20 18:52:33 +08:00
committed by GitHub
parent 28f86a505e
commit 3c28f0a0ba
56 changed files with 1116 additions and 613 deletions
+2 -7
View File
@@ -13,9 +13,9 @@
// limitations under the License.
use opentelemetry::global;
use rustfs_obs::{SystemObserver, init_obs};
use rustfs_obs::init_obs;
use std::time::{Duration, SystemTime};
use tracing::{Level, error, info, instrument};
use tracing::{Level, info, instrument};
#[tokio::main]
async fn main() {
@@ -43,11 +43,6 @@ async fn run(service_name: String) {
&[opentelemetry::KeyValue::new("operation", "run")],
);
match SystemObserver::init_process_observer().await {
Ok(_) => info!("Process observer initialized successfully"),
Err(e) => error!("Failed to initialize process observer: {:?}", e),
}
put_object("bucket".to_string(), "object".to_string(), "user".to_string()).await;
info!("Logging is completed");
tokio::time::sleep(Duration::from_secs(2)).await;