Skip to content
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

fix: add block number value to the metrics #2219

Merged
merged 3 commits into from Apr 11, 2024
Merged

fix: add block number value to the metrics #2219

merged 3 commits into from Apr 11, 2024

Conversation

kmd-fl
Copy link
Contributor

@kmd-fl kmd-fl commented Apr 8, 2024

Description

Add new fields last_seen_block and last_processed_block displaying the block number of the block from newHeader subscription handler.

Motivation

It will be helpful for alerts to detect chain de-synch

Proposed Changes

  • add last_seen_block: Gauge
  • add last_processed_block: Gauge
  • use lower bits of the block number in metrics

Additional Notes

  • We use i64 since u64 and hight aren't supported in prometheus due to some protobuf restriction
  • It's fine to use only lower bits of the u256 block number since:
    1. most likely, we won't reach i64 soon
    2. these metrics will be used in alerts to detect the chain de-sync, lower bits should be enough for this task.

@kmd-fl kmd-fl added the e2e Run e2e workflow label Apr 8, 2024
@kmd-fl kmd-fl merged commit 39f71d7 into master Apr 11, 2024
14 checks passed
@kmd-fl kmd-fl deleted the fix-metrics branch April 11, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants