Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This pull request adds metrics tracking to the block processing pipeline in the supervisor core. It introduces helper functions and fields for enabling metrics, updates error variants to cover new failure cases, and integrates metrics initialization into both the chain processor tasks and the higher-level chain processor.
- Added unconditionally applied metrics on chain processors (with a todo for making it configurable).
- Updated error types in the LogIndexer and ChainProcessor error modules.
- Integrated a new Metrics module with constants and initialization.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/supervisor/core/src/supervisor.rs | Adds a call to with_metrics() with a todo note for conditional configuration. |
| crates/supervisor/core/src/logindexer/indexer.rs | Updates LogIndexerError to derive PartialEq and Eq. |
| crates/supervisor/core/src/chain_processor/task.rs | Introduces metrics_enabled flag, observe_block_processing helper, and updates event handling to record metrics. |
| crates/supervisor/core/src/chain_processor/mod.rs | Adds and re-exports the new Metrics module. |
| crates/supervisor/core/src/chain_processor/metrics.rs | New module defining metric names, descriptions, and initialization logic. |
| crates/supervisor/core/src/chain_processor/error.rs | Updates the ChainProcessorError enum with new error variants. |
| crates/supervisor/core/src/chain_processor/chain.rs | Propagates metrics configuration to tasks and initializes metrics when enabled. |
Comments suppressed due to low confidence (1)
crates/supervisor/core/src/chain_processor/task.rs:274
- The signature of handle_unsafe_event has been changed to return a Result. Verify that all its call sites are updated to handle the returned error properly.
) -> Result<BlockInfo, ChainProcessorError> {
Closes #2090