Skip to main content

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. No Latitude account yet? Your agent can create a temporary one and do this whole setup with the latitude-setup skill, no signup.
Using an agent? Install the Latitude skills and let it handle the setup below. latitude-setup instruments your app or agent harness, verifies traces arrive, creates a temporary account if you don’t have one yet (no signup), and ends by building your first Artifact.

Prerequisites

  • A Latitude account with a project, or none yet: your agent can create a temporary one with the latitude-setup skill, no signup, and fill in the values below
  • 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

  1. In Latitude, copy your project slug from the project sidebar (or let the latitude-setup skill create a temporary account and project for you).
  2. Create or copy an API key from Settings → API Keys.
  3. Run the installer:
The installer prompts for your API key and project slug, then configures Claude Code to export telemetry after each turn. You can also pass values directly:

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.

See what was captured

Once a real run has landed, your agent builds your first Artifact: a single HTML page, in the Latitude look, with everything the telemetry captured from that session: model calls, tool calls, tokens, cost, timing, and the conversation as the model saw it. It is the fastest way to check the integration end to end and to see what Latitude will have to work with. The latitude-setup skill does this as its last step from its bundled first-artifact.html template, filling the page with the values the latitude CLI returns for the trace, and adds a Claim your workspace button when the account is temporary. If you set things up by hand, the same template and instructions live in the skills repo. Prompt, if you need to ask for it:

Disable or uninstall

To pause telemetry temporarily:
Restart Claude Code for the change to take effect. To remove the integration:

Manual configuration

If you manage Claude Code settings yourself, add the telemetry command to ~/.claude/settings.json:
Both entries run the same command. Stop reports each turn as it completes and is async so it never blocks you. SessionEnd is not async: it is the one that fires for non-interactive runs (claude -p), and it also catches the last turn when you quit. They never double-report. Restart Claude Code after saving.

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. The integration also emits memory operation spans when Claude Code reads or writes its auto memory, so those changes show up in Memory with per-record history and diffs.
  • 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, set LATITUDE_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/flags string"/^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:
Redact only a specific custom attribute by exact name:
To persist redaction settings, add them to the 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. Set LATITUDE_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.