Closed peterargue closed 1 month ago
The changes introduce a new method, CadenceHeightIndexed
, to the Collector
interface and its implementation in metrics/collector.go
, allowing for the tracking of Cadence block heights. A corresponding gauge, cadenceBlockHeight
, is added to monitor this metric. Additionally, the nopCollector
in metrics/nop.go
is updated to include the new method. The processEvents
method in services/ingestion/engine.go
is modified to call the new method, enabling the indexing of Cadence heights during event processing.
Files | Change Summary |
---|---|
metrics/collector.go | Added method CadenceHeightIndexed(height uint64) to Collector interface; introduced cadenceBlockHeight gauge in DefaultCollector . |
metrics/nop.go | Added method CadenceHeightIndexed(uint64) to nopCollector struct. |
services/ingestion/engine.go | Modified processEvents method to call e.collector.CadenceHeightIndexed(events.CadenceHeight()) . |
Objective | Addressed | Explanation |
---|---|---|
Add metric for cadence block height (#570) | ✅ |
🐰 In the meadow where bunnies play,
A new height metric has come to stay.
With cadence tracked, we hop with glee,
Collecting data, as happy as can be!
Metrics grow, our joy is bright,
Hopping high, in the moonlight! 🌙✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
LGTM! 👏 Left just a comment/question, regarding the intention of this metric.
Oops. I was too fast on the merge and didn't see your comment. I opened https://github.com/onflow/flow-evm-gateway/pull/589 to address it.
Closes: #570
Description
Add metric for latest cadence block height
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes