langfuse-local-dev-loop

Featured

Set up Langfuse local development workflow with hot reload and debugging. Use when developing LLM applications locally, debugging traces, or setting up a fast iteration loop with Langfuse. Trigger with phrases like "langfuse local dev", "langfuse development", "debug langfuse traces", "langfuse hot reload", "langfuse dev workflow".

AI & Automation 2,926 stars 433 forks Updated yesterday 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 Local Dev Loop ## Overview Fast local development workflow with Langfuse tracing, immediate trace visibility, debug logging, and optional self-hosted local instance via Docker. ## Prerequisites - Completed `langfuse-install-auth` setup - Node.js 18+ with `tsx` for hot reload (`npm install -D tsx`) - Docker (optional, for self-hosted local instance) ## Instructions ### Step 1: Development Environment File ```bash # .env.local (git-ignored) LANGFUSE_PUBLIC_KEY=pk-lf-dev-... LANGFUSE_SECRET_KEY=sk-lf-dev-... LANGFUSE_BASE_URL=https://cloud.langfuse.com # Dev-specific settings NODE_ENV=development OPENAI_API_KEY=sk-... ``` ### Step 2: Dev-Optimized Langfuse Setup (v4+) ```typescript // src/lib/langfuse-dev.ts import { LangfuseSpanProcessor } from "@langfuse/otel"; import { NodeSDK } from "@opentelemetry/sdk-node"; import { LangfuseClient } from "@langfuse/client"; const isDev = process.env.NODE_ENV !== "production"; // Configure span processor with dev-friendly settings const processor = new LangfuseSpanProcessor({ // In dev: flush immediately for instant visibility ...(isDev && { exportIntervalMillis: 1000, maxExportBatchSize: 1 }), }); const sdk = new NodeSDK({ spanProcessors: [processor] }); sdk.start(); export const langfuse = new LangfuseClient(); // Print trace URLs in development export function logTrace(traceId: string) { if (isDev) { const host = process.env.LANGFUSE_BASE_URL || "https://cloud.langfuse.com"; console.log(`\n Trace: $...

Details

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

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category