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
XSAM
left a comment
There was a problem hiding this comment.
@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. |
XSAM
left a comment
There was a problem hiding this comment.
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 <[email protected]>
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