Repository navigation
feat(telemetry/utils): add ttft reporting to LangFuse - #3594
Merged
Merged
Conversation
bml1g12
marked this pull request as ready for review
October 7, 2025 12:33
longcw
reviewed
Oct 8, 2025
| # Langfuse only allows searching/filtering/graphing over fields if they are prefixes with this key OR | ||
| # which use a set of reserved keys like ATTR_GEN_AI and ATTR_LANGFUSE items above. | ||
| # so e.g. ATTR_LANGFUSE_SEARCHABLE_PREFIX + "foo" will allow `foo` to be a filterable attribute in langfuse. | ||
| ATTR_LANGFUSE_SEARCHABLE_PREFIX = "langfuse.trace.metadata." |
Contributor
There was a problem hiding this comment.
is this used anywhere? if not it's better to not include it in the types.
Contributor
Author
There was a problem hiding this comment.
you don't think its useful reference for devs (i.e. to sign post you cannot assume simply adding an atrribute makes it useful for searching/graphing in langfuse)? This information was a little hard for me to find as a developer and surprising behaviour in LangFuse (that metadata attached to a trace is not searchable unless nested under very specific namespaces).
But OK I have removed it now
Contributor
There was a problem hiding this comment.
I think it's langfuse should document this somewhere, we may not want to add too many platform-specific vars in the codebase.
longcw
approved these changes
Oct 8, 2025
akshaym1shra
pushed a commit
to akshaym1shra/agents
that referenced
this pull request
Oct 28, 2025
meetakshay99
added a commit
to meetakshay99/agents
that referenced
this pull request
Oct 30, 2025
* staging: (114 commits) Added min_confidence_threshold for deepgram flux. livekit-agents 1.2.15 (livekit#3658) fix livekit#3650 cartesia version backward compatibility (livekit#3651) Unprompted STT Reconnection at startup (livekit#3649) enable zero retention mode in elevenlabs (livekit#3647) fix: heartbeat (livekit#3648) feat: Integrate streaming endpoints for Sarvam APIs (livekit#3498) turn_detection: reduce max_endpointing_delay to 3s (livekit#3640) fix: exclude temperature parameter for gpt-5 and similar models (livekit#3573) add backwards compatibility for google's realtime model (livekit#3630) Align Google STT plugin with official documentation (livekit#3628) feat(speechmatics): add max_speakers parameter for speaker diarization (livekit#3524) fix(deepgram): send CloseStream message before closing TTS WebSocket (livekit#3608) chore: Remove duplicate docstring for `preemptive_generation` parameter in AgentSession (livekit#3624) Add RTZR(ReturnZero) STT Plugin for LiveKit Agents (livekit#3376) feat(telemetry/utils): add ttft reporting to LangFuse (livekit#3594) catch delete_room errors and disable delete_room_on_close by default (livekit#3600) lift google realtime api out of beta (livekit#3614) fix: lock pyav to <16 due to build issue (livekit#3593) Updating Cartesia Version (livekit#3570) ...
akshaym1shra
pushed a commit
to akshaym1shra/agents
that referenced
this pull request
Nov 3, 2025
akshaym1shra
pushed a commit
to akshaym1shra/agents
that referenced
this pull request
Nov 10, 2025
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.
This PR extends the recent addition of TTFT metrics to Realtime API kindly provided by @longcw #3507 to allow LangFuse to natively parse this data, as currently it is not possible to Dashboard or filter on TTFT.
This PR makes two changes:
ATTR_LANGFUSE_COMPLETION_START_TIME = "langfuse.observation.completion_start_time"namespace, similarly to how in the codebase we already do for regular non-realtime LLMs.