mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-03 10:48:13 +00:00
feat(metrics): migrate system monitoring from rustfs-obs to rustfs-metrics (#2242)
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user