Blog · August 6, 2026 · 4 min read
Track your Claude Code sessions, on your profile.
Your GitHub graph shows what you shipped. It doesn't show the hours of AI-assisted work behind it. Claude Code ships with built-in OpenTelemetry — one config block sends your sessions, active time, lines changed and commits to your DevLog profile. Metrics only, never your prompts or code. Two minutes, end to end.
What gets tracked — and what never does
Claude Code has official OpenTelemetry support. With the config below, it sends DevLog numeric daily metrics only: sessions started, active coding time, lines added and removed, commits, pull requests, and token totals.
It never sends your prompts, your code, file names, or conversation content — those require separate logging settings this config does not enable. Disconnecting revokes your token and DevLog stops accepting data immediately.
Setup, step by step
- Generate your token. On your dashboard, open
Connect Accounts→Claude Codeand click Connect Claude Code. Copy the config block it shows you — it already contains your personal token, so prefer it over the example below. - Open
~/.claude/settings.json. The.claudefolder is hidden, so Spotlight and a normal Finder browse won't find it — use one of these instead:- Terminal (easiest) — creates the file if needed, then opens it:
mkdir -p ~/.claude && touch ~/.claude/settings.json && open -e ~/.claude/settings.json
VS Code users:code ~/.claude/settings.json - Finder — press
Cmd+Shift+G, type~/.claude, hit Enter. - Windows — paste
%USERPROFILE%\.claudeinto the Explorer address bar, or runnotepad %USERPROFILE%\.claude\settings.json.
- Terminal (easiest) — creates the file if needed, then opens it:
- Paste the config. If the file is empty or new, paste the whole block. If it already has content, merge these keys into your existing
envobject — don't create a second one. It looks like this:{ "env": { "CLAUDE_CODE_ENABLE_TELEMETRY": "1", "OTEL_METRICS_EXPORTER": "otlp", "OTEL_EXPORTER_OTLP_PROTOCOL": "http/json", "OTEL_EXPORTER_OTLP_ENDPOINT": "https://devlogg.co/api/otel", "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <your-token>", "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": "delta" } } - Restart Claude Code. Settings are read at startup — quit any running session and start a new one.
- Verify. Use Claude Code for a minute or two, then check your DevLog dashboard. Metrics export roughly every minute while a session is active; your first data point should appear shortly after you start working.
Troubleshooting
- Nothing shows up. Confirm all six
envkeys copied over, especiallyOTEL_EXPORTER_OTLP_PROTOCOL: http/json— other protocols are rejected. Then make sure you restarted Claude Code after saving. - Rotated your token? Rotating in the Connect Accounts dialog invalidates the old one — update the
OTEL_EXPORTER_OTLP_HEADERSline with the new snippet. - Multiple machines? Use the same config block on each — the token identifies you, not the machine, and everything rolls up into one daily total.
- Want to stop? Click Disconnect Account in the dialog, and optionally remove the
envkeys fromsettings.json.
Don't have a DevLog profile yet? Get started free — it reads your GitHub, LeetCode and Dev.to, and builds the profile that proves how good you are.