Skip to content

feat(telemetry): enable OTel Claude Code telemetry#150

Open
maxchampoux wants to merge 1 commit into
mainfrom
feat/otel-telemetry
Open

feat(telemetry): enable OTel Claude Code telemetry#150
maxchampoux wants to merge 1 commit into
mainfrom
feat/otel-telemetry

Conversation

@maxchampoux
Copy link
Copy Markdown

@maxchampoux maxchampoux commented Apr 3, 2026

Summary

  • Adds .claude/settings.json with OTel exporter config
  • All Claude Code sessions in this repo will automatically export telemetry (tool usage, metrics, events) to the observability dashboard
  • Zero setup required from team members — works out of the box

What this enables

  • Per-member tool usage tracking (including Agent dispatches)
  • Token consumption and cost metrics
  • Session and workflow type analytics

🤖 Generated with Claude Code


Note

Medium Risk
Introduces default telemetry export settings for Claude Code sessions, which can impact privacy/compliance by sending tool usage and logs to an external OTLP endpoint.

Overview
Adds .claude/settings.json to enable Claude Code telemetry and configure OpenTelemetry (OTLP) metrics/logs export.

Telemetry is sent via http/json to a fixed external OTEL_EXPORTER_OTLP_ENDPOINT, with tool-detail logging enabled and custom export intervals for metrics and logs.

Written by Cursor Bugbot for commit 85acf4f. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Telemetry auto-enabled sending data to external endpoint
    • Changed project-level Claude settings to disable telemetry by default so cloned or forked repos no longer auto-export session data without opt-in.

Create PR

Or push these changes by commenting:

@cursor push 538852664f
Preview (538852664f)
diff --git a/.claude/settings.json b/.claude/settings.json
--- a/.claude/settings.json
+++ b/.claude/settings.json
@@ -1,6 +1,6 @@
 {
   "env": {
-    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
+    "CLAUDE_CODE_ENABLE_TELEMETRY": "0",
     "OTEL_METRICS_EXPORTER": "otlp",
     "OTEL_LOGS_EXPORTER": "otlp",
     "OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",

You can send follow-ups to the cloud agent here.

Comment thread .claude/settings.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant