Introduce log event buffering#2619
Merged
Merged
Conversation
Closed
sl0thentr0py
reviewed
May 9, 2025
|
|
||
| def flush | ||
| @mutex.synchronize do | ||
| return unless size >= @max_events |
Member
There was a problem hiding this comment.
in the case where someone adds only say 5 logs, these will never get sent, even at the exit flush
Member
There was a problem hiding this comment.
what you want instead is
- a periodic flush all the time
- a force flush when the size exceeds while adding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Next step in our logging story - this adds a log event buffer, so that log events are buffered until they hit the limit set as a new config option called
max_log_events, and then they are all packaged under the same envelope and sent right away.Closes #2613
I tested it out and it works:
#skip-changelog