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
- Open AI Governance → Connected accounts → All sources.
- Select New source.
- Enter a Name, such as "Claude Code fleet".
- 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.
- Select Create source.
- 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.
- By hand, one machine at a time. Paste the block into the tool's environment. This is fine for a trial.
- For all staff machines. Let StackJack make the settings files for you and deliver them. See Settings for staff machines and Delivering the settings through your RMM.
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
More help is in Troubleshooting and FAQ, by symptom.
Next
Was this helpful?
More in Connect your AI
Delivering the settings through your RMMRead your AI vendors' admin accountsMicrosoft 365 Copilot and AzureGemini activity and Gemini conversationsStill need help? Ask the team