Connect Claude Code using OpenTelemetry
Connect Claude Code to LinearB using OpenTelemetry for near-real-time telemetry across Claude Teams, AWS Bedrock, and other supported environments.
Overview
Connect Claude Code to LinearB using OpenTelemetry (OTEL) to send usage and activity telemetry directly to LinearB.
During setup, LinearB generates an organization-specific ingest token and a managed-settings JSON configuration that you can deploy across your organization.
OpenTelemetry is suitable for Claude Teams, AWS Bedrock, other third-party Claude providers, and organizations that need more immediate telemetry than the API-based connection methods provide.
To compare all available methods, see Choose a Claude Code connection .
Enable OpenTelemetry
Enable OpenTelemetry
- Go to Settings → Company Settings → AI Tools → Integrations.
- Click Add New.
- Select Claude Code.
- Click Continue.
- Select OpenTelemetry.
- Click Continue.
- Click Issue ingest token.
LinearB generates:
- An organization-specific, write-only Ingest Token.
- A Managed settings JSON configuration containing the required OpenTelemetry settings.
- Review the generated configuration.
- Click Copy JSON & Close.
Deploy the Managed Settings Configuration
Deploy the Managed Settings Configuration
LinearB recommends deploying OpenTelemetry using Claude managed settings.
- Server-managed settings, configured in the Claude Admin Console and delivered by Anthropic when users sign in.
-
Endpoint-managed settings, deployed through a
managed-settings.jsonfile on each device.
Server-managed settings are not applied when Claude Code runs through AWS Bedrock or another third-party provider. Deploy the LinearB OpenTelemetry configuration using an endpoint-managed managed-settings.json file instead.
- Go to Settings → Company Settings → AI Tools → Integrations.
- Select Claude Code — OpenTelemetry.
- Expand Managed settings JSON.
- Copy the generated configuration.
- Open your Claude managed-settings configuration.
- Paste the generated configuration into the managed settings.
- Deploy the updated configuration to your users.
Once the managed settings are deployed and approved, Claude Code begins sending telemetry data to LinearB.
Configure OpenTelemetry for an Individual User
Configure OpenTelemetry for an Individual User
If your organization does not use Claude managed settings, users can configure OpenTelemetry individually.
- Go to Settings → Company Settings → AI Tools → Integrations.
- Select Claude Code — OpenTelemetry.
- Expand Managed settings JSON.
- Copy the generated OpenTelemetry configuration.
- Add the configuration to the user’s Claude Code settings.
- Save the configuration.
- Restart Claude Code if required.
- Approve the managed-settings prompt when it appears.
Configure User Attribution for AWS Bedrock
Configure User Attribution for AWS Bedrock
When using Claude Code with AWS Bedrock, user attribution must be configured separately.
Open the Claude Code user settings file, located by default at ~/.claude/settings.json, and add the following setting:
{
"env": {
"OTEL_RESOURCE_ATTRIBUTES": "user.email=user@company.com"
}
}
Replace user@company.com with the user’s email address.
user.email is unique for each user, this value cannot be stored in a single shared managed-settings.json file.
Configure the value separately for each user using one of the following methods:
- Per-user MDM configuration that inserts the correct email address.
- A login or provisioning script.
- The user’s own
~/.claude/settings.jsonfile.
Without a per-user OTEL_RESOURCE_ATTRIBUTES value, Claude Code activity may not be attributed to the correct user in LinearB.
Use the OpenTelemetry connection. The Claude Code Admin API and Claude Code Analytics API connections are available only for Anthropic-hosted Claude environments.
Deploy the LinearB OpenTelemetry configuration using an endpoint-managed managed-settings.json file in the appropriate system directory:
-
macOS:
/Library/Application Support/ClaudeCode/managed-settings.json -
Linux / WSL:
/etc/claude-code/managed-settings.json -
Windows:
C:\Program Files\ClaudeCode\managed-settings.json
The file can be distributed through MDM, a configuration-management tool, a provisioning script, or an installer. MDM is not required.
To prevent users from overriding the configuration, the file should be owned by an administrator or root account and have restricted write permissions.
Do not use the Claude Admin Console Managed settings panel for AWS Bedrock deployments. Server-managed settings are not delivered to Claude Code when it runs through Bedrock.
Verify the Integration
Verify the Integration
- Deploy the generated configuration.
- Ask a developer to restart Claude Code and approve the managed settings.
- Use Claude Code to perform development activity.
- Go to Settings → Company Settings → AI Tools → Integrations.
- Select Claude Code — OpenTelemetry.
- Confirm that the connector status is Connected.
- Confirm that Last used updates after telemetry is received.
Adoption and accepted-lines data appears in AI Analytics. Model, token, and estimated-consumption data is available through Metrics Builder.
Rotate an Ingest Token
Rotate an Ingest Token
Rotate the ingest token if it has been exposed, compromised, or must be replaced under your organization’s security policy.
- Go to Settings → Company Settings → AI Tools → Integrations.
- Select Claude Code — OpenTelemetry.
- Next to Ingest Token, click Rotate.
- Review the confirmation message.
- Click Rotate token.
- Copy the newly generated managed-settings JSON.
- Update your Claude managed settings or individual-user settings.
- Redeploy the updated configuration.
Revoked tokens remain visible under Previous tokens for audit purposes.
Disconnect or Reconnect
Disconnect or Reconnect
Disconnecting OpenTelemetry stops LinearB from accepting new telemetry through the connector and moves it to the Disconnected list. Previously collected data is preserved.
To restore the connector, open it from the Disconnected list and click Reconnect. LinearB validates the saved configuration before restoring the connection.
If another Claude Code connection is active, reconnecting OpenTelemetry replaces that active connection after you confirm the switch.
For complete connector-management instructions, see Manage AI tool integrations .
Troubleshooting
Troubleshooting
The Connector Shows a Connection Error
- Verify that OpenTelemetry is the selected Claude Code connection type.
- Confirm that the connector has not been disconnected or replaced by another Claude Code connection.
- Verify that the current ingest token has not been rotated without updating the deployed configuration.
No Telemetry Appears
- Verify that the latest managed-settings JSON has been deployed to users.
- Confirm that users restarted Claude Code and approved the managed-settings prompt.
- Confirm that users received the latest managed-settings configuration.
- Verify that Last used updates after Claude Code activity occurs.
- Verify that the required OpenTelemetry environment variables, exporter endpoint, headers, and protocol are present in the deployed configuration.
AWS Bedrock Activity Is Missing
- Confirm that the configuration was deployed using an endpoint-managed
managed-settings.jsonfile. - Do not use the Claude Admin Console Managed settings panel for AWS Bedrock deployments.
- Verify that every user has
OTEL_RESOURCE_ATTRIBUTES=user.email=<email>configured separately.
Users Are Not Attributed Correctly
- Verify that each user’s
OTEL_RESOURCE_ATTRIBUTEScontains the correct email address. - Confirm that Claude users appear in Settings → Users after telemetry is processed.
- Allow until the following day for automatic user merges where applicable.
If Claude Code telemetry does not appear after completing these checks, contact LinearB Support.
Related Articles
Related Articles
How did we do?
Connect Amazon Q Developer to LinearB
Connect Claude Code using the Admin API