Skip to content
Back to skills

Langfuse Observability

ASecurity

Set up comprehensive observability for Langfuse with metrics, dashboards, and alerts. Use when implementing monitoring for LLM operations, setting up dashboards, or configuring alerting for Langfuse integration health. Trigger with phrases like "langfuse monitoring", "langfuse metrics", "langfuse observability", "monitor langfuse", "langfuse alerts", "langfuse dashboard".

  • 4 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 10, 2026
dataapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 10, 2026

npx -y skills add micsapp/micstec-skills --skill langfuse-observability --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Langfuse Observability?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Langfuse Observability
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/micsapp-langfuse-observability/badge)](https://www.skillsdirectory.com/skills/micsapp-langfuse-observability)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: langfuse-observability
description: |
  Set up comprehensive observability for Langfuse with metrics, dashboards, and alerts.
  Use when implementing monitoring for LLM operations, setting up dashboards,
  or configuring alerting for Langfuse integration health.
  Trigger with phrases like "langfuse monitoring", "langfuse metrics",
  "langfuse observability", "monitor langfuse", "langfuse alerts", "langfuse dashboard".
allowed-tools: Read, Write, Edit
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
compatible-with: claude-code, codex, openclaw
---
# Langfuse Observability

## Contents
- [Overview](#overview)
- [Prerequisites](#prerequisites)
- [Instructions](#instructions)
- [Output](#output)
- [Error Handling](#error-handling)
- [Examples](#examples)
- [Resources](#resources)

## Overview
Set up comprehensive observability for Langfuse integrations with Prometheus metrics, an instrumented SDK wrapper, Grafana dashboards, and AlertManager rules.

## Prerequisites
- Prometheus or compatible metrics backend
- Grafana or similar dashboarding tool
- AlertManager or PagerDuty configured
- Langfuse SDK integrated

## Instructions

### Step 1: Implement Prometheus Metrics
Define counters (traces, generations, tokens, cost, errors), histograms (generation duration, flush latency), and gauges (pending events).

### Step 2: Create Instrumented Wrapper
Wrap the Langfuse client to automatically record metrics on trace creation, generation start/end, token usage, and cost calculation.

### Step 3: Expose Metrics Endpoint
Create `/metrics` endpoint returning Prometheus format from the shared registry.

### Step 4: Configure Prometheus Scraping
Add scrape job targeting your app's metrics endpoint at 15s intervals.

### Step 5: Create Grafana Dashboard
Build panels for request rate, latency percentiles, token usage, cost/hour, and error rate.

### Step 6: Configure Alerts
Set rules for high error rate (>5%), high latency (P95 >10s), projected daily cost (>$100), and flush backlog (>1000).

See [detailed implementation](${CLAUDE_SKILL_DIR}/references/implementation.md) for advanced patterns.

## Output
- Prometheus metrics for all Langfuse operations
- Instrumented Langfuse wrapper with auto-tracking
- Grafana dashboard configuration
- AlertManager rules for key thresholds

## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Missing metrics | No instrumentation | Use wrapped client |
| High cardinality | Too many labels | Limit label values |
| Alert storms | Wrong thresholds | Tune alert rules |
| Metric gaps | Scrape failures | Check Prometheus targets |

## Examples

### Key Metrics Reference
| Metric | Type | Purpose |
|--------|------|---------|
| `langfuse_generations_total` | Counter | LLM throughput |
| `langfuse_generation_duration_seconds` | Histogram | Latency tracking |
| `langfuse_tokens_total` | Counter | Usage tracking |
| `langfuse_cost_usd_total` | Counter | Budget monitoring |
| `langfuse_errors_total` | Counter | Reliability |

## Resources
- [Prometheus Best Practices](https://prometheus.io/docs/practices/naming/)
- [Grafana Dashboards](https://grafana.com/docs/grafana/latest/dashboards/)
- [Langfuse Analytics](https://langfuse.com/docs/analytics)

Files in this skill

  • SKILL.md3.2 KB
  • references/implementation.md4.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.