Skip to content

feat(fortuna): Better metrics tracking for alerting #2703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 19, 2025
Merged

Conversation

jayantk
Copy link
Contributor

@jayantk jayantk commented May 18, 2025

Summary

The current metrics system makes it difficult to alert on certain kinds of failure cases. Specifically, chains don't show up in the metrics until they are successfully started, which means that if a chain fails to start, we don't get an alert. I also added a couple of timestamp metrics around the blockchain state logging and event processing. These timestamp metrics will go stale (i.e., out of sync with current time) if they are not updated, which will catch many kinds of failure cases. These case wouldn't be caught with the existing timestamp lag metric, which won't trigger a failure e.g., if the whole block tracking loop crashes.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Copy link

vercel bot commented May 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference 🛑 Canceled (Inspect) May 19, 2025 7:57pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 7:57pm
entropy-debugger 🛑 Canceled (Inspect) May 19, 2025 7:57pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 7:57pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 7:57pm
proposals 🛑 Canceled (Inspect) May 19, 2025 7:57pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 7:57pm

@@ -228,6 +236,30 @@ impl KeeperMetrics {
keeper_metrics.block_timestamp_lag.clone(),
);

writable_registry.register(
"block_timestamp",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would call these latest_block_timestamp and latest_block_number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants