Misc. dependency cleanup (#6810)

* remove ensure_dir_exists (2 deps saved)

* group UNHANDLED_ERRORs into a generic (2 deps saved)

* Introduce separate `health_metrics` crate

* separate health_metrics crate

* remove metrics from warp_utils

* move ProcessHealth::observe and SystemHealth::observe to health_metrics

* fix errors

* nitpick `Cargo.toml`s

---------

Co-authored-by: Daniel Knopik <daniel@dknopik.de>
# Conflicts:
#	Cargo.toml
This commit is contained in:
Daniel Knopik
2025-01-16 02:48:50 +01:00
committed by GitHub
parent b1a19a8b20
commit 669932aa67
43 changed files with 303 additions and 315 deletions

View File

@@ -21,6 +21,7 @@ eth2_keystore = { workspace = true }
ethereum_serde_utils = { workspace = true }
filesystem = { workspace = true }
graffiti_file = { workspace = true }
health_metrics = { workspace = true }
initialized_validators = { workspace = true }
lighthouse_version = { workspace = true }
logging = { workspace = true }

View File

@@ -32,6 +32,7 @@ use eth2::lighthouse_vc::{
PublicKeyBytes, SetGraffitiRequest,
},
};
use health_metrics::observe::Observe;
use lighthouse_version::version_with_platform;
use logging::SSELoggingComponents;
use parking_lot::RwLock;

View File

@@ -5,6 +5,7 @@ edition = { workspace = true }
authors = ["Sigma Prime <contact@sigmaprime.io>"]
[dependencies]
health_metrics = { workspace = true }
lighthouse_version = { workspace = true }
malloc_utils = { workspace = true }
metrics = { workspace = true }

View File

@@ -206,7 +206,7 @@ pub fn gather_prometheus_metrics<E: EthSpec>(
scrape_allocator_metrics();
}
warp_utils::metrics::scrape_health_metrics();
health_metrics::metrics::scrape_health_metrics();
encoder
.encode(&metrics::gather(), &mut buffer)