langfuse-multi-env-setup

Featured

Configure Langfuse across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment keys, or implementing environment-specific Langfuse configurations. Trigger with phrases like "langfuse environments", "langfuse staging", "langfuse dev prod", "langfuse environment setup", "langfuse config by env".

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 Multi-Environment Setup ## Overview Configure Langfuse across dev/staging/production with isolated API keys, environment-specific SDK settings, secret management, and CI/CD integration to prevent cross-environment data leakage. ## Prerequisites - Separate Langfuse API key pairs per environment (or separate projects) - Secret management solution (env vars, Vault, AWS/GCP secrets) - CI/CD pipeline with environment-aware deployment ## Environment Strategy | Environment | API Key Source | Langfuse Project | Settings | |-------------|---------------|-----------------|----------| | Development | `.env.local` | Dev project | Debug on, flush immediately, 100% sampling | | Staging | CI/CD secrets | Staging project | Prod-like settings, 50% sampling | | Production | Secret manager | Prod project | Optimized batching, 10% sampling | ## Instructions ### Step 1: Environment-Specific Configuration ```typescript // src/config/langfuse.ts import { LangfuseSpanProcessor } from "@langfuse/otel"; import { NodeSDK } from "@opentelemetry/sdk-node"; import { LangfuseClient } from "@langfuse/client"; type Env = "development" | "staging" | "production"; interface LangfuseEnvConfig { exportIntervalMillis: number; maxExportBatchSize: number; debug: boolean; sampleRate: number; } const ENV_CONFIGS: Record<Env, LangfuseEnvConfig> = { development: { exportIntervalMillis: 1000, maxExportBatchSize: 1, debug: true, sampleRate: 1.0, }, staging: { exportI...

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