#14086·langflow

Upgrade Langfuse tracing integration to Python SDK v4

Author: hassiebpCreated Jul 15, 2026Updated Sep 14, 2026
Labelsenhancement

Hi Langflow team — I'm Hassieb from the Langfuse team.

Langfuse Cloud's Fast Preview is observations-first. For real-time data in the new UI, Python integrations should use SDK v4.7.0+.

I reviewed services/tracing/langfuse.py; this looks like a focused v3→v4 migration:

  • Bump the optional dependency from langfuse~=3.8 to a v4-compatible range such as langfuse>=4.7,<5.
  • Rename root and child start_span calls to start_observation.
  • Replace the root .update_trace(...) calls with propagate_attributes() around observation creation so trace name, user, session, and metadata are present on every child span.
  • Re-run the custom LangChain root-LLM reparenting and feedback/score tests to confirm the tree remains connected under v4.
  • Keep the isolated TracerProvider setup and verify its flush/shutdown behavior.

The relevant guide is Python SDK v3→v4.

If you need support with the migration, we're happy to jump on a call or help review a PR.