feat(metrics): add playback_latency metric#5524
Conversation
| Typically very small; can be significant when a remote avatar worker is in the chain. | ||
|
|
||
| Assistant `ChatMessage` only | ||
| """ |
There was a problem hiding this comment.
Makes sense! Is it included inside the e2e_latency?
There was a problem hiding this comment.
yes, it's included inside the e2e_latency
| """ | ||
|
|
||
| playback_start_latency: float | ||
| """Latency between the first audio frame being forwarded and playback starting on the client. |
There was a problem hiding this comment.
Latency between the first audio frame being forwarded and playback starting on the client
It isn't really accurate tho? We don't know when the client is playing the audio (+ network latency?)
It's true for avatars. But we should maybe clarify
There was a problem hiding this comment.
yeah, it didn't include the network latency, updated the docstring.
|
This is an automated Claude Code Routine created by @toubatbrian. Right now it is in experimentation stage. The automation will start porting this PR into agents-js automatically. Classification: core runtime improvement (new Verified that no existing PR or branch in Generated by Claude Code |
Summary
Adds a new
playback_latencymetric on assistantChatMessages, measuring the time between the first audio frame being forwarded and playback actually starting.This metric is typically near-zero in normal pipelines, and becomes significant when a remote avatar worker is in the chain. Requires playback_started RPC call from the avatar to measure this latency #5511