Skip to content

Guide for IT

Early access

Set up Claude Code usage

Claude Code can send its usage metrics to Codiqo, where each person's spend is set against the value their commits delivered. Setting it up is one block in Claude Code's managed settings, pushed to every developer's machine.

What is sent, and what never is

Only usage metrics: estimated cost, tokens, lines added and removed, commits, pull requests and active time, with the model and the repository, per person and day. The cost is Claude Code's own estimate, not an invoice.

Prompts, responses and code are never sent. The block sets only the metrics export, so an existing logs export to your own collector keeps working.

1. Get the key

  • An organization admin opens Codiqo's organization settings, the AI & LLM tab, and chooses Create key on the Claude Code usage card.
  • The key is shown once, already inside the block: copy the block then. Codiqo keeps only the key's last four characters, so a lost key is rotated, never recovered.
  • Rotating or revoking the key stops the old one within a minute, so every machine still sending it stops being counted until IT pushes the new block.

2. The block

The card in Codiqo gives you this block with your key already in place of <your key>.

{
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "OTEL_METRICS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf",
    "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://api.codiqo.io/otlp/v1/metrics",
    "OTEL_EXPORTER_OTLP_METRICS_HEADERS": "Authorization=Bearer <your key>",
    "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": "delta",
    "OTEL_METRICS_INCLUDE_REPOSITORY": "true",
    "OTEL_METRICS_INCLUDE_ACCOUNT_UUID": "true"
  }
}

3. Put it on every machine

Pick one of three ways. Managed settings override each developer's user and project settings, and project settings cannot set the OpenTelemetry exporter variables.

A. Server-managed settings (Claude for Teams and Enterprise)

  • An Owner or Primary Owner pastes the block at claude.ai, in Organization settings > Claude Code > Managed settings
  • Claude Code fetches them at startup and polls for changes every hour.
  • They are not delivered to sessions that use a Console API key, Bedrock, Vertex, Foundry or a custom ANTHROPIC_BASE_URL.

B. A managed-settings.json file

  • macOS: /Library/Application Support/ClaudeCode/managed-settings.json
  • Linux and WSL: /etc/claude-code/managed-settings.json
  • Windows: C:\Program Files\ClaudeCode\managed-settings.json
  • The old Windows path, C:\ProgramData\ClaudeCode\, is not read.
  • A managed-settings.d/ folder beside the file is merged in too.

C. Device management (Jamf, Intune, Group Policy)

  • macOS: a configuration profile in the com.anthropic.claudecode preferences domain, with the block's top-level key, env
  • Windows: a REG_SZ value named Settings holding the JSON, under HKLM\SOFTWARE\Policies\ClaudeCode

4. Restart Claude Code

Claude Code reads its OpenTelemetry settings once, at startup: developers restart Claude Code after the settings arrive or change.

Warn developers first. With server-managed settings, an interactive session may ask the developer once to approve certain settings, and Claude Code exits if they reject them. Anthropic's documentation names OTEL_EXPORTER_OTLP_ENDPOINT among them and does not say whether OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, which this block uses, is included. Tell developers before the rollout, so nobody rejects the prompt.

5. Check that it works

On a developer's machine, /status in Claude Code lists where its settings come from (a file shows as "Enterprise managed settings (file)"), and claude doctor shows server-managed settings as "Managed settings (remote)".

In Codiqo, the Claude Code usage card reads "Waiting for the first export" until the first usage arrives, then "Receiving".

Allowed Claude organizations

Every data point names the Claude organization the developer is signed in to. While the allowed list is empty, Codiqo accepts every Claude organization, which suits the rollout. Once it holds one, usage from any other Claude organization, or naming none, is not counted.

Your Claude organizations appear on the Claude Code usage card as their usage arrives. Approve yours there once they have shown up, or add an id by hand before it has. A change applies within a minute.

Claude accounts

Each Claude account counts for one person: the first usage from an account ties it to the member it came in for, and later usage from that account under a colleague's email is not counted. A person may use more than one Claude account, for example after moving between Claude organizations.

Email domain aliases

Claude may sign people in on a different email domain than their Codiqo account; an alias maps one to the other, and without it those people's usage is not counted.

An organization admin sets them on the same card. Codiqo never infers one: a wrong guess would credit one person's usage to another.

Requirements

  • Claude Code 2.1.269 or later tags usage with the repository; older versions still send usage, without it.
  • Developers sign in to Claude Code with their Claude account. Sessions on an API key, Bedrock or Vertex send no email, so their usage cannot be credited to anyone and is not counted.
  • Keep OTEL_METRICS_INCLUDE_ACCOUNT_UUID on, as the block sets it: usage that names no Claude account is not counted.

What these checks can and cannot do

The figures are what Claude Code itself reports. These checks stop mistakes and casual misuse, such as a key copied into another company's settings or one person's usage landing on a colleague, but not a determined person who holds the key and writes their own requests. If the key leaks, rotate it.

While the rollout is under way

  • Rollouts are gradual. Each person appears once their Claude Code has restarted with the settings and sent its first usage.
  • The Claude Code usage card shows when usage last arrived and how many members reported in the last 7 days.
  • Until a person reports, Codiqo shows them as not reporting, never as $0, and their spend counts from their first day with usage.

Questions, or not in early access yet? Email hello@codiqo.io.