Skip to main content

Configuring Claude Code (OpenTelemetry)

Configure the Claude Code OpenTelemetry connector in LinearB for event-level Claude telemetry ingestion and health validation.

Steven Silverstone
Updated by Steven Silverstone

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.

OpenTelemetry sends Claude Code usage and activity data directly to LinearB using an organization-specific ingest token generated by 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.
OpenTelemetry is recommended when the Admin API or Analytics API integration paths are not available for your Claude environment.
Enable OpenTelemetry

Enable OpenTelemetry

Configure the Claude Code OpenTelemetry integration from the AI Tools settings page.

  1. Navigate to Settings > AI Tools.
  2. Select Claude Code.
  3. Select OpenTelemetry.

After OpenTelemetry is enabled, LinearB generates:

  • An organization-specific Ingest Token.
  • A Managed Settings JSON configuration.
The generated ingest token is write-only and is used by Claude Code to send telemetry data to LinearB.
Deploy the Managed Settings Configuration

Deploy the Managed Settings Configuration

LinearB recommends deploying OpenTelemetry using Claude managed settings.

  1. Navigate to Settings > AI Tools > Claude Code.
  2. Expand the Managed Settings JSON section.
  3. Copy the generated configuration.
  4. Open your Claude managed settings configuration.
  5. Paste the generated configuration into the managed settings configuration.
  6. Deploy the updated configuration to your users.

Once the managed settings are deployed, Claude Code begins sending telemetry data to LinearB.

Updating Claude managed settings terminates active Claude Code sessions. To minimize disruption, deploy managed settings changes during off-hours when possible. After the updated settings are deployed, users must restart Claude Code and approve the managed settings configuration before telemetry collection begins. Users can resume their sessions after the update is applied and the managed settings warning is accepted.
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.

  1. Navigate to Settings > AI Tools > Claude Code.
  2. Copy the generated OpenTelemetry configuration.
  3. Add the configuration to the user's Claude Code settings.
  4. Save the configuration.
  5. 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.

Without the OTEL_RESOURCE_ATTRIBUTES setting, Claude Code activity may not be attributed to the correct user in LinearB.
AWS Bedrock users: Use the OpenTelemetry (OTEL) integration. The Claude Code Admin API and Claude Code Enterprise Analytics API integration paths are intended for Anthropic-hosted Claude environments.
Verify the Integration

Verify the Integration

After deploying the configuration, verify that Claude Code telemetry is being received by LinearB.

  1. Use Claude Code to perform development activities.
  2. Navigate to Settings > AI Tools > Claude Code > OpenTelemetry.
  3. Verify that the Last Activity timestamp is updated.
  4. Navigate to Settings > Users.
  5. Verify that Claude users appear after telemetry is processed.
New Claude users are automatically merged with matching Git users. User merges may occur on the following day.
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.

  1. Navigate to Settings > AI Tools > Claude Code.
  2. Select Rotate.
  3. Copy the newly generated configuration.
  4. Update your Claude managed settings or individual user settings with the new value.
  5. Redeploy the updated configuration if using managed settings.
Rotating an ingest token invalidates the previous token. After rotation, update all Claude Code configurations to use the new token.
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_ATTRIBUTES is 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

How did we do?

AI Iteration Summary for Teams

Contact