-
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 DisableSkipErrMetrics to disable ErrSkip metrics #389
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #389 +/- ##
=======================================
+ Coverage 83.0% 83.2% +0.1%
=======================================
Files 13 13
Lines 750 758 +8
=======================================
+ Hits 623 631 +8
Misses 103 103
Partials 24 24 ☔ View full report in Codecov by Sentry. |
d0e9a0c
to
c070d6e
Compare
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.
@ncthompson, thanks for the PR!
It looks good. I only have a naming issue. BTW, do you think skipping the entire measurement creation when encountering ErrSkip is better than recording a measurement with status OK?
I was debating this myself when creating this. From looking at the lib itself, it always retries on a ErrSkip. So it feels like you will have "duplicate" measurements if you log both. I am open to change it if you feel like this will hide measurements that should rather be logged. |
c070d6e
to
2c9c905
Compare
I took some time to think about this, and I prefer the way to keep the "duplicate" measurement. Here are my reasons:
|
DisableSkipErrMeasurement will suppress the recoding of any SkipErr metric if enabled. The measurement will be recorded as status=ok. See XSAM#386
2c9c905
to
bbfef15
Compare
Thanks for the feedback! 😄 I have updated it so it suppresses the ErrSkip like in the tracing case. Have a look if that makes sense to you. |
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.
Thanks for the update and contribution. Please merge the main branch and update the CHANGELOG as suggested, so I can merge this PR.
Co-authored-by: Sam Xie <sam@samxie.me>
DisableSkipErrMetrics will skip the recoding of any SkipErr metric if enabled.
Since SkipErr results in a retry, the actual database interaction will still be recorded.
Closes #386