feat(metrics): add playback_start_latency metric#5524
Open
Conversation
theomonnom
reviewed
Apr 24, 2026
| Typically very small; can be significant when a remote avatar worker is in the chain. | ||
|
|
||
| Assistant `ChatMessage` only | ||
| """ |
Member
There was a problem hiding this comment.
Makes sense! Is it included inside the e2e_latency?
Contributor
Author
There was a problem hiding this comment.
yes, it's included inside the e2e_latency
theomonnom
reviewed
Apr 24, 2026
theomonnom
reviewed
Apr 24, 2026
| """ | ||
|
|
||
| playback_start_latency: float | ||
| """Latency between the first audio frame being forwarded and playback starting on the client. |
Member
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
Contributor
Author
There was a problem hiding this comment.
yeah, it didn't include the network latency, updated the docstring.
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.
Summary
Adds a new
playback_start_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