Add poller last triggered block metric and improve block number handling #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
Added a new metric for the last triggered block in the poller and improved block number tracking.
Removed the division by 10, because this should be configured in Grafana settings to not display scientific notation
What changed?
poller_last_triggered_block
to track the last block number that triggered the poller.Poller.Start()
method to set the new metric with the end block number of each polling cycle.Worker.Run()
method to useFloat64()
instead of dividing by 10 when setting theLastFetchedBlock
metric, addressing a TODO and improving precision.How to test?
poller_last_triggered_block
metric is present and updating correctly.LastFetchedBlock
metric is now reporting accurate values without scientific notation.Why make this change?
poller_last_triggered_block
metric provides better visibility into the poller's progress, allowing for more accurate monitoring and debugging.LastFetchedBlock
metric calculation improves precision and removes the need for the temporary division workaround, enhancing the overall reliability of the metrics system.