Skip to main content
Connect your AI

Send telemetry from coding tools

Claude Code, Codex, GitHub Copilot in an editor and Gemini CLI can report their own usage. They send it in the OpenTelemetry format, also called OTLP. You create a telemetry source in StackJack. The…

Written By Christopher Scaminaci

Last updated 13 days ago

Claude Code, Codex, GitHub Copilot in an editor and Gemini CLI can report their own usage. They send it in the OpenTelemetry format, also called OTLP. You create a telemetry source in StackJack. The source gives you an address and a token. You put both into each tool. This is the first source that Get started asks for.

At a glance

  • Plan: every plan. Free sees facts. Scanning text with rules needs Pro.
  • Who: a governance administrator creates the source.
  • Where you set it up: AI Governance → Connected accounts → All sources, then New source.
  • Where you see the data: Activity → Activity explorer, Activity → Spend, and the Health page of the source.

What you will see

  • A row for the source on the All sources page. It shows the capture level, the status and the time of the last event.
  • A fact for each model call and tool call that the tool reports. Each fact shows the person, the tool, the model, tokens and cost. Find them in Activity → Activity explorer with the sender filter.
  • Estimated cost on the Spend page. Telemetry cost is the price list times the tokens that the tool reported.
  • At the capture levels that scan text, findings when a rule matches.

Create the source

  1. Open AI Governance → Connected accounts → All sources.
  2. Select New source.
  3. Enter a Name, such as "Claude Code fleet".
  4. Choose a Capture level. The default is Scan only. See Capture levels and what your employer sees. Masked text and Full text need the Pro plan.
  5. Select Create source.
  6. Copy what the dialog shows: the Token, the Endpoint, and a settings block. The token is shown once. Select I have saved the token when you have copied it.

The dialog has two settings blocks. Claude Code settings is a block of environment variables for Claude Code. Any other OpenTelemetry sender is a block of three standard OpenTelemetry variables: the protocol, the endpoint and the authorization header. Copy the block from the dialog. It is built for your source and your capture level. Do not type it from memory.

If the dialog says the endpoint is shown once StackJack finishes setting up your region, wait and rotate the token to see it again.

Put the settings into the tools

You have two choices.

What the tool sends follows the capture level. At Facts only no prompt or response text leaves the machine. At the levels that scan or store text, the tool is told to send it so that your rules can run.

Foundry tracing also arrives through a telemetry source. Point the project's tracing at a source you create here. See Microsoft 365 Copilot and Azure.

Look after the token

  • Rotate token. In the menu on the source row, select Rotate token. StackJack shows a new token once. The old token keeps working for 24 hours, so senders can switch.
  • Revoke. Select Revoke with the token's prefix to stop one token. A sender that uses it stops being accepted within a minute. You cannot undo this. Issue a new token to replace it.
  • Switch off. Select Switch off. The source refuses its senders. Its history stays.

StackJack raises an alert before a token expires and when it has expired. See Alerts and the inbox.

Many people at once

A source accepts a small number of new people in one request and asks the sender to retry the rest after a short wait. The OpenTelemetry Collector retries on its own. A direct exporter that sends for many people at once, such as a shared gateway or a bulk replay, must allow retries. Otherwise its first batches are dropped.

Troubleshooting

What you seeWhat to check
The source shows no last eventThe tool has not sent yet. Check that the address and token are in its environment and that the tool restarted.
The Health page shows records turned awayThe Health page counts records accepted and turned away by hour. A token that was revoked or a source that is switched off turns records away.
"The source is off. Its senders are refused until you switch it on"Select Switch on in the source menu.
Nothing arrives for an EU or UK organizationCollection waits until you record the staff notice. Open Privacy and data → Privacy and notices.
Facts arrive but no findingsRules scan text on Pro and higher. Check the capture level and that a rule pack is on. See Rule packs, modes and custom rules.
Names look odd or doubledThe same person can appear under two sign-ins. See Staff and sign-in matching.

More help is in Troubleshooting and FAQ, by symptom.

Next