chore: periodically log webrtc stats - #2064
Conversation
🦋 Changeset detectedLatest commit: f1d0993 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
| jitterBufferMs: jitterBufferMs(stat), | ||
| audioLevel: stat.audioLevel, | ||
| totalSamplesReceived: stat.totalSamplesReceived, | ||
| concealedSamples: stat.concealedSamples, |
There was a problem hiding this comment.
can we add playoutDelay to this please? Would be helpful to look at in cases where that is enabled.
…k-js into lukas/log-webrtc-stats
| private logFinalStats() { | ||
| if (this.finalStatsLogged) { | ||
| return; | ||
| } | ||
| this.finalStatsLogged = true; | ||
| this.getRTCStatsReport() | ||
| .then((report) => { | ||
| if (report) { | ||
| this.log.info('final track stats', summarizeStatsReport(report)); | ||
| } | ||
| }) | ||
| .catch((error) => this.log.debug('could not collect final track stats', { error })); |
There was a problem hiding this comment.
🟡 Final stats skipped for naturally-ended remote tracks
When a remote track's media is removed, setMediaStream's removetrack handler clears this.receiver before emitting Ended, which synchronously runs stopMonitor and logFinalStats. getRTCStatsReport then returns undefined, so the new final-stats log never fires for remote tracks that end on their own.
Was this helpful? React with 👍 or 👎 to provide feedback.
No description provided.