Modularize tracing executor and metrics rename (#6424)

* Tracing executor and metrics rename

* Appease clippy

* Merge branch 'unstable' into modularise-task-executor
This commit is contained in:
Age Manning
2024-10-28 20:41:45 +11:00
committed by GitHub
parent 8188e036a0
commit e31ac508d4
59 changed files with 364 additions and 323 deletions

View File

@@ -14,7 +14,7 @@ eth2 = { workspace = true }
serde_json = { workspace = true }
serde = { workspace = true }
lighthouse_version = { workspace = true }
lighthouse_metrics = { workspace = true }
metrics = { workspace = true }
slog = { workspace = true }
store = { workspace = true }
regex = { workspace = true }

View File

@@ -1,5 +1,5 @@
use super::types::{BeaconProcessMetrics, ValidatorProcessMetrics};
use lighthouse_metrics::{MetricFamily, MetricType};
use metrics::{MetricFamily, MetricType};
use serde_json::json;
use std::collections::HashMap;
use std::path::Path;
@@ -155,7 +155,7 @@ fn get_value(mf: &MetricFamily) -> Option<i64> {
/// Collects all metrics and returns a `serde_json::Value` object with the required metrics
/// from the metrics hashmap.
pub fn gather_metrics(metrics_map: &HashMap<String, JsonMetric>) -> Option<serde_json::Value> {
let metric_families = lighthouse_metrics::gather();
let metric_families = metrics::gather();
let mut res = serde_json::Map::with_capacity(metrics_map.len());
for mf in metric_families.iter() {
let metric_name = mf.get_name();