Home / Companies / Langfuse / Blog / Post Details
Content Deep Dive

Trace complex LLM applications with the Langfuse decorator (Python)

Blog post from Langfuse

Post Details
Company
Date Published
Author
Marc Klingen, Hassieb Pakzad
Word Count
1,537
Company Posts That Month
3
Language
English
Hacker News Points
-
Post removed?
No
Summary

Langfuse has developed the @observe() decorator to simplify tracing and evaluating complex LLM applications in Python, particularly useful for those involving numerous LLM calls and non-LLM inputs. Initially developed in response to the challenges faced during Y Combinator with web scraping and code generation agents, Langfuse aims to provide LLM-focused observability by abstracting away the complexity of creating and nesting traces. The decorator integrates seamlessly with frameworks like LangChain, LlamaIndex, and the OpenAI SDK, capturing function calls, arguments, outputs, and exceptions while maintaining the nesting hierarchy. It supports async environments but has limitations with Python’s ThreadPoolExecutors and ProcessPoolExecutors due to context management issues. Inspired by tools like Sentry and Modal, the decorator reuses the low-level SDK for tracing without impacting application performance and is part of a broader strategy to enable teams to experiment across frameworks while using Langfuse as a central platform for observability and evaluation. Currently available for Python, plans are in place to extend this functionality to JavaScript/TypeScript.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
LLM 13 3,398 379 136 +44%
Observability 7 1,227 261 93 -15%
Developer Experience 1 254 166 85 -22%
OpenTelemetry 1 370 47 21 -50%
RAG 1 1,795 223 72 +55%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.