Skip to content

VAPI-4167 feat: trace call stats every 10 seconds while in a call - #26

Merged
smoghe-bw merged 1 commit into
mainfrom
VAPI-4167_in-call-stats-trace
Oct 14, 2026
Merged

smoghe-bw merged 1 commit into
mainfrom
VAPI-4167_in-call-stats-trace

Conversation

@smoghe-bw

@smoghe-bw smoghe-bw commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Jira: VAPI-4167

Summary

  • Adds an in-call stats trace: every 10 seconds while at least one subscribe call stream is active, the SDK logs an In-call stats snapshot at debug level.
  • Starts when the first call stream becomes available (onStreamAvailable). Ends with a Final in-call stats (<reason>) snapshot when the last call stream ends (call ended), on disconnect, on signaling disconnected, on a replacing connect, and on a signaling reconnect (the old streams never fire onremovetrack after the subscribe peer connection is rebuilt).
  • The existing 5-minute Call stats trace is unchanged. The two traces run independently, keep separate bitrate baselines, and may log at the same moment.
  • All SDK log lines already go to the gateway as deviceDiagnostics, so the in-call snapshots reach the diagnostics S3 export for accounts enabled in diagnostics.s3ExportAccountIds.

Test plan

  • npm test (prettier + jest): 166 passed, including new in-call trace tests (start/stop on stream lifecycle, concurrent streams, disconnect, reconnect, independence from the 5-minute trace, baseline handling, final read before peer connection close)

🤖 Generated with Claude Code

A second trace runs only while a subscribe call stream is active: it starts
when the first call stream becomes available and logs a final snapshot when
the last one ends, on disconnect, or on a signaling reconnect. The 5-minute
trace is unchanged; the two run independently and may log at the same time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@smoghe-bw
smoghe-bw requested review from a team as code owners October 14, 2026 19:16
@bwappsec

bwappsec commented Oct 14, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@smoghe-bw
smoghe-bw merged commit f7e2909 into main Oct 14, 2026
5 checks passed
@smoghe-bw
smoghe-bw deleted the VAPI-4167_in-call-stats-trace branch October 14, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants