Claude Code telemetry
Stream Claude Code conversations into Latitude as traces. After setup, Claude Code turns appear in your project’s Traces view with prompts, responses, tool calls, and tool results.Prerequisites
- A Latitude account with a project
- Claude Code installed locally
- Node.js available on your
PATH
This integration works with local Claude Code surfaces that support hooks, including the CLI, desktop app, and IDE extensions. It does not run inside the hosted Claude web app.
Install
- In Latitude, copy your project slug from the project sidebar.
- Create or copy an API key from Settings → API Keys.
- Run the installer:
Restart and verify
Fully quit and relaunch Claude Code, then run any prompt. Open your Latitude project and go to Traces. The new trace should appear within a few seconds.Disable or uninstall
To pause telemetry temporarily:Manual configuration
If you manage Claude Code settings yourself, add the telemetry command to~/.claude/settings.json:
Captured data and privacy
Treat this as full-fidelity telemetry. Latitude receives the content needed to reconstruct Claude Code turns, including prompts, responses, tool input/output, and system context when available.- Telemetry runs for each turn until disabled or uninstalled.
- Disable telemetry before working with sensitive material you do not want sent to Latitude.
Custom redaction
If you want to keep telemetry enabled but mask specific span attributes before they leave your machine, setLATITUDE_REDACT_ATTRIBUTES in your Claude Code environment. Redaction happens locally, after the content gate and before the OTLP export.
LATITUDE_REDACT_ATTRIBUTES accepts a JSON array (or comma-separated list) of patterns. Each pattern can be:
- An exact attribute name —
"gen_ai.tool.call.arguments" - A regex source string —
"^gen_ai\\.(input|output)\\.messages$"(anchored match) - A
/pattern/flagsstring —"/^gen_ai\\.tool\\.call\\.(arguments|result)$/i"
LATITUDE_REDACT_MASK sets the replacement value (default: ******). Set it to [] to replace message arrays with an empty array instead of a string.
Examples
Redact all prompt and response messages, plus tool arguments and results:env block in ~/.claude/settings.json:
Troubleshooting
No traces appear. Fully quit and relaunch Claude Code, then run a new prompt. Confirm the API key and project slug are correct. Need more diagnostics. SetLATITUDE_DEBUG=1 before running Claude Code. The telemetry command prints diagnostic output when uploads fail.
Wrong project receives traces. Re-run the installer with the correct project slug, or uninstall and install again.