Claude Code
Claude Code can report its usage to Astro AI over OpenTelemetry. Once configured, sessions from across your team appear in your Astro AI dashboard with token usage, cost, models, and tool activity.
You turn this on through your Anthropic admin console’s managed settings, so it applies to everyone in your organization from one place.
Before you start
- Admin access to your Astro AI account.
- Admin access to your organization’s Anthropic admin console, to edit Claude Code managed settings.
- Claude Code installed on the machines you want to monitor.
Set up
Create a data source
In Astro AI, go to Settings → Data Sources and add a new source. Give it a name you’ll recognize (for example, Engineering laptops), then copy the secret — it’s shown only once.
Astro AI generates a ready-to-paste settings block with your key and endpoint already filled in. Keep this open for the next step.
Add the managed settings block
In your Anthropic admin console, open Claude Code → Managed settings and add the block Astro AI generated. It looks like this:
Copy the exact block from Astro AI — the endpoint and key are already filled in for you.
Managed settings apply to your whole organization and refresh on each machine within about an hour. The first time a new setting reaches a machine, Claude Code asks that developer to approve it once.
Collect prompts and tool calls
By default Astro AI collects usage metadata only — the text of prompts and responses stays on the machine. You can optionally include that content by adding the settings below to the managed settings block.
Prompts and responses — records the text of each prompt and Claude’s reply:
Tool calls — records the inputs to the tools Claude Code runs:
Include OTEL_LOGS_EXPORTER = otlp once if you enable either option. Both are off unless you add them.
These options collect the contents of your team’s Claude Code sessions. Enable them only where that’s appropriate for your organization.
Exclude specific users
Even with prompt or tool-call collection on, you can exclude individual people from that content. On a data source in Settings → Data Sources, add the Anthropic account emails of the people to exclude.
For an excluded person, Astro AI still records their usage metadata — token usage, cost, models, and session counts — but never stores the text of their prompts, responses, or tool calls. Everyone else on that data source is unaffected.
Exclusions are matched on each person’s Anthropic account email and are set per data source, so add someone to every data source their machines use. You can edit the list at any time without rotating the key, and changes take effect within about a minute.
What’s collected
Manage keys
- Stop collecting from a set of machines: revoke the data source in Settings → Data Sources. Machines using it stop sending telemetry immediately.
- Rename a data source: open the row menu in Settings → Data Sources and choose Rename. This is a display name change only and all existing consumers of the key will continue to work uninterrupted.
- Rotate a key: create a new one, update the managed settings block, then revoke the old key.
- Turn off content collection: remove the optional settings from the block. To turn off telemetry entirely, remove the block or revoke the key.
Troubleshooting
Nothing appearing in the dashboard:
- Confirm the block is saved in Claude Code managed settings, and that developers have approved the new settings on their machines. Managed settings can take up to an hour to reach each machine.
- Confirm the data source hasn’t been revoked in Settings → Data Sources.
Prompts or tool calls not showing when you expect them:
- Confirm
OTEL_LOGS_EXPORTER = otlpis in the block alongsideOTEL_LOG_USER_PROMPTS = 1orOTEL_LOG_TOOL_DETAILS = 1.