langfuse-performance-tuning

Featured

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".

AI & Automation 2,944 stars 440 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 Performance Tuning ## Overview Optimize Langfuse tracing for minimal overhead and maximum throughput: benchmark measurement, batch tuning, non-blocking patterns, payload optimization, sampling, and memory management. ## Prerequisites - Existing Langfuse integration - Performance baseline to compare against - Understanding of async patterns ## Performance Targets | Metric | Target | Critical | |--------|--------|----------| | Trace creation overhead | < 1ms | < 5ms | | Flush latency (batch) | < 100ms | < 500ms | | Memory per active trace | < 1KB | < 5KB | | CPU overhead | < 1% | < 5% | ## Instructions ### Step 1: Benchmark Current Performance ```typescript // scripts/benchmark-langfuse.ts import { performance } from "perf_hooks"; import { startActiveObservation, updateActiveObservation } from "@langfuse/tracing"; import { LangfuseSpanProcessor } from "@langfuse/otel"; import { NodeSDK } from "@opentelemetry/sdk-node"; async function benchmark() { const sdk = new NodeSDK({ spanProcessors: [new LangfuseSpanProcessor()], }); sdk.start(); const iterations = 1000; // Measure trace creation const timings: number[] = []; for (let i = 0; i < iterations; i++) { const start = performance.now(); await startActiveObservation(`bench-${i}`, async () => { updateActiveObservation({ input: { i }, output: { done: true } }); }); timings.push(performance.now() - start); } const sorted = timings.sort((a, b) => a - b); console.log(...

Details

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

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category