langfuse API documentation
The SDK was rewritten in v3 and released in June 2025. Refer to the v3 migration guide for instructions on updating your code. Please see our docs for detailed information on this SDK. Main client for Langfuse tracing and platform features. This class provides an interface for creating and managing traces, spans, and generations in Langfuse as well as interacting with the Langfuse API. The client features a thread-safe singleton pattern for each unique public API key, ensuring consistent trace context propagation across your application. It implements efficient batching of spans with configurable flush settings and includes background thread management for media uploads and score ingestion. Configuration is flexible through either direct parameters or environment variables, with graceful fallbacks and runtime configuration updates. Create a new span for tracing a unit of work. This method creates a new span but does not set it as the current span in the context. To create and use a spa
langfuse API documentation langfuse Langfuse Python SDK — observability, evaluation, and prompt management for LLM applications. Capabilities: Tracing / observability : @observe decorator, Langfuse.start_observation / start_as_current_observation context managers, OpenTelemetry-based; integrations for OpenAI ( langfuse.openai ) and LangChain ( langfuse.langchain.CallbackHandler ). Trace attributes : propagate_attributes (top-level function) sets user_id, session_id, tags, and metadata on all spans in a context. Datasets & experiments : Langfuse.get_dataset , Langfuse.run_experiment for offline
Explore this link on the map →related reading
- Langfuselangfuse.com
- How to Build End-to-End LLM Observability in FastAPI with OpenTelemetryfreecodecamp.org
- GitHub - traceloop/openllmetry: Open-source observability for your GenAI or LLM application, based on OpenTelemetry · GitHubgithub.com
- Cookbookcookbook.openai.com
- A Guide to Claude Code 2.0 and getting better at using coding agents – sankalp's blogsankalp.bearblog.dev
- Logfire Docs: Getting Started with Pydantic Logfirepydantic.dev
- Agent Observability and Tracingarize.com
- Overview | OpenTelemetryopentelemetry.io
- GitHub - brexhq/prompt-engineering: Tips and tricks for working with Large Language Models like OpenAI's GPT-4. · GitHubgithub.com
- The Problem With LangChain | Max Woolf's Blogminimaxir.com
- Go Instrumentation Auto SDK | OpenTelemetryopentelemetry.io
- OpenAI Platformplatform.openai.com