Feature request: Allow either forced or increased debug log sampling when error occurs #1480
Closed
2 tasks done
Labels
feature-request
This item refers to a feature request for an existing or new utility
logger
This item relates to the Logger Utility
rejected
This is something we will not be working on. At least, not in the measurable future
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: