OTel for AI Tools
Have Claude Code and Codex report their own usage to Proxon over OpenTelemetry, with no app to install.
Claude Code and Codex can report their own usage to Proxon over OpenTelemetry. That works in the terminal and in their desktop apps, meaning the Code tab of the Claude desktop app and the Codex desktop app. There is no app to install and nothing running in the background. You add a few settings to the tool's own config, and its usage shows up under your name on My Usage.
You set this up yourself, from Preferences, with a personal credential. It takes a couple of minutes, and no administrator is in the path.
This page is about AI tools that report their own usage. To send usage from an agent or service you built, see OTel for Agents instead.
Set it up
Open Preferences, then OTel for AI Tools. The page walks you through the same three steps as below, and it fills your credential into the commands for you.
Step 1: Get your credential
Choose Create my credential. Everything sent with it is attributed to you.
The credential is shown once. Copy it now, or go straight on to the next step, where the page has already filled it into the command. Proxon cannot show it to you again. If you lose it, choose Rotate to get a new one.
Rotate replaces the credential, and every place the old one is in use stops reporting until you paste in the new one. If an administrator set up a machine for you with this credential, rotating breaks that machine's setup too. Revoke stops it everywhere at once and issues no replacement. You can create a new one whenever you like.
Step 2: Set it in your tool
Copy the one-line command for your system from the page and run it in a terminal. It sets up both Claude Code and Codex in one go. On a Mac use the macOS and Linux command, and on Windows use the Windows PowerShell command. The command does not work on Linux yet, so on Linux edit the config files yourself.
The command checks your credential with Proxon before it writes anything. It then merges the settings into each tool's config file, keeps every other setting you have, and saves a backup of the file beside it with a .proxon-bak ending. If a tool already sends its telemetry somewhere else, the command stops rather than redirect it. In that case, edit the config files yourself.
Then restart any open Claude Code or Codex sessions, since a running session keeps its old settings. For the Claude or Codex desktop app, fully quit the app (Cmd+Q on a Mac) and reopen it. The desktop apps only read these settings at launch, so closing the window is not enough.
Step 3: Confirm it's capturing
Use Claude Code or Codex once, then come back to the page. The status there moves through three states.
- Waiting for your first request. Proxon has not heard from your tool yet.
- Connected, no data yet. Your tool reached Proxon and your credential works, but no usage has arrived that Proxon could read. See Troubleshooting.
- Receiving telemetry. Usage is arriving and is credited to you.
Choose Open My Usage to see it.
Edit the config files yourself
The one-line command writes exactly these settings. If you would rather not run a command, or the command stopped because a tool already sends telemetry elsewhere, add them by hand. Replace YOUR_PROXON_CREDENTIAL with the credential from step 1.
The paths on this page are written the Mac and Linux way, where ~ is your home folder. On Windows, ~/.claude/settings.json is %USERPROFILE%\.claude\settings.json and ~/.codex/config.toml is %USERPROFILE%\.codex\config.toml.
Add these keys to the env object in ~/.claude/settings.json. Merge them in rather than replacing the file. That file is strict JSON, and Claude Code stops reading all of your settings if it will not parse, so do not add comments to it.
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://ingest.proxon.ai",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer YOUR_PROXON_CREDENTIAL",
"OTEL_LOG_USER_PROMPTS": "0"
}
}Keep OTEL_LOGS_EXPORTER set. Claude Code reports the cost of each call on the logs signal, so a setup with only metrics gives you totals with no per-call detail, and nothing tells you so. OTEL_LOG_USER_PROMPTS is off, which means your prompt text stays on your machine.
Setting it up for your whole organization
The steps above are for one person on their own machine. If your organization uses Claude Enterprise, an admin can set up Claude Code, Cowork, and the Office agents for everyone at once from the Anthropic admin console, with nothing for each person to do. See AI vendor integrations for those steps.
What Claude Code sends
Claude Code reports each call on the OTLP logs signal with its own attributes, and it stamps identity on every record whether you ask it to or not. Proxon keeps those fields, because they are what lets it tell which Claude plan paid for a call.
user.email # the signed-in person's email address
user.id # Claude Code's own user id
user.account_uuid # the Anthropic account id, which is the key to the plan
user.account_id # a second account spelling Anthropic sends
organization.id # the Anthropic organization the account belongs to
session.id # the session the call was part ofThese are identity, not attribution. Proxon still credits spend to the person who owns the credential it arrived on, and never to an email address a tool reported about itself. What the account and organization ids buy you is the plan, described next.
What Codex sends
Codex reports each call on the OTLP logs signal too. Proxon keeps the signed-in email address, the account id, and whether you signed in with a ChatGPT account or an API key. Codex never says which plan you are on. As with Claude Code, the plan comes from the observer app on a Mac, which reads it from the Codex sign-in file and reports it for that account.
Putting a plan on Claude Code usage
Capturing Claude Code over OpenTelemetry needs no Proxon software on the machine. Labelling that usage with a plan does, and it is worth knowing which before you roll this out.
Proxon knows what a Claude Code call cost from the moment it arrives. What it cannot tell from the telemetry alone is whether that cost was company cash or value drawn from a subscription somebody already pays for, because Claude Code sends no plan, no billing mode, and no subscription hint of any kind. Until Proxon knows the plan, the usage shows up under Unclassified, priced but not placed.
Proxon resolves the plan for a Claude Code row in this order, and stops at the first one that answers.
- The Anthropic account's own plan. The observer app for Mac reads the Claude config file on the machine and reports the plan sitting in it. That works even with network capture switched off, so a machine can supply the plan without the app inspecting a single request. The Windows observer app does not read the plan yet.
- The Anthropic organization's plan. If nothing has been reported for the account itself, Proxon falls back to a plan reported for the same Anthropic organization.
- A plan declared for that person in Proxon. Used when no observed plan is available, since a plan Proxon measured outranks one somebody typed.
- A plan you put in the telemetry yourself. See Setting the plan by hand.
The account's plan does not have to come from the machine the usage came from. If you run the observer app on one machine, Claude Code usage from your other machines under the same Anthropic account is classified too.
The second rung is what makes this work at scale. One teammate who installs the observer app reports their Claude plan once, and from then on every Claude Code call from that Anthropic organization is classified, including calls from machines with no Proxon software on them at all.
If nobody in the Anthropic organization runs the app and nothing is declared or set by hand, the usage is still captured and still priced. It just stays Unclassified.
What counts as one Anthropic organization
An individual Claude Pro or Max login gets an Anthropic organization of its own, containing one person. So the organization fallback only reaches across people who share a company organization, which means Claude Team or Claude Enterprise.
At a company where everyone signs in with a personal Pro or Max plan, each person is their own Anthropic organization, and one teammate installing the app classifies nobody else. Each person needs either the app on a machine of their own or a plan declared for them in Proxon.
Setting the plan by hand
If no one in your Anthropic organization runs the observer app for Mac, you can state the plan in the telemetry itself. That includes an organization that runs only the Windows app, since it does not report the plan yet. Add one more key to the env object in ~/.claude/settings.json.
"OTEL_RESOURCE_ATTRIBUTES": "proxon.plan_name=Claude Max (20x),proxon.billing_mode=subscription"proxon.billing_mode is subscription for a plan that covers the usage or api_metered for usage billed at API rates. This is the lowest rung, so a declaration in Proxon and an observed plan both override it. Treat it as a stopgap, since it is a value somebody typed rather than one Proxon measured.
What a plan changes in your numbers
The plan does not just label the usage. It decides which lane the money lands in.
- Claude Pro, Max, and Team are covered plans. The usage becomes notional, which is value consumed against a subscription you already pay for rather than a new cash charge.
- Claude Enterprise is metered. Anthropic bills the seat and then bills the tokens, so Enterprise usage is company cash. If your organization moves from Max to Enterprise, a cash figure appears where notional value used to be. That is the bill changing, not Proxon changing its mind.
- An Enterprise seat has no list price, since it is negotiated per customer. Proxon shows the plan name with the seat left unpriced rather than inventing a
$0you might reconcile against an invoice. - A Claude Team account books a seat. Installing the observer app on one machine of a Team account tells Proxon there is a seat to pay for, and that seat fee appears in your committed fees as a floor under the usage. An Enterprise account adds no such fee, for the reason above.
When a plan starts to apply
A plan applies from its own date forward. Proxon resolves each call against the plan that was in effect on the day of the call. Upgrading from Pro to Max, or moving from a personal Max to a company Enterprise organization, changes how new usage is classified and leaves last month's page exactly as it was. Your history does not move under you.
The same rule sets where classification begins. Usage that predates the first plan Proxon ever saw for an account cannot be resolved, because there is nothing to resolve it against. Installing the observer app classifies from that point on rather than retroactively.
Claude Code usage exported before Proxon began keeping these identity fields carries no account id at all, so it can never be classified. Those rows stay Unclassified permanently. If your Cost Intelligence page shows a block of unclassified Claude Code spend that will not resolve no matter what you install, this is why.
Troubleshooting
The status stays on Waiting for your first request. Your tool has not reached Proxon. Make sure you restarted every open session after setting it up, and fully quit and reopened the desktop app. Claude Code reads its settings only when a session starts, so continuing an old conversation sends nothing.
The status says Connected, no data yet. Your credential works, but nothing Proxon could read has arrived. For Claude Code, check that OTEL_LOGS_EXPORTER is set to otlp, since the cost of each call rides on logs. For either tool, check that the protocol is the one shown above. Proxon accepts OTLP over HTTP only, so an exporter set to gRPC never gets through.
You use Claude Code on the web. Cloud sessions on claude.ai/code also need ingest.proxon.ai on the cloud environment's list of allowed domains. Settings files cannot add a domain to that list.
The command stopped with an error. It refuses to write anything if your credential is rejected or Proxon cannot be reached, so nothing was changed. Rotate your credential if it was refused, or check your network, then run it again.