Skip to content

Conversation

@michaelsproul
Copy link
Member

@michaelsproul michaelsproul commented Sep 4, 2025

Issue Addressed

@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:

tracing_core::Level::INFO => metrics::inc_counter_vec(&DEP_INFOS_TOTAL, target),
tracing_core::Level::WARN => metrics::inc_counter_vec(&DEP_WARNS_TOTAL, target),
tracing_core::Level::ERROR => metrics::inc_counter_vec(&DEP_ERRORS_TOTAL, target),

Proposed Changes

Delete the unused global counters from the source.

We can sum across the per-crate metric in our dashboards to restore the previous functionality.

@michaelsproul michaelsproul added ready-for-review The code is ready for review code-quality low-hanging-fruit Easy to resolve, get it before someone else does! UX-and-logs labels Sep 4, 2025
@mergify
Copy link

mergify bot commented Sep 4, 2025

Some required checks have failed. Could you please take a look @michaelsproul? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Sep 4, 2025
Copy link
Member

@chong-he chong-he left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just need to delete the dependencies input here:

use metrics::{try_create_int_counter, IntCounter, Result as MetricsResult};
use std::sync::LazyLock;

@michaelsproul michaelsproul added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Sep 9, 2025
@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Sep 12, 2025
mergify bot added a commit that referenced this pull request Sep 12, 2025
@mergify mergify bot merged commit 87ae301 into sigp:unstable Sep 12, 2025
37 checks passed
PoulavBhowmick03 pushed a commit to PoulavBhowmick03/lighthouse that referenced this pull request Sep 12, 2025
@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:

https://github.com/sigp/lighthouse/blob/cfb1f7331064b758c6786e4e1dc15507af5ff5d1/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 <[email protected]>
kevaundray pushed a commit to kevaundray/lighthouse that referenced this pull request Sep 13, 2025
@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:

https://github.com/sigp/lighthouse/blob/cfb1f7331064b758c6786e4e1dc15507af5ff5d1/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 <[email protected]>
jtraglia pushed a commit to jtraglia/lighthouse that referenced this pull request Sep 16, 2025
@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:

https://github.com/sigp/lighthouse/blob/cfb1f7331064b758c6786e4e1dc15507af5ff5d1/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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-merge This PR is ready to merge. UX-and-logs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants