Claude Code Telemetry is a lightweight bridge that captures telemetry data from Claude Code and forwards it to Langfuse for visualization, with a secure local turnkey installation under a minute.
44
stars
76
commits
JavaScript
primary language
Sep 10, 2026
updated
See exactly how you/your team uses Claude Code
Track costs, usage patterns, and session data in real-time
https://github.com/user-attachments/assets/2634cec3-94af-4a2d-90da-44cd641f1746
Claude Code Telemetry is a lightweight bridge that captures telemetry data from Claude Code and forwards it to Langfuse for visualization. You get:
The original motivation from the author was that when using Claude Code Pro/Max, it didn't have good options for telemetry out of the box compared to API-based requests that can be integrated with various solutions and wanted to provide a secure turnkey local setup for people using Claude Code to benefit from.
Uses OpenTelemetry for data collection, Langfuse for visualization, and Claude's native observability APIs. No proprietary formats, no vendor lock-in.
π³ Docker Desktop - Install here if you don't see the whale icon in your menu bar
# Clone and enter directory
git clone https://github.com/lainra/claude-code-telemetry && cd claude-code-telemetry
# Run automated setup
./quickstart.sh
# Enable telemetry
source claude-telemetry.env
# Test it works
claude "What is 2+2?"
That's it! View your dashboard at http://localhost:3000
Let Claude guide you through the setup:
claude "Set up the telemetry dashboard"
Every conversation becomes a trackable session:
Session: 4:32 PM - 5:15 PM (43 minutes)
βββ Total Cost: $18.43
βββ API Calls: 6 (2 Haiku, 4 Opus)
βββ Total Tokens: 45,231 (31,450 cached)
βββ Tools Used:
β βββ Read: 23 calls
β βββ Edit: 8 calls
β βββ Bash: 4 calls
β βββ Grep: 2 calls
βββ Cache Savings: $12.30 (40% cost reduction)
Full details for every Claude interaction:
4:45 PM - claude-3-opus-20240229
βββ Input: 12,453 tokens (8,234 from cache)
βββ Output: 3,221 tokens
βββ Cost: $4.87
βββ Duration: 3.2s
βββ Context: Feature implementation
Track spending by model and user:
Today's Usage:
βββ Total: $67.43
βββ By Model:
β βββ Opus: $61.20 (91%)
β βββ Haiku: $6.23 (9%)
βββ By User:
βββ alex@team.com: $28.90
βββ sarah@team.com: $22.15
βββ mike@team.com: $16.38
Claude Code β OpenTelemetry β Telemetry Bridge β Langfuse
β β β β
User asks Sends OTLP Parses & forwards Shows in
questions telemetry data to Langfuse dashboard
The bridge:
Includes Langfuse dashboard + telemetry bridge:
./quickstart.sh
Already have Langfuse? Just run the bridge:
# Configure your existing Langfuse credentials
export LANGFUSE_PUBLIC_KEY=your-public-key
export LANGFUSE_SECRET_KEY=your-secret-key
export LANGFUSE_HOST=your-langfuse-url
# Install and start the bridge
npm install
npm start
Already have Langfuse? Run the bridge in Docker:
# Create .env file with your Langfuse credentials
cp .env.example .env
# Edit .env with your LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, and LANGFUSE_HOST
# Run just the telemetry bridge container
docker compose up telemetry-bridge
claude)| Setting | Default | Description |
|---|---|---|
SESSION_TIMEOUT | 1 hour | Groups related work into sessions |
OTLP_RECEIVER_PORT | 4318 | OpenTelemetry standard port |
LANGFUSE_HOST | http://localhost:3000 | Langfuse dashboard URL |
LOG_LEVEL | info | Logging verbosity |
See .env.example for all options.
Use this if you want to:
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE for details.
Simple, honest telemetry for Claude Code
100% AI-assisted repository, made with β€οΈ by Claude and @lainra
Report Issue Β·
Submit PR
JavaScript
94.7%
Shell
5.0%
Claude Code Telemetry is a lightweight bridge that captures telemetry data from Claude Code and forwards it to Langfuse for visualization, with a secure local turnkey installation under a minute.
44
stars
76
commits
JavaScript
primary language
Sep 10, 2026
updated
See exactly how you/your team uses Claude Code
Track costs, usage patterns, and session data in real-time
https://github.com/user-attachments/assets/2634cec3-94af-4a2d-90da-44cd641f1746
Claude Code Telemetry is a lightweight bridge that captures telemetry data from Claude Code and forwards it to Langfuse for visualization. You get:
The original motivation from the author was that when using Claude Code Pro/Max, it didn't have good options for telemetry out of the box compared to API-based requests that can be integrated with various solutions and wanted to provide a secure turnkey local setup for people using Claude Code to benefit from.
Uses OpenTelemetry for data collection, Langfuse for visualization, and Claude's native observability APIs. No proprietary formats, no vendor lock-in.
π³ Docker Desktop - Install here if you don't see the whale icon in your menu bar
# Clone and enter directory
git clone https://github.com/lainra/claude-code-telemetry && cd claude-code-telemetry
# Run automated setup
./quickstart.sh
# Enable telemetry
source claude-telemetry.env
# Test it works
claude "What is 2+2?"
That's it! View your dashboard at http://localhost:3000
Let Claude guide you through the setup:
claude "Set up the telemetry dashboard"
Every conversation becomes a trackable session:
Session: 4:32 PM - 5:15 PM (43 minutes)
βββ Total Cost: $18.43
βββ API Calls: 6 (2 Haiku, 4 Opus)
βββ Total Tokens: 45,231 (31,450 cached)
βββ Tools Used:
β βββ Read: 23 calls
β βββ Edit: 8 calls
β βββ Bash: 4 calls
β βββ Grep: 2 calls
βββ Cache Savings: $12.30 (40% cost reduction)
Full details for every Claude interaction:
4:45 PM - claude-3-opus-20240229
βββ Input: 12,453 tokens (8,234 from cache)
βββ Output: 3,221 tokens
βββ Cost: $4.87
βββ Duration: 3.2s
βββ Context: Feature implementation
Track spending by model and user:
Today's Usage:
βββ Total: $67.43
βββ By Model:
β βββ Opus: $61.20 (91%)
β βββ Haiku: $6.23 (9%)
βββ By User:
βββ alex@team.com: $28.90
βββ sarah@team.com: $22.15
βββ mike@team.com: $16.38
Claude Code β OpenTelemetry β Telemetry Bridge β Langfuse
β β β β
User asks Sends OTLP Parses & forwards Shows in
questions telemetry data to Langfuse dashboard
The bridge:
Includes Langfuse dashboard + telemetry bridge:
./quickstart.sh
Already have Langfuse? Just run the bridge:
# Configure your existing Langfuse credentials
export LANGFUSE_PUBLIC_KEY=your-public-key
export LANGFUSE_SECRET_KEY=your-secret-key
export LANGFUSE_HOST=your-langfuse-url
# Install and start the bridge
npm install
npm start
Already have Langfuse? Run the bridge in Docker:
# Create .env file with your Langfuse credentials
cp .env.example .env
# Edit .env with your LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, and LANGFUSE_HOST
# Run just the telemetry bridge container
docker compose up telemetry-bridge
claude)| Setting | Default | Description |
|---|---|---|
SESSION_TIMEOUT | 1 hour | Groups related work into sessions |
OTLP_RECEIVER_PORT | 4318 | OpenTelemetry standard port |
LANGFUSE_HOST | http://localhost:3000 | Langfuse dashboard URL |
LOG_LEVEL | info | Logging verbosity |
See .env.example for all options.
Use this if you want to:
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE for details.
Simple, honest telemetry for Claude Code
100% AI-assisted repository, made with β€οΈ by Claude and @lainra
Report Issue Β·
Submit PR
JavaScript
94.7%
Shell
5.0%