Skip to content

feat(logger): refresh sample rate calculation per invocation #3644

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

Merged

Conversation

am29d
Copy link
Contributor

@am29d am29d commented Feb 24, 2025

…in logger context## Summary

Changes

Please provide a summary of what's being changed

This PR modifies the sampleRate behaviour for the logger and will now sample per invocation, instead of execution environment. When using injectLambdaContext either as decorator or as middleware, we now automatically refresh sample rate.

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: closes #3278


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@am29d am29d requested review from a team as code owners February 24, 2025 12:12
@am29d am29d requested a review from dreamorosi February 24, 2025 12:12
@am29d am29d self-assigned this Feb 24, 2025
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation logger This item relates to the Logger Utility tests PRs that add or change tests labels Feb 24, 2025
@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label Feb 24, 2025
@github-actions github-actions bot added the feature PRs that introduce new features or minor changes label Feb 24, 2025
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor comment in the docs, other than that it's good to go.

@am29d am29d requested a review from dreamorosi February 24, 2025 12:51
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick PR

@am29d am29d merged commit 1d66a2a into main Feb 24, 2025
41 checks passed
@am29d am29d deleted the issue3278/Feature-request-Calculate-Log-Sampling-Per-Request branch February 24, 2025 12:53
dreamorosi added a commit that referenced this pull request Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature PRs that introduce new features or minor changes logger This item relates to the Logger Utility size/M PR between 30-99 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Calculate Log Sampling Per Request
2 participants