Repository navigation
Conversation
|
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.
size-limit report 📦Compared: 4e966af (PR test merge using develop at ca4fc32) Against: ca4fc32 (develop) · base run #62950 ✅ Baseline matches: this diff contains only this PR's changes.
|
0dc8546 to
1f7fb22
Compare
Lms24
left a comment
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'); |
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')
There was a problem hiding this comment.
I think we can merge all of them into one beforeExist listener.
There was a problem hiding this comment.
yes, exactly, thanks for changing!
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.
fa95485 to
0ea3626
Compare
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