docs(livekit): set the session root span kind to conversation so calls reach the voice UI - #804
Open
abhijaisrivastava15 wants to merge 1 commit into
Open
docs(livekit): set the session root span kind to conversation so calls reach the voice UI#804abhijaisrivastava15 wants to merge 1 commit into
abhijaisrivastava15 wants to merge 1 commit into
Conversation
The voice call list selects on observation_type = 'conversation'. Both LiveKit pages instructed fi_span_kind="agent" on the root, so a trace built by following them never reached the voice surface.
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.
Both LiveKit pages tell you to type the one span kind that hides your call from the voice product.
What was wrong
The session root span is created with
fi_span_kind="agent":The voice call list is built by
VoiceCallListQueryBuilder, and it selects on exactly two things (futureagi/tracer/services/clickhouse/query_builders/voice_call_list.py:123-124):An
agentroot fails the second condition. So a LiveKit app instrumented by following our own page emits a correct, complete trace that the voice surface never returns. The page has saidagenton both listings since it was written, which is every LiveKit reader we have had.conversationis not something that needs adding. It already exists on both sides:FiSpanKindValues.CONVERSATIONinfi_instrumentation/fi_types.pyObservationType.CONVERSATION = "conversation", added in tracer migration0026What changed
docs/integrations/traceai/livekit.mdxagenttoconversation, both listingsdocs/tracing/auto/livekit.mdxFour occurrences, plus one comment line so the next reader does not "correct" it back on a page whose span is named "Agent Session".
Why, reproduced not read
Two identical LiveKit-shaped traces were sent into one project on a local stack, differing only in the root's
fi_span_kind.Both landed:
The product's own endpoint, the one the voice grid calls, returns one of them:
606a63d8is theconversationroot. Theagentroot is absent.Test cases
fi_span_kind="conversation"observation_type = 'conversation'list_voice_callsfi_span_kind="agent"list_voice_callsfi_span_kind="CONVERSATION"(uppercase string)node scripts/audit-links.mjsCommands
Not in this PR
The voice grid is gated on project source, separately from the span kind.
LLMTracingView.jsx:4454renders the call-log grid only whenprojectDetail.source === "simulator", and a project created by an SDK push defaults tosource = "prototype". There is a backend comment acknowledging the coupling inmodel_hub/utils/annotation_queue_helpers.py:1524.So this PR is necessary and it is not sufficient. It makes the data correct and makes the call reachable through the voice API. Getting a self-hosted LiveKit project onto the voice grid also needs a product-side answer for how a pushed project gets the voice source. That is a code change, not a docs change, and it is being picked up separately.
The duplicate LiveKit page is also left alone here.
docs/tracing/auto/livekit.mdxis byte-identical to the integrations copy apart from its frontmatter, and only the integrations copy is in the sidebar. Both are live, so both are fixed, but deduplicating them is its own call.