mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Remove unused logging metrics (#7997)
@chong-he noticed that the INFO/WARN/ERRO log counts on our dashboards had stopped working. Since switching to `tracing` we are now tracking total events _per crate_, and the global counters are unused.
Per-crate metrics are here:
cfb1f73310/common/logging/src/tracing_metrics_layer.rs (L61-L63)
Delete the unused global counters from the source.
We can sum across the per-crate metric in our dashboards to restore the previous functionality.
Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use metrics::{IntCounter, Result as MetricsResult, try_create_int_counter};
|
||||
use std::sync::LazyLock;
|
||||
use std::time::{Duration, Instant};
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
@@ -23,15 +21,6 @@ pub use utils::build_workspace_filter;
|
||||
/// The minimum interval between log messages indicating that a queue is full.
|
||||
const LOG_DEBOUNCE_INTERVAL: Duration = Duration::from_secs(30);
|
||||
|
||||
pub static INFOS_TOTAL: LazyLock<MetricsResult<IntCounter>> =
|
||||
LazyLock::new(|| try_create_int_counter("info_total", "Count of infos logged"));
|
||||
pub static WARNS_TOTAL: LazyLock<MetricsResult<IntCounter>> =
|
||||
LazyLock::new(|| try_create_int_counter("warn_total", "Count of warns logged"));
|
||||
pub static ERRORS_TOTAL: LazyLock<MetricsResult<IntCounter>> =
|
||||
LazyLock::new(|| try_create_int_counter("error_total", "Count of errors logged"));
|
||||
pub static CRITS_TOTAL: LazyLock<MetricsResult<IntCounter>> =
|
||||
LazyLock::new(|| try_create_int_counter("crit_total", "Count of crits logged"));
|
||||
|
||||
/// Provides de-bounce functionality for logging.
|
||||
#[derive(Default)]
|
||||
pub struct TimeLatch(Option<Instant>);
|
||||
|
||||
Reference in New Issue
Block a user