Agent skill

Langfuse Common Errors

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Diagnose and fix common Langfuse errors and exceptions. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check: notesAI & LLM Engineering

Install Langfuse Common Errors

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-common-errors -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-common-errors --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/langfuse-common-errors .claude/skills/langfuse-common-errors && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
langfuse-common-errors
GitHub stars
2.8k
Token cost
~2.3k tokens
SKILL.md length
417 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Diagnose and fix common Langfuse errors and exceptions. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 10 steps: Authentication Failed (401) → Traces Not Appearing in Dashboard → Network / Connection Errors → …
  • Encountering Langfuse errors
  • SKILL.md covers Overview, Prerequisites, Error Reference and Quick Diagnostic Script, plus 6 more sections
  • Calls curl, npm and docker; reaches cloud.langfuse.com; needs LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY

What it does

Langfuse Common Errors is an agent skill from jeremylongshore/tons-of-skills-marketplace. Diagnose and fix common Langfuse errors and exceptions. Use when encountering Langfuse errors, debugging missing traces, or troubleshooting integration issues. Trigger with phrases like "langfuse error", "fix langfuse", "langfuse not working", "debug langfuse", "traces not appearing".

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code

It sits in AI & LLM Engineering, covering LLM observability. It works with Langfuse. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Encountering Langfuse errors
  • Debugging missing traces
  • Troubleshooting integration issues
  • With phrases like langfuse error

Example prompts

  • “langfuse error”
  • “fix langfuse”
  • “langfuse not working”
  • “/langfuse-common-errors”

Requirements

  • Python 3
  • Node.js
  • Docker
  • A credential in LANGFUSE_PUBLIC_KEY
  • A credential in LANGFUSE_SECRET_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep, Bash(curl:*)

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Authentication Failed (401)
  2. Traces Not Appearing in Dashboard
  3. Network / Connection Errors
  4. Missing Token Usage
  5. Spans Stuck "In Progress" (v3)
  6. Duplicate Traces
  7. SDK Import Errors
  8. Environment Variable Not Loaded
  9. Self-Hosted Connection Issues
  10. Rate Limiting (429)

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Bash(curl:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • npm
    • docker
    • node
    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • cloud.langfuse.com

    Also links to:

    • langfuse.com
    • status.langfuse.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • LANGFUSE_PUBLIC_KEY
    • LANGFUSE_SECRET_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Langfuse Common Errors loads about 2.3k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 417 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:240
    // Load .env at the very top of your entry file
  • NoteMentions a .env fileSKILL.md:245
    config({ path: ".env.local" });

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 417 words, ~2,289 tokens.

Download SKILL.mdSave it as .claude/skills/langfuse-common-errors/SKILL.md (or your agent's skills folder).
name
langfuse-common-errors
description
Diagnose and fix common Langfuse errors and exceptions. Use when encountering Langfuse errors, debugging missing traces, or troubleshooting integration issues. Trigger with phrases like "langfuse error", "fix langfuse", "langfuse not working", "debug langfuse", "traces not appearing".
allowed-tools
Read, Grep, Bash(curl:*)
compatibility
Designed for Claude Code
version
1.17.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, langfuse, debugging

Langfuse Common Errors

Overview

Diagnostic reference for the 10 most common Langfuse integration errors, with real error messages, root causes, and tested solutions.

Prerequisites

  • Langfuse SDK installed
  • API credentials configured
  • Access to application logs or console output

Error Reference

1. Authentication Failed (401)

Error:

Langfuse: Unauthorized - Invalid API key
Error: 401 Unauthorized

Cause: API key missing, expired, revoked, or keys from wrong project.

Fix:

bash
set -euo pipefail
# Verify env vars are set
echo "Public: ${LANGFUSE_PUBLIC_KEY:0:15}..."
echo "Secret: ${LANGFUSE_SECRET_KEY:0:10}..."

# Test auth against API
HOST="${LANGFUSE_BASE_URL:-https://cloud.langfuse.com}"
curl -s -o /dev/null -w "HTTP %{http_code}" \
  "$HOST/api/public/health"

# Auth test
curl -s -o /dev/null -w "HTTP %{http_code}" \
  -H "Authorization: Basic $(echo -n "$LANGFUSE_PUBLIC_KEY:$LANGFUSE_SECRET_KEY" | base64)" \
  "$HOST/api/public/traces?limit=1"
2. Traces Not Appearing in Dashboard

Symptom: Code runs without errors but no traces show in UI.

Root causes (in order of likelihood):

  1. Data not flushed before process exits
  2. Wrong project keys (traces going to different project)
  3. Dashboard filter hiding traces

Fix:

typescript
// v4+: Ensure OTel SDK is shut down properly
const sdk = new NodeSDK({ spanProcessors: [new LangfuseSpanProcessor()] });
sdk.start();
// ... your code ...
await sdk.shutdown(); // MUST call this before process exits

// v3: Always flush
await langfuse.flushAsync();

// v3: Register shutdown handler for long-running processes
process.on("beforeExit", async () => {
  await langfuse.shutdownAsync();
});
3. Network / Connection Errors

Error:

FetchError: request to https://cloud.langfuse.com failed
ECONNREFUSED / ETIMEDOUT

Fix:

bash
set -euo pipefail
# Test connectivity
curl -v https://cloud.langfuse.com/api/public/health

# Check DNS
nslookup cloud.langfuse.com

# For self-hosted
curl -v $LANGFUSE_BASE_URL/api/public/health
typescript
// Increase timeout for slow networks
// v4+: Configure via OTel span processor options
// v3:
const langfuse = new Langfuse({ requestTimeout: 30000 });
4. Missing Token Usage

Symptom: Generations appear but token counts show zero.

Fix:

typescript
// For OpenAI streaming -- enable usage reporting
const stream = await openai.chat.completions.create({
  model: "gpt-4o",
  messages,
  stream: true,
  stream_options: { include_usage: true }, // Required!
});

// For manual tracing -- always include usage on generation end
generation.end({
  output: content,
  usage: {
    promptTokens: response.usage?.prompt_tokens ?? 0,
    completionTokens: response.usage?.completion_tokens ?? 0,
  },
});

// v4+: updateActiveObservation with usage
updateActiveObservation({
  output: content,
  usage: { promptTokens: 100, completionTokens: 50 },
});
5. Spans Stuck "In Progress" (v3)

Symptom: Spans show as in-progress indefinitely in the dashboard.

Fix:

typescript
// Always end spans in try/finally
const span = trace.span({ name: "operation" });
try {
  const result = await doWork();
  span.end({ output: result });
  return result;
} catch (error) {
  span.end({ level: "ERROR", statusMessage: String(error) });
  throw error;
}

// v4+ avoids this entirely -- startActiveObservation auto-ends
await startActiveObservation("operation", async () => {
  // Span automatically ends when callback completes or throws
  return await doWork();
});
6. Duplicate Traces

Symptom: Same operation creates multiple traces.

Fix:

typescript
// Use singleton pattern -- NEVER create Langfuse per request
// BAD:
app.get("/api", async (req, res) => {
  const langfuse = new Langfuse(); // Creates new client per request
});

// GOOD:
const langfuse = new Langfuse(); // Single instance
app.get("/api", async (req, res) => {
  const trace = langfuse.trace({ name: "api-request" });
});
7. SDK Import Errors

Error:

TypeError: langfuse.trace is not a function
Cannot find module '@langfuse/tracing'

Fix:

bash
set -euo pipefail
# Check installed version
npm list langfuse @langfuse/client @langfuse/tracing

# v3 import
# import { Langfuse } from "langfuse";

# v4+ imports
# import { LangfuseClient } from "@langfuse/client";
# import { startActiveObservation, observe } from "@langfuse/tracing";

# Update to latest
npm install @langfuse/client@latest @langfuse/tracing@latest @langfuse/otel@latest
8. Environment Variable Not Loaded

Error:

Langfuse: Missing required configuration - publicKey

Fix:

typescript
// Load .env at the very top of your entry file
import "dotenv/config";

// Or use specific path
import { config } from "dotenv";
config({ path: ".env.local" });

// Validate on startup
if (!process.env.LANGFUSE_PUBLIC_KEY) {
  throw new Error("LANGFUSE_PUBLIC_KEY not set");
}
9. Self-Hosted Connection Issues

Error:

Failed to connect to localhost:3000
Certificate verification failed

Fix:

bash
set -euo pipefail
# Check if Langfuse container is running
docker ps | grep langfuse

# Health check
curl http://localhost:3000/api/public/health

# Common issue: trailing slash in URL
# BAD:  LANGFUSE_BASE_URL=http://localhost:3000/
# GOOD: LANGFUSE_BASE_URL=http://localhost:3000
10. Rate Limiting (429)

Error:

Error: 429 Too Many Requests
Retry-After: 60

Fix:

typescript
// v3: Increase batch size to reduce API calls
const langfuse = new Langfuse({
  flushAt: 50,         // Batch more events
  flushInterval: 30000, // Flush less often (30s)
});

// For sustained high volume, see langfuse-rate-limits skill

Quick Diagnostic Script

bash
#!/bin/bash
set -euo pipefail

echo "=== Langfuse Diagnostics ==="
echo "Node: $(node --version 2>/dev/null || echo 'N/A')"
echo "Python: $(python3 --version 2>/dev/null || echo 'N/A')"
echo ""

# SDK versions
echo "--- Installed SDK ---"
npm list langfuse @langfuse/client @langfuse/tracing 2>/dev/null || echo "npm: not found"
pip show langfuse 2>/dev/null | grep Version || echo "pip: not found"
echo ""

# Config check
echo "--- Config ---"
echo "Public Key: ${LANGFUSE_PUBLIC_KEY:+SET (${LANGFUSE_PUBLIC_KEY:0:10}...)}"
echo "Secret Key: ${LANGFUSE_SECRET_KEY:+SET}"
echo "Base URL: ${LANGFUSE_BASE_URL:-${LANGFUSE_HOST:-default cloud}}"
echo ""

# Connectivity
HOST="${LANGFUSE_BASE_URL:-${LANGFUSE_HOST:-https://cloud.langfuse.com}}"
echo "--- Connectivity ---"
echo "Health: $(curl -s -o /dev/null -w '%{http_code}' $HOST/api/public/health)"

Escalation Path

  1. Run diagnostic script above
  2. Collect debug bundle with langfuse-debug-bundle skill
  3. Check Langfuse Status
  4. Search GitHub Issues
  5. Ask in Discord

Instructions

  1. Copy the exact error, SDK version, and Langfuse base URL from the failing environment.
  2. Match it to the error reference above and apply the smallest listed fix.
  3. Run the diagnostic script without printing secret values.
  4. Confirm one trace or score appears in the intended project before retrying production traffic.
  5. If the issue persists, collect the debug bundle and follow the escalation path.
Show full SKILL.md (149 more words)Show less

Output

Report the matched failure class, the configuration or code change made, the diagnostic result, and whether a new trace reaches the expected Langfuse project. Do not include API keys, authorization headers, or raw customer prompts in the report.

Error Handling

If a proposed fix changes credentials, endpoint, SDK major version, or retention settings, stop after the diagnostic result and require the operator to make or approve that configuration change. Keep the original error and sanitized diagnostic output for escalation rather than retrying requests indefinitely.

Examples

For a 401 error, verify that both project keys are set and that the base URL points to the same project; then send one low-risk trace and confirm it appears in that project. For missing traces, add the documented shutdown/flush behavior, rerun the smallest reproduction, and check the dashboard before changing sampling or credentials.

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/.curated/langfuse-common-errors of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Langfuse Common Errors next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Langfuse Common Errors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langfuse Common Errors this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.3kAutomated safety check: NotesMIT
Langfuse Codebase Navigatorlangfuse/langfuse36k—~1.4kAutomated safety check: PassCustom licence
Langfuse Integration Pagelangfuse/langfuse-docs246—~3.7kAutomated safety check: PassMIT
Langfuselangfuse/skills301—~2.1kAutomated safety check: NotesMIT
Add Yourself To Team Langfuselangfuse/langfuse-docs246—~548Automated safety check: PassMIT
Weekly Production Reviewlangfuse/langfuse36k—~4.1kAutomated safety check: PassCustom licence

Similar skills

  • Navigate Langfuse repositories, code areas, and agent skills.

    36k GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Langfuse Integration Page

    langfuse/langfuse-docs

    Create a new Langfuse integration page in the langfuse-docs repo.

    246 GitHub stars~3.7k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Langfuse

    langfuse/skills

    Interact with Langfuse and access its documentation: tracing, monitoring, creating datasets, running experiments, and evaluating AI applications.

    301 GitHub stars~2.1k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check: notes
  • Add Yourself To Team Langfuse

    langfuse/langfuse-docs

    Add a new team member to Langfuse's canonical team data and shared team table.

    246 GitHub stars~548 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Weekly Production Review

    langfuse/langfuse

    Prepare Langfuse weekly production reviews covering failures, fixes, open issues, and tracking gaps.

    36k GitHub stars~4.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Agent Setup Maintenance

    langfuse/langfuse

    Shared workflow for editing Langfuse's repo-owned agent setup under .agents/.

    36k GitHub stars~799 tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Langfuse Common Errors

What does Langfuse Common Errors do?

Diagnose and fix common Langfuse errors and exceptions. An agent skill from jeremylongshore/tons-of-skills-marketplace. Langfuse Common Errors is an agent skill from jeremylongshore/tons-of-skills-marketplace. Diagnose and fix common Langfuse errors and exceptions.

When should I use Langfuse Common Errors?

Langfuse Common Errors fits situations like: encountering Langfuse errors; debugging missing traces; troubleshooting integration issues; with phrases like langfuse error.

How do I install Langfuse Common Errors in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-common-errors -a claude-code`. Or copy the skill folder (skills/.curated/langfuse-common-errors in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/langfuse-common-errors in your project. Claude Code loads it when a task matches its description.

How do I install Langfuse Common Errors in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-common-errors -a codex`. Or copy the skill folder (skills/.curated/langfuse-common-errors in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/langfuse-common-errors in your project. Codex loads it when a task matches its description.

Can I use Langfuse Common Errors in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-common-errors -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/langfuse-common-errors, .gemini/skills/langfuse-common-errors, .github/skills/langfuse-common-errors and .opencode/skills/langfuse-common-errors in your project.

What does Langfuse Common Errors need to run?

Going by SKILL.md and its folder, Langfuse Common Errors needs the command-line tools its instructions call (curl, npm, docker, node, python3 and pip) and credentials named LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY. Our summary lists: Python 3; Node.js; Docker; A credential in LANGFUSE_PUBLIC_KEY; A credential in LANGFUSE_SECRET_KEY. Its frontmatter pre-approves these tools: Read, Grep, Bash(curl:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Langfuse Common Errors access the network?

SKILL.md names 4 domains. In commands or code: cloud.langfuse.com; the agent is likely to contact it when it follows the instructions. As links in the text: langfuse.com, status.langfuse.com and github.com. This is read from the text; nothing was executed.

Is Langfuse Common Errors safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Langfuse Common Errors use?

Langfuse Common Errors is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Langfuse Common Errors use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Langfuse Common Errors?

Skills that share tags, products or a category with Langfuse Common Errors: Langfuse Codebase Navigator (langfuse/langfuse, 36k stars), Langfuse Integration Page (langfuse/langfuse-docs, 246 stars), Langfuse (langfuse/skills, 301 stars) and Add Yourself To Team Langfuse (langfuse/langfuse-docs, 246 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langfuse Common Errors?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.