Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Troubleshoot and respond to Langfuse-related incidents and outages. Use when experiencing Langfuse outages, debugging production issues, or responding to LLM observability incidents. Trigger with phrases like "langfuse incident", "langfuse outage", "langfuse down", "langfuse production issue", "langfuse troubleshoot".
.claude/skills/jeremylongshore-langfuse-incident-runbook/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 60% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 87% | 0% |
Step-by-step procedures for Langfuse-related incidents, from initial triage (2 min) through resolution and post-incident review. Your application should work without Langfuse -- these procedures focus on restoring observability.
| Severity | Description | Response Time | Example | |----------|-------------|---------------|---------| | P1 | Application impacted by tracing | 15 min | SDK throwing unhandled errors, blocking requests | | P2 | Traces not appearing, no app impact | 1 hour | Missing observability data | | P3 | Degraded performance from tracing | 4 hours | High latency from flush backlog | | P4 | Minor issues | 24 hours | Occasional missing traces |
bashset -euo pipefail echo "=== Langfuse Incident Triage ===" echo "Time: $(date -u)" # 1. Check Langfuse cloud status echo -n "Status page: " curl -s -o /dev/null -w "%{http_code}" https://status.langfuse.com || echo "UNREACHABLE" echo "" # 2. Test API connectivity HOST="${LANGFUSE_BASE_URL:-${LANGFUSE_HOST:-https://cloud.langfuse.com}}" echo -n "API health: " curl -s -o /dev/null -w "%{http_code} (%{time_total}s)" "$HOST/api/public/health" || echo "FAILED" echo "" # 3. Test auth if [ -n "${LANGFUSE_PUBLIC_KEY:-}" ] && [ -n "${LANGFUSE_SECRET_KEY:-}" ]; then AUTH=$(echo -n "$LANGFUSE_PUBLIC_KEY:$LANGFUSE_SECRET_KEY" | base64) echo -n "Auth test: " curl -s -o /dev/null -w "%{http_code}" \ -H "Authorization: Basic $AUTH" "$HOST/api/public/traces?limit=1" || echo "FAILED" echo "" fi # 4. Check app error logs echo "" echo "--- Recent errors ---" grep -i "langfuse\|trace.*error\|flush.*fail" /var/log/app/*.log 2>/dev/null | tail -10 || echo "No log files found"
| Symptom | Likely Cause | Immediate Action | |---------|--------------|-----------------| | No traces appearing | SDK not flushing | Check shutdown handlers; set flushAt: 1 temporarily | | 401 Unauthorized | Key rotation or mismatch | Verify keys match the correct project | | 429 Too Many Requests | Rate limited | Increase batch size, reduce flush frequency | | SDK throwing errors | Unhandled exception | Wrap in try/catch; check SDK version | | High request latency | Sync flush in hot path | Switch to async; increase requestTimeout | | Complete Langfuse outage | Service-side issue | Enable fallback mode |
If Langfuse is causing application issues, disable tracing immediately:
typescript// Emergency disable via environment variable // Set LANGFUSE_ENABLED=false in your deployment // In your tracing initialization: if (process.env.LANGFUSE_ENABLED === "false") { console.warn("Langfuse tracing DISABLED (emergency fallback)"); // Don't initialize SDK -- all observe/startActiveObservation calls // will still work but produce no-op spans }
For v3, use the enabled flag:
typescriptconst langfuse = new Langfuse({ enabled: process.env.LANGFUSE_ENABLED !== "false", });
Procedure A: Missing Traces
typescript// 1. Verify SDK is initialized console.log("Langfuse configured:", !!process.env.LANGFUSE_PUBLIC_KEY); // 2. Check flush is happening // v4+: Verify NodeSDK is started and shutdown is registered // v3: Verify flushAsync() or shutdownAsync() is called // 3. Temporarily set aggressive flush for debugging const processor = new LangfuseSpanProcessor({ exportIntervalMillis: 1000, maxExportBatchSize: 1, });
Procedure B: Rate Limit (429) Recovery
typescript// Increase batching to reduce API calls const processor = new LangfuseSpanProcessor({ exportIntervalMillis: 30000, // 30s flush maxExportBatchSize: 200, // Large batches }); // Or temporarily enable sampling const EMERGENCY_SAMPLE_RATE = 0.1; // Only trace 10%
Procedure C: Self-Hosted Instance Down
bashset -euo pipefail # Check container status docker ps -a | grep langfuse # Check logs docker logs langfuse-langfuse-1 --tail 50 # Check database docker exec langfuse-postgres-1 pg_isready -U langfuse # Restart if needed docker compose restart langfuse
bashset -euo pipefail # Verify traces are flowing again echo "=== Post-Incident Check ===" HOST="${LANGFUSE_BASE_URL:-https://cloud.langfuse.com}" AUTH=$(echo -n "$LANGFUSE_PUBLIC_KEY:$LANGFUSE_SECRET_KEY" | base64) # Check recent trace count TRACE_COUNT=$(curl -s \ -H "Authorization: Basic $AUTH" \ "$HOST/api/public/traces?limit=5" | python3 -c "import sys,json; print(len(json.load(sys.stdin).get('data',[])))" 2>/dev/null || echo "ERROR") echo "Recent traces: $TRACE_COUNT" if [ "$TRACE_COUNT" = "0" ] || [ "$TRACE_COUNT" = "ERROR" ]; then echo "WARNING: Traces may not be flowing yet" else echo "OK: Traces are appearing" fi
Document for post-mortem:
| Level | Who | When | |-------|-----|------| | L1 | On-call engineer | All incidents -- run triage | | L2 | Platform team lead | P1/P2 unresolved after 30 min | | L3 | Langfuse support | Confirmed service-side issue |
Langfuse support channels:
| Issue | Immediate Fix | Permanent Fix | |-------|--------------|---------------| | SDK crashes app | Set LANGFUSE_ENABLED=false | Wrap all tracing in try/catch | | Lost traces | Increase batch size | Add shutdown handlers | | High latency | Disable sync flush | Use async-only patterns | | Auth failures | Rotate and redeploy keys | Add key validation at startup |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 27,034 | 27,958 | +3% | 1 | 1 | 0% | 3,635 | 5,154 | +42% | 0 | 0 | — |
case-02 | fail→fail | 25,814 | 16,357 | -37% | 1 | 1 | 0% | 3,615 | 3,986 | +10% | 0 | 0 | — |
case-03 | fail→fail | 27,280 | 25,388 | -7% | 1 | 1 | 0% | 3,670 | 5,365 | +46% | 0 | 0 | — |
case-04 | fail→pass | 18,225 | 9,569 | -47% | 1 | 1 | 0% | 2,364 | 2,719 | +15% | 0 | 0 | — |
case-05 | fail→pass | 19,243 | 8,774 | -54% | 1 | 1 | 0% | 2,239 | 2,573 | +15% | 0 | 0 | — |
case-06 | fail→pass | 17,943 | 11,286 | -37% | 1 | 1 | 0% | 1,962 | 3,144 | +60% | 0 | 0 | — |
case-07 | pass→pass | 13,251 | 9,773 | -26% | 1 | 1 | 0% | 1,524 | 2,705 | +77% | 0 | 0 | — |
case-08 | pass→pass | 11,809 | 8,751 | -26% | 1 | 1 | 0% | 1,047 | 2,455 | +134% | 0 | 0 | — |
case-09 | pass→pass | 15,103 | 7,707 | -49% | 1 | 1 | 0% | 1,472 | 2,314 | +57% | 0 | 0 | — |
case-10 | fail→pass | 14,002 | 9,415 | -33% | 1 | 1 | 0% | 1,679 | 2,600 | +55% | 0 | 0 | — |
case-11 | fail→pass | 14,561 | 7,268 | -50% | 1 | 1 | 0% | 1,233 | 2,309 | +87% | 0 | 0 | — |
case-12 | fail→pass | 15,121 | 7,965 | -47% | 1 | 1 | 0% | 1,690 | 2,349 | +39% | 0 | 0 | — |
case-13 | fail→pass | 16,986 | 12,344 | -27% | 1 | 1 | 0% | 2,415 | 2,755 | +14% | 0 | 0 | — |
case-14 | pass→pass | 12,755 | 13,352 | +5% | 1 | 1 | 0% | 1,740 | 2,990 | +72% | 0 | 0 | — |
case-15 | pass→pass | 15,707 | 13,643 | -13% | 1 | 1 | 0% | 2,339 | 3,420 | +46% | 0 | 0 | — |
case-16 | pass→pass | 16,459 | 8,525 | -48% | 1 | 1 | 0% | 2,245 | 2,464 | +10% | 0 | 0 | — |
case-17 | fail→fail | 42,926 | 20,081 | -53% | 1 | 1 | 0% | 3,142 | 4,978 | +58% | 0 | 0 | — |
case-18 | fail→pass | 11,515 | 7,332 | -36% | 1 | 1 | 0% | 1,698 | 3,233 | +90% | 0 | 0 | — |
case-19 | pass→pass | 16,336 | 4,222 | -74% | 1 | 1 | 0% | 1,691 | 2,412 | +43% | 0 | 0 | — |
case-20 | pass→pass | 19,635 | 17,694 | -10% | 1 | 1 | 0% | 3,029 | 4,639 | +53% | 0 | 0 | — |
case-21 | pass→pass | 21,269 | 16,741 | -21% | 1 | 1 | 0% | 2,931 | 4,771 | +63% | 0 | 0 | — |
case-22 | pass→pass | 16,299 | 14,513 | -11% | 1 | 1 | 0% | 2,163 | 3,485 | +61% | 0 | 0 | — |
case-23 | pass→pass | 20,682 | 33,061 | +60% | 1 | 1 | 0% | 3,609 | 6,499 | +80% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +35 percentage points is the difference between those two pass rates over the 23 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.