-
Notifications
You must be signed in to change notification settings - Fork 473
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
Sentry doesn't report errors in the traces_sampler function #2582
Comments
Hey @brettdh thanks for reporting this. |
by design, we do not report exceptions in SDK code, you should see it in logs if you add |
@sl0thentr0py can you elaborate on "by design"? It seems like an observability gap; i.e. an exception in the sampling function can quietly cause all requests to fail. Further, the sampling function was a bit hard to write, due to the context object format being largely undocumented, and this makes me all the more nervous that I may have missed some corner case - which is why I wanted to make sure I still have error reporting for the sampling function (which is my code, not SDK code). |
for one - if we self-report, we can end up in a busy loop of reporting. |
Hmm. I got bit by this again today - due to a real Oddly, I did see a seemingly-spurious
I say the error is spurious because, as you see in the logs, the lambda execution was only 36 ms, not 29 seconds. |
We should properly define the expected behavior when a custom FWIW I do think we should make this sort of errors easier to discover, or at least make it clearer how to notice them. We've had some cases recently where folks were confused why there were no transactions appearing in Sentry and it took a long time to trace it back to a faulty |
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.38.0
Steps to Reproduce
sentry_sdk.init
with atraces_sampler=
kwarg of a function that raises an exception.Expected Result
Error in sampling function is reported to Sentry
Actual Result
Unhandled error occurs (found in logs), but no Sentry issue is created.
where
path
wasNone
.The text was updated successfully, but these errors were encountered: