-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error attribute to metrics labels #440
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #440 +/- ##
=======================================
+ Coverage 84.0% 84.2% +0.1%
=======================================
Files 14 14
Lines 798 805 +7
=======================================
+ Hits 671 678 +7
Misses 103 103
Partials 24 24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e264d9c
to
ccf1012
Compare
Added some more unit tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jedrivisser, thanks for creating this PR.
This feature seems reasonable, but some comments need to be resolved before merging.
Please also update the CHANGELOG.me
file.
a941d74
to
4953d69
Compare
Thanks for the review! I think I have addressed all issues. Please let me know if I missed or misunderstood anything |
This allows you to add specific information about an error to a metric when it occurs. For instance the error code
4953d69
to
61a22fd
Compare
This PR allows you to add specific information about an error to a metric when it occurs. For instance the mysql error code.
An example implementation of the
ErrorAttributesGetter
function for mysql:This would be registered with:
It creates a metric that looks something like:
instead of:
This allows us to use the error number to decide if an error is a critical error or one that is already being managed in code.