Skip to content

Add Langfuse tracing for voice sessions - #1

Open
Johnkothapalli wants to merge 7 commits into
mainfrom
langfuse-integration
Open

Add Langfuse tracing for voice sessions#1
Johnkothapalli wants to merge 7 commits into
mainfrom
langfuse-integration

Conversation

@Johnkothapalli

@Johnkothapalli Johnkothapalli commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • add optional Langfuse v4 tracing to the QuickVoice LiveKit voice runtime
  • capture voice-session metadata and privacy-aware user/agent transcript observations
  • record completion and turn-count evaluator observations plus native Langfuse scores
  • add a smoke script, setup documentation, and a focused recording guide

Privacy and reliability

  • transcript content is redacted by default
  • zero-PII retention always redacts content while preserving non-sensitive turn counts
  • Langfuse failures do not interrupt voice sessions
  • failed session starts finalize with an error evaluation instead of leaving an open trace

Verification

  • python -m py_compile apps\\ai\\handlers\\langfuse_handler.py apps\\ai\\handlers\\transcript_collector.py apps\\ai\\main.py apps\\ai\\scripts\\langfuse_trace_smoke.py apps\\ai\\tests\\test_langfuse_handler.py apps\\ai\\tests\\test_transcript_collector.py
  • python -m unittest apps.ai.tests.test_langfuse_handler apps.ai.tests.test_transcript_collector (9 tests passed)
  • live smoke trace ingested by Langfuse: langfuse-smoke-1784888287
  • API read-back confirmed call_completed = 1.0 (BOOLEAN) and transcript_turn_count = 2.0 (NUMERIC)

The smoke script exercises the same LangfuseCallTracer used by apps/ai/main.py; a full phone call is not required to verify Langfuse ingestion.

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.

1 participant