[package] name = "metrics-process" version = "2.4.0" authors = ["Alisue "] edition = "2018" description = "Cross-platform Prometheus style process metrics collector of metrics crate" repository = "https://github.com/lambdalisue/rs-metrics-process" license = "MIT" readme = "README.md" keywords = [ "cross-platform", "metrics", "prometheus", "open-metrics", "process", ] [package.metadata.docs.rs] all-features = true [features] default = ["metrics-rs"] # Enable the metrics-rs collector integration. metrics-rs = ["dep:metrics"] # Enable a `dummy` collector that always return an empty `Metrics` for non supported platforms dummy = [] # Use a Gauge on `process_cpu_seconds_total` metrics instead of Counter to represent f64 value. # This is a previous behavior prior to version 2.0.0. # See https://github.com/lambdalisue/rs-metrics-process/issues/44 for more details. use-gauge-on-cpu-seconds-total = [] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] metrics = { version = "0.24.0", optional = true } [target.'cfg(target_os = "macos")'.dependencies] libproc = "0.14.2" mach2 = "0.4" once_cell = "1.13.1" rlimit = "0.10.0" [target.'cfg(target_os = "linux")'.dependencies] once_cell = "1.13.1" procfs = { version = "0.17.0", default-features = false } [target.'cfg(target_os = "freebsd")'.dependencies] libc = "0.2.159" [target.'cfg(target_os = "openbsd")'.dependencies] libc = "0.2.159" [target.'cfg(target_os = "windows")'.dependencies.windows] version = "0.58.0" features = [ "Win32_Foundation", "Win32_System_Threading", "Win32_System_ProcessStatus", ] [dev-dependencies] assert_matches = "1.5.0" axum = "0.7.2" metrics-exporter-prometheus = "0.16.0" tokio = { version = "1.20.1", features = ["full"] }