Skip to content

chore(logger): clear prev request buffers in manual mode #6314

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
merged 1 commit into from
Mar 20, 2025

Conversation

leandrodamascena
Copy link
Contributor

Issue number: #6310

Summary

Changes

The PR updates the default behavior of the log buffering feature in the Logger utility to clear existing buffers whenever creating the buffer for a new request. This was already the case when using decorators or flush_buffer method.

This PR aligns the behavior also for manual mode, aka when customers are not using either of the two patterns above. This will help reduce the likelihood that customers forget to clear log buffers and risk exhausting the memory available in the sandbox.

The PR also adds an additional item to the feature FAQs to document how the Logger calculates the size of each log entry. This should address questions from customers on the topic, which came in from early adopters.

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

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.

@leandrodamascena leandrodamascena requested a review from a team as a code owner March 20, 2025 12:17
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 20, 2025
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation logger tests labels Mar 20, 2025
@leandrodamascena leandrodamascena linked an issue Mar 20, 2025 that may be closed by this pull request
2 tasks
@leandrodamascena leandrodamascena self-assigned this Mar 20, 2025
@github-actions github-actions bot added internal Maintenance changes and removed documentation Improvements or additions to documentation labels Mar 20, 2025
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.32%. Comparing base (c9c4142) to head (d5dffce).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6314   +/-   ##
========================================
  Coverage    96.32%   96.32%           
========================================
  Files          242      242           
  Lines        11674    11676    +2     
  Branches       864      865    +1     
========================================
+ Hits         11245    11247    +2     
  Misses         336      336           
  Partials        93       93           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leandrodamascena
Copy link
Contributor Author

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.

LGTM

@leandrodamascena leandrodamascena merged commit 6424f69 into develop Mar 20, 2025
27 checks passed
@leandrodamascena leandrodamascena deleted the feat/clear-buffer-log branch March 20, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Maintenance changes logger size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Clear log buffer before starting next one
2 participants