-
Notifications
You must be signed in to change notification settings - Fork 150
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
Feature request: Allow either forced or increased debug log sampling when error occurs #1480
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Ho @bilalq thank you for opening the issue - if I'm understanding correctly the feature you're proposing should be similar to what described in #519. If that's the case, would you mind adding a 👍 there as well as a comment with your use case (or linking this issue)? This way we can aggregate the demand for the feature and collaborate on a potential design. If they're not the same, could you please elaborate on how they're different? Thanks again for opening the issue! |
Yeah, this is a duplicate. Thanks for pointing that one out. |
|
|
Use case
Debug logging can be problematically verbose, so the logger allows for it to be sampled. That's great. But that sampling happens with no consideration for whether the request succeeds or fails. In cases where a rare error occurs, it'd be great if debug logging could be included, irrespective of the sample rate.
Solution/User Experience
One approach might be to detect any occurrence of a
.error()
call on the logger and retroactively flush any debug log messages to stdout. One nuance here is that they'll hit stdout at a different point in time compared to when they requested to be logged.Another approach might be to just have a method like
forceFlushDebugLogs()
or something so users can call it on their own error handler.Alternative solutions
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: