Repository navigation
fix: resolve Prometheus metric label mismatches - #4518
Conversation
|
Caution Review failedThe pull request is closed. Summary by CodeRabbit
WalkthroughThis change updates how error metadata is passed to stats increment functions in event transformation and post-transformation services. Instead of passing the entire error details object, only selected fields are provided. Additionally, Prometheus metric counters are updated to include new labels for error category and type. Changes
Sequence Diagram(s)sequenceDiagram
participant Service as Transformation/PostTransformation Service
participant Stats as Stats/Prometheus
participant Metrics as Monitoring System
Service->>Stats: increment('event_transform_failure', { destType, module, ... , errorCategory, errorType })
Stats->>Metrics: Update counter with new labels (errorCategory, errorType)
Estimated code review effort2 (~15 minutes) Suggested reviewers
Suggestions for improvement:
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Allure Test reports for this run are available at:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/v1.105.0 #4518 +/- ##
===================================================
Coverage ? 91.44%
===================================================
Files ? 639
Lines ? 33774
Branches ? 7979
===================================================
Hits ? 30885
Misses ? 2655
Partials ? 234 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



What are the changes introduced in this PR?
Problem
metaTo.errorDetailsobjects instead of filtering to only allowed labelsdestinationId,errorCategory,errorTypein metric definitionsSolution
Updated metric definitions in
src/util/prometheus.js:regulation_worker_user_deletion_failureevent_transform_failureFixed tag filtering in metric usage:
metaTo.errorDetailswith filtered inline objectsWhat is the related Linear task?
Resolves INT-3940
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.