chore: Include previous status to failed metric#735
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughExtended the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR extends the transactions_failed_total Prometheus counter to include the transaction’s prior pipeline status as an additional label, enabling attribution of failures to pre- vs post-submission stages.
Changes:
- Add a new
previous_statuslabel to theTRANSACTIONS_FAILEDcounter definition. - Populate and emit the
previous_statuslabel when incrementing failed/expired/canceled transaction metrics.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/repositories/transaction/transaction_redis.rs |
Adds previous_status labeling to TRANSACTIONS_FAILED increments during final-state transitions. |
src/metrics/mod.rs |
Extends the TRANSACTIONS_FAILED CounterVec label set to include previous_status and documents the intent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## main #735 +/- ##
==========================================
+ Coverage 90.20% 90.24% +0.03%
==========================================
Files 289 289
Lines 120730 121244 +514
==========================================
+ Hits 108905 109414 +509
- Misses 11825 11830 +5
🚀 New features to boost your workflow:
|
Summary
Add previous status to transaction failed metric.
Testing Process
Checklist
Note
If you are using Relayer in your stack, consider adding your team or organization to our list of Relayer Users in the Wild!
Summary by CodeRabbit