langfuse-reference-architecture

Featured

Production-grade Langfuse architecture patterns and best practices. Use when designing LLM observability infrastructure, planning Langfuse deployment, or implementing enterprise-grade tracing architecture. Trigger with phrases like "langfuse architecture", "langfuse design", "langfuse infrastructure", "langfuse enterprise", "langfuse at scale".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Langfuse Reference Architecture ## Overview Production-grade architecture patterns for Langfuse LLM observability: singleton SDK, context propagation with `AsyncLocalStorage`, cross-service trace correlation, multi-environment configurations, and scale strategies. ## Prerequisites - Understanding of distributed systems and async patterns - Node.js 18+ with OpenTelemetry SDK - For v4+: `@langfuse/tracing`, `@langfuse/otel`, `@opentelemetry/sdk-node` ## Architecture Tiers | Tier | Scale | Architecture | Langfuse Host | |------|-------|-------------|---------------| | Starter | < 100K traces/day | Direct SDK, Cloud | Langfuse Cloud | | Growth | 100K-1M traces/day | Singleton + batching | Cloud or Self-hosted | | Enterprise | 1M+ traces/day | Queue-buffered + sampling | Self-hosted (HA) | ## Instructions ### Pattern 1: Singleton SDK with Context Propagation ```typescript // src/lib/tracing.ts -- Single module for all tracing import { LangfuseClient } from "@langfuse/client"; import { LangfuseSpanProcessor } from "@langfuse/otel"; import { NodeSDK } from "@opentelemetry/sdk-node"; import { AsyncLocalStorage } from "async_hooks"; // Singleton OTel SDK let sdk: NodeSDK | null = null; export function initTracing() { if (sdk) return sdk; sdk = new NodeSDK({ spanProcessors: [ new LangfuseSpanProcessor({ exportIntervalMillis: 5000, maxExportBatchSize: 50, }), ], }); sdk.start(); // Graceful shutdown for (const signal of ["SIGT...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

langfuse-sdk-patterns

Langfuse SDK best practices, patterns, and idiomatic usage. Use when learning Langfuse SDK patterns, implementing proper tracing, or following best practices for LLM observability. Trigger with phrases like "langfuse patterns", "langfuse best practices", "langfuse SDK guide", "how to use langfuse", "langfuse idioms".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langfuse-hello-world

Create a minimal working Langfuse trace example. Use when starting a new Langfuse integration, testing your setup, or learning basic Langfuse tracing patterns. Trigger with phrases like "langfuse hello world", "langfuse example", "langfuse quick start", "first langfuse trace", "simple langfuse code".

2,266 Updated today
jeremylongshore
AI & Automation Solid

langfuse

Expert in Langfuse - the open-source LLM observability platform. Covers tracing, prompt management, evaluation, datasets, and integration with LangChain, LlamaIndex, and OpenAI. Essential for debugging, monitoring, and improving LLM applications in production. Use when: langfuse, llm observability, llm tracing, prompt management, llm evaluation.

27,681 Updated today
davila7
AI & Automation Listed

langfuse

Expert in Langfuse - the open-source LLM observability platform. Covers tracing, prompt management, evaluation, datasets, and integration with LangChain, LlamaIndex, and OpenAI. Essential for debugging, monitoring, and improving LLM applications in production. Use when: langfuse, llm observability, llm tracing, prompt management, llm evaluation.

335 Updated today
aiskillstore
AI & Automation Featured

langfuse-performance-tuning

Optimize Langfuse tracing performance for high-throughput applications. Use when experiencing latency issues, optimizing trace overhead, or scaling Langfuse for production workloads. Trigger with phrases like "langfuse performance", "optimize langfuse", "langfuse latency", "langfuse overhead", "langfuse slow".

2,266 Updated today
jeremylongshore