Configuring Claude Code (OpenTelemetry)
Configure the Claude Code OpenTelemetry connector in LinearB for event-level Claude telemetry ingestion and health validation.
Overview
LinearB supports collecting Claude Code usage and activity telemetry through OpenTelemetry (OTEL). When enabled, LinearB generates an ingest token and configuration that can be deployed across your organization.
Telemetry collected from Claude Code is used to power AI Analytics and related reporting within LinearB.
Choose an Integration Method
Choose an Integration Method
-
Anthropic API
Use the Admin API integration. -
Anthropic Enterprise
Use the Analytics API integration. -
Anthropic Teams
Use the OpenTelemetry (OTEL) integration.
Enable OpenTelemetry
Enable OpenTelemetry
Configure the Claude Code OpenTelemetry integration from the AI Tools settings page.
- Navigate to Settings > AI Tools.
- Select Claude Code.
- Select OpenTelemetry.
After OpenTelemetry is enabled, LinearB generates:
- An organization-specific Ingest Token.
- A Managed Settings JSON configuration.
Deploy the Managed Settings Configuration
Deploy the Managed Settings Configuration
LinearB recommends deploying OpenTelemetry using Claude managed settings.
- Navigate to Settings > AI Tools > Claude Code.
- Expand the Managed Settings JSON section.
- Copy the generated configuration.
- Open your Claude managed settings configuration.
- Paste the generated configuration into the managed settings configuration.
- Deploy the updated configuration to your users.
Once the managed settings are deployed, 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.
- Navigate to Settings > AI Tools > Claude Code.
- Copy the generated OpenTelemetry configuration.
- Add the configuration to the user's Claude Code settings.
- Save the configuration.
- Restart Claude Code if required.
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.
OTEL_RESOURCE_ATTRIBUTES setting, Claude Code activity may not be attributed to the correct user in LinearB.
Verify the Integration
Verify the Integration
After deploying the configuration, verify that Claude Code telemetry is being received by LinearB.
- Use Claude Code to perform development activities.
- Navigate to Settings > AI Tools > Claude Code > OpenTelemetry.
- Verify that the Last Activity timestamp is updated.
- Navigate to Settings > Users.
- Verify that Claude users appear after telemetry is processed.
Rotate an Ingest Token
Rotate an Ingest Token
If you need to replace the existing ingest token, generate a new token directly from the Claude Code integration page.
- Navigate to Settings > AI Tools > Claude Code.
- Select Rotate.
- Copy the newly generated configuration.
- Update your Claude managed settings or individual user settings with the new value.
- Redeploy the updated configuration if using managed settings.
Troubleshooting
Troubleshooting
- Verify that OpenTelemetry is selected for the Claude Code integration.
- Verify that the latest Managed Settings JSON has been deployed to users.
- Verify that the current ingest token has not been rotated without updating Claude Code configurations.
- Confirm that users have received the latest Claude managed settings configuration.
- Verify that the Last Activity timestamp is updating.
- For AWS Bedrock deployments, verify that
OTEL_RESOURCE_ATTRIBUTESis configured with the correct user email address. - Verify that Claude users appear in Settings > Users after telemetry is processed.
If Claude Code telemetry does not appear in LinearB after completing these checks, contact Support.
Related Articles
Related Articles
- Configuring Claude Code (Admin API) – For organizations using the Anthropic API.
- Configuring Claude Code (Enterprise Analytics API) – For organizations using Anthropic Enterprise.
How did we do?
AI Iteration Summary for Teams