Closed illia-malachyn closed 3 months ago
This update enhances the application's metrics collection and monitoring capabilities by introducing new parameters and structures related to ingestion index health. Key modifications include the integration of a metrics collector in various functions and the addition of configurable parameters for monitoring ingestion index health. Overall, these changes improve observability and allow for better performance tracking and issue diagnosis within the event ingestion process.
Files | Change Summary |
---|---|
bootstrap/bootstrap.go , config/config.go , services/ingestion/engine.go , services/ingestion/engine_test.go , tests/helpers.go , tests/integration_test.go |
Added new metrics collector parameter and ingestion index health configuration options, improving monitoring and observability capabilities. |
metrics/collector.go , metrics/noop_collector.go , metrics/ingestion_index_health_tracker.go |
Expanded Collector interface and NoopCollector , introduced IngestionIndexHealthTracker for monitoring ingestion index health. |
go.mod |
Updated dependencies, adding github.com/prometheus/client_model as a direct dependency. |
sequenceDiagram
participant User
participant Application
participant Collector
participant EVM
User->>Application: Start Ingestion
Application->>Collector: Initialize metrics collector
Application->>EVM: Get latest block height
Application->>Collector: Report EVM block indexed
Application->>Collector: Check Ingestion Index Health
EVM-->>Application: Return block height
Application->>Collector: Update health status
π° Hop, hop, the changes are grand,
Metrics to track, oh how they expand!
Ingestion health, weβll monitor tight,
With each indexed block, our future looks bright!
Collecting the data, weβre swift as a hare,
Performance and insights, weβll always be aware! π
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?
As we talked about before, we're postponing this PR because it might not be needed. We have EVM block height in this PR https://github.com/onflow/flow-evm-gateway/pull/406. We also might have the network height as a metric in flow-go repo. So, we will reuse those to create index health in Grafana tracking the difference between two metrics.
This covers "Ingestion index health is a boolean value that is being set to false if the latest indexed EVM height falls behind the latest EVM height by X".
This PR is based on top of https://github.com/onflow/flow-evm-gateway/pull/406
I'm pushing a straightforward variation to keep things simple. However, the fact that I need to add a getter to a collector makes it look odd. I'm not sure if there's a way to avoid this
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests
Chores