Langfuse Codebase Navigator
langfuse/langfuse
Navigate Langfuse repositories, code areas, and agent skills.
Agent skill
by jeremylongshore in jeremylongshore/tons-of-skills-marketplace
Optimize Langfuse tracing performance for high-throughput applications.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-performance-tuning -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-performance-tuning --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-performance-tuning .claude/skills/langfuse-performance-tuning && rm -rf skills-srcUse ~/.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/
Install the "langfuse-performance-tuning" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langfuse-performance-tuning into .claude/skills/langfuse-performance-tuning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langfuse-performance-tuning", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langfuse-performance-tuningType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-performance-tuning -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-performance-tuning --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/langfuse-performance-tuning .agents/skills/langfuse-performance-tuning && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "langfuse-performance-tuning" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langfuse-performance-tuning into .agents/skills/langfuse-performance-tuning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langfuse-performance-tuning", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-performance-tuning -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-performance-tuning --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/langfuse-performance-tuning .cursor/skills/langfuse-performance-tuning && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "langfuse-performance-tuning" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langfuse-performance-tuning into .cursor/skills/langfuse-performance-tuning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langfuse-performance-tuning", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/langfuse-performance-tuning--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-performance-tuning -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-performance-tuning --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/langfuse-performance-tuning .gemini/skills/langfuse-performance-tuning && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "langfuse-performance-tuning" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langfuse-performance-tuning into .gemini/skills/langfuse-performance-tuning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langfuse-performance-tuning", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-performance-tuningInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-performance-tuning -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/langfuse-performance-tuning .github/skills/langfuse-performance-tuning && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "langfuse-performance-tuning" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langfuse-performance-tuning into .github/skills/langfuse-performance-tuning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langfuse-performance-tuning", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-performance-tuning -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-performance-tuning --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/langfuse-performance-tuning .opencode/skills/langfuse-performance-tuning && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "langfuse-performance-tuning" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langfuse-performance-tuning into .opencode/skills/langfuse-performance-tuning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langfuse-performance-tuning", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
langfuse-performance-tuningOptimize Langfuse tracing performance for high-throughput applications.
Langfuse Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. 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".
Its SKILL.md is about 2.2k 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.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
langfuse.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Langfuse Performance Tuning loads about 2.2k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 307 words of instructions outside code blocks.
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.
The automated check found no risky patterns in SKILL.md.
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.
The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 307 words, ~2,212 tokens.
.claude/skills/langfuse-performance-tuning/SKILL.md (or your agent's skills folder).Optimize Langfuse tracing for minimal overhead and maximum throughput: benchmark measurement, batch tuning, non-blocking patterns, payload optimization, sampling, and memory management.
| Metric | Target | Critical |
|---|---|---|
| Trace creation overhead | < 1ms | < 5ms |
| Flush latency (batch) | < 100ms | < 500ms |
| Memory per active trace | < 1KB | < 5KB |
| CPU overhead | < 1% | < 5% |
// 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("=== Langfuse Performance Benchmark ===");
console.log(`Iterations: ${iterations}`);
console.log(`Mean: ${(sorted.reduce((a, b) => a + b) / sorted.length).toFixed(3)}ms`);
console.log(`P50: ${sorted[Math.floor(sorted.length * 0.5)].toFixed(3)}ms`);
console.log(`P95: ${sorted[Math.floor(sorted.length * 0.95)].toFixed(3)}ms`);
console.log(`P99: ${sorted[Math.floor(sorted.length * 0.99)].toFixed(3)}ms`);
const flushStart = performance.now();
await sdk.shutdown();
console.log(`Flush: ${(performance.now() - flushStart).toFixed(1)}ms`);
}
benchmark();// v4+: Tune OTel span processor
import { LangfuseSpanProcessor } from "@langfuse/otel";
import { NodeSDK } from "@opentelemetry/sdk-node";
const processor = new LangfuseSpanProcessor({
exportIntervalMillis: 10000, // Flush every 10s (default: 5000)
maxExportBatchSize: 100, // Larger batches = fewer API calls
maxQueueSize: 4096, // Buffer more events before dropping
});
const sdk = new NodeSDK({ spanProcessors: [processor] });
sdk.start();// v3: Direct configuration
const langfuse = new Langfuse({
flushAt: 100, // Larger batches
flushInterval: 10000, // Less frequent flushes
requestTimeout: 30000, // Allow time for large batches
});| Setting | Low Volume | High Volume | Ultra-High |
|---|---|---|---|
| Batch size | 15 | 50-100 | 200 |
| Flush interval | 5s | 10s | 30s |
| Queue size | 1024 | 4096 | 8192 |
Ensure tracing never blocks your application's critical path:
import { observe, updateActiveObservation } from "@langfuse/tracing";
// The observe wrapper is already non-blocking for the trace submission.
// But protect against SDK crashes:
function safeObserve<T extends (...args: any[]) => Promise<any>>(
name: string,
fn: T
): T {
return (async (...args: Parameters<T>) => {
try {
return await observe({ name }, async () => {
updateActiveObservation({ input: args });
const result = await fn(...args);
updateActiveObservation({ output: result });
return result;
})();
} catch (error) {
// If tracing throws, run function without tracing
console.warn(`Tracing failed for ${name}:`, error);
return fn(...args);
}
}) as T;
}Large trace payloads slow down flush and increase costs:
function truncateForTrace(input: any, maxStringLen = 5000, maxArrayLen = 50): any {
if (typeof input === "string") {
return input.length > maxStringLen
? input.slice(0, maxStringLen) + `...[truncated ${input.length - maxStringLen} chars]`
: input;
}
if (Array.isArray(input)) {
return input.slice(0, maxArrayLen).map((item) => truncateForTrace(item));
}
if (input instanceof Buffer || input instanceof Uint8Array) {
return `[Binary: ${input.length} bytes]`;
}
if (typeof input === "object" && input !== null) {
const result: Record<string, any> = {};
for (const [key, value] of Object.entries(input)) {
result[key] = truncateForTrace(value);
}
return result;
}
return input;
}
// Usage
await startActiveObservation("process", async () => {
updateActiveObservation({
input: truncateForTrace(largeInput), // Truncated for trace
});
const result = await process(largeInput); // Full input to function
updateActiveObservation({ output: truncateForTrace(result) });
});When you cannot afford to trace every request:
class TraceSampler {
private rate: number;
private windowMs = 60000;
private maxPerWindow: number;
private timestamps: number[] = [];
constructor(rate: number, maxPerMinute: number) {
this.rate = rate;
this.maxPerWindow = maxPerMinute;
}
shouldSample(isError = false): boolean {
if (isError) return true; // Always trace errors
const now = Date.now();
this.timestamps = this.timestamps.filter((t) => t > now - this.windowMs);
if (this.timestamps.length >= this.maxPerWindow) return false;
if (Math.random() > this.rate) return false;
this.timestamps.push(now);
return true;
}
}
const sampler = new TraceSampler(0.1, 1000); // 10%, max 1000/min
async function maybeTrace<T>(name: string, fn: () => Promise<T>, isError = false): Promise<T> {
if (!sampler.shouldSample(isError)) {
return fn(); // Skip tracing
}
return startActiveObservation(name, async () => {
updateActiveObservation({ metadata: { sampled: true } });
return fn();
});
}// Monitor trace-related memory usage
function logMemoryStats() {
const mem = process.memoryUsage();
console.log({
heapUsedMB: (mem.heapUsed / 1024 / 1024).toFixed(1),
rssMB: (mem.rss / 1024 / 1024).toFixed(1),
externalMB: (mem.external / 1024 / 1024).toFixed(1),
});
}
// Log every minute in production
setInterval(logMemoryStats, 60000);| Optimization | Latency Impact | Throughput Impact | Effort |
|---|---|---|---|
| Increase batch size | High | High | Low |
| Non-blocking wrapper | High | Medium | Low |
| Payload truncation | Medium | Medium | Low |
| Sampling | High | Very High | Medium |
| Memory monitoring | Low | Low | Low |
| Issue | Cause | Solution |
|---|---|---|
| High P99 latency | Sync flush in hot path | Use non-blocking wrapper |
| Memory growth | No payload limits | Truncate inputs/outputs |
| Request timeouts | Batch too large | Reduce batch size or increase timeout |
| Dropped spans | Queue full | Increase maxQueueSize |
Produce a tuning receipt with the baseline and post-change P50/P95 latency, throughput, sampling rate, batch settings, and dropped-event count. Include the rollback setting for each change; do not treat fewer traces as lower latency without reporting the sampling denominator.
Start with a production-like load test and change only flushAt and
flushInterval. Compare request latency and exporter queue depth for the same
traffic window. If queue drops increase, revert the batch change and reduce
payload size or sampling before increasing queue capacity.
© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/.curated/langfuse-performance-tuning of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
Langfuse Performance Tuning 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Langfuse Performance Tuning this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~2.2k | Automated safety check: Pass | MIT | |
| Langfuse Codebase Navigatorlangfuse/langfuse | 36k | — | ~1.4k | Automated safety check: Pass | Custom licence | |
| Langfuse Integration Pagelangfuse/langfuse-docs | 246 | — | ~3.7k | Automated safety check: Pass | MIT | |
| Langfuselangfuse/skills | 301 | — | ~2.1k | Automated safety check: Notes | MIT | |
| Add Yourself To Team Langfuselangfuse/langfuse-docs | 246 | — | ~548 | Automated safety check: Pass | MIT | |
| Weekly Production Reviewlangfuse/langfuse | 36k | — | ~4.1k | Automated safety check: Pass | Custom licence |
langfuse/langfuse
Navigate Langfuse repositories, code areas, and agent skills.
langfuse/langfuse-docs
Create a new Langfuse integration page in the langfuse-docs repo.
langfuse/skills
Interact with Langfuse and access its documentation: tracing, monitoring, creating datasets, running experiments, and evaluating AI applications.
langfuse/langfuse-docs
Add a new team member to Langfuse's canonical team data and shared team table.
langfuse/langfuse
Prepare Langfuse weekly production reviews covering failures, fixes, open issues, and tracking gaps.
langfuse/langfuse
Shared workflow for editing Langfuse's repo-owned agent setup under .agents/.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Categories
Optimize Langfuse tracing performance for high-throughput applications. Langfuse Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Langfuse tracing performance for high-throughput applications.
Langfuse Performance Tuning fits situations like: experiencing latency issues; optimizing trace overhead; scaling Langfuse for production workloads; with phrases like langfuse performance.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-performance-tuning -a claude-code`. Or copy the skill folder (skills/.curated/langfuse-performance-tuning in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/langfuse-performance-tuning in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-performance-tuning -a codex`. Or copy the skill folder (skills/.curated/langfuse-performance-tuning in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/langfuse-performance-tuning in your project. Codex loads it when a task matches its description.
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-performance-tuning -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-performance-tuning, .gemini/skills/langfuse-performance-tuning, .github/skills/langfuse-performance-tuning and .opencode/skills/langfuse-performance-tuning in your project.
SKILL.md names no scripts, command-line tools or credentials: Langfuse Performance Tuning is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 1 domain. As links in the text: langfuse.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Langfuse Performance Tuning is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Langfuse Performance Tuning: 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.
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.