langfuse

Instrument LLM applications with Langfuse tracing, prompt management, and evaluation.

2|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/Shubh2310-developer/ENGUNITYCORE --skill langfuse-shubh2310-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langfuse
Source: https://github.com/Shubh2310-developer/ENGUNITYCORE/tree/main/.claude/skills/langfuse
Command: npx skills add https://github.com/Shubh2310-developer/ENGUNITYCORE --skill langfuse-shubh2310-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires langfuse.

What problem does it solve? LLM applications in production lack visibility into cost, latency, and output quality, making it hard to debug failures, track regressions, and improve prompts based on real usage data. ## Core Features & Use Cases - LLM Tracing: Capture traces, generations, and spans for every LLM call with user IDs, session IDs, tags, and metadata. - Framework Integrations: Automatically trace OpenAI SDK calls (sync, async, streaming) and LangChain chains, agents, and retrievers via a callback handler. - Evaluation and Scoring: Attach user feedback scores to traces, manage prompt versions, and run A/B tests on prompts. - Use Case: A team running a customer-support chatbot traces every conversation with session IDs, scores responses with user feedback, and uses the Langfuse dashboard to compare prompt versions and catch quality regressions. ## Quick Start Set up Langfuse tracing for my OpenAI chat completion calls with user and session tracking.

Frequently Asked Questions about langfuse

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace OpenAI API calls with Langfuse?

Use the langfuse.openai drop-in replacement for the OpenAI client, which automatically traces all calls. Pass extra parameters like name, session_id, user_id, tags, and metadata directly in the completion call, including for streaming and async usage.

How to add Langfuse tracing to a LangChain application?

Create a Langfuse CallbackHandler with your keys and pass it via config={"callbacks": [handler]} when invoking chains, agents, or retrievers. You can also set it as the default handler so all LangChain calls are traced automatically.

Does Langfuse work in serverless environments?

Yes, but traces are batched, so you must call langfuse.flush() before the function exits or data is lost. For critical traces, consider synchronous mode or context managers to guarantee delivery.

Why are my Langfuse traces missing data?

Missing data usually comes from not flushing the client before process exit, or from not ending generations with output and usage fields. Always call generation.end() with the response content and token usage, then flush.

What are the limitations of Langfuse for LLM monitoring?

Self-hosting requires managing your own infrastructure, and high-volume workloads may need optimization. The real-time dashboard has some latency, and evaluation features require additional setup such as datasets and scoring configuration.