Skip to content
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

Closed
2 tasks done
bilalq opened this issue Jun 1, 2023 · 5 comments
Closed
2 tasks done
Assignees
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

Comments

@bilalq
Copy link

bilalq commented Jun 1, 2023

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.

@bilalq bilalq added triage This item has not been triaged by a maintainer, please wait feature-request This item refers to a feature request for an existing or new utility labels Jun 1, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 1, 2023

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@dreamorosi
Copy link
Contributor

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!

@dreamorosi dreamorosi added logger This item relates to the Logger Utility discussing The issue needs to be discussed, elaborated, or refined and removed triage This item has not been triaged by a maintainer, please wait labels Jun 1, 2023
@bilalq
Copy link
Author

bilalq commented Jun 2, 2023

Yeah, this is a duplicate. Thanks for pointing that one out.

@bilalq bilalq closed this as completed Jun 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@bilalq bilalq closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@bilalq bilalq changed the title Feature request: Allow either forced or increase debug log sampling when error occurs Feature request: Allow either forced or increased debug log sampling when error occurs Jun 2, 2023
@dreamorosi dreamorosi added rejected This is something we will not be working on. At least, not in the measurable future and removed discussing The issue needs to be discussed, elaborated, or refined labels Jun 2, 2023
@dreamorosi dreamorosi self-assigned this Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants