Repository navigation
Conversation
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0dc8546. Configure here.
logaretm
marked this pull request as ready for review
October 19, 2026 17:58
logaretm
requested review from
JPeer264 and
mydea
and removed request for
a team
October 19, 2026 17:58
Contributor
size-limit report 📦
|
1 of 3 tasks
JPeer264
approved these changes
Oct 20, 2026
A process that exits on its own lost every span still in the span buffer, since its flush timers are unref'd. Flush it on `beforeExit`, like logs and metrics.
logaretm
force-pushed
the
awad/span-buffer-before-exit-flush
branch
from
October 20, 2026 13:14
0dc8546 to
1f7fb22
Compare
Lms24
reviewed
Oct 20, 2026
Lms24
left a comment
Member
There was a problem hiding this comment.
thanks for fixing. Had a question though
|
|
||
| // The span buffer's timers are unref'd, so a natural exit would drop its spans. | ||
| this._spanOnExitFlushListener = () => { | ||
| this.emit('flush'); |
Member
There was a problem hiding this comment.
If we emit flush here, do we even still need the _INTERNAL_flushLogsBuffer and _INTERNAL_flushMetricsBuffer above? The two buffers also listen to client.on('flush')
Member
Author
There was a problem hiding this comment.
I think we can merge all of them into one beforeExist listener.
Member
There was a problem hiding this comment.
yes, exactly, thanks for changing!
Lms24
approved these changes
Oct 21, 2026
This branch has not been deployed
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.
Spans waiting in the stream buffer were dropped when a Node process exited on its own, fixed by flushing the buffer on
beforeExitlike we already do for logs and metrics.The test emits
beforeExitwith a buffered span and checks it gets sent.closes #25531