Skip to main content

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.

Steven Silverstone
Updated by Steven Silverstone

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.

No historical backfill: Data collection begins after OpenTelemetry is enabled, the generated configuration is deployed, and users approve the managed settings.
Connection limit: Only one active Claude Code OpenTelemetry integration can be connected at a time. A failing OpenTelemetry integration still counts as active.

Learn more:

Enable OpenTelemetry

Enable OpenTelemetry

Anyone with access to AI Tools settings can create and manage the OpenTelemetry integration.

  1. Go to Settings → Company Settings → AI Tools → Integrations.
  2. Click Add New.
  3. Select Claude Code.
  4. Click Continue.
  5. Select OpenTelemetry.
  6. Click Continue.
  7. Click Issue ingest token.

LinearB generates:

  • An organization-specific, write-only Ingest Token.
  • A Managed settings JSON configuration containing the required OpenTelemetry settings.
Important: The ingest token is shown only once during initial setup. Copy the generated configuration before closing the setup window.
  1. Review the generated configuration.
  2. Click Copy JSON & Close.

When setup is complete, Claude Code — OpenTelemetry appears under Connected.

Duplicate integrations: If another active OpenTelemetry integration already exists, disconnect it before creating another one.
Deploy the Managed Settings Configuration

Deploy the Managed Settings Configuration

LinearB recommends deploying OpenTelemetry using Claude managed settings.

AWS Bedrock and other third-party Claude providers:

Claude supports two managed-settings mechanisms:

  • 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.json file 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.

  1. Go to Settings → Company Settings → AI Tools → Integrations.
  2. Select Connected.
  3. Select Claude Code — OpenTelemetry.
  4. Expand Managed settings JSON.
  5. Copy the generated configuration.
  6. Open your Claude managed-settings configuration.
  7. Paste the generated configuration into the managed settings.
  8. Deploy the updated configuration to your users.

After the managed settings are deployed and approved, Claude Code begins sending telemetry data to LinearB.

User approval required: Each developer sees a one-time managed-settings approval prompt in their next Claude Code session. Tell your team about the prompt before deploying the configuration. Telemetry collection begins only after users approve the settings.
Active sessions: Updating Claude managed settings terminates active Claude Code sessions. When possible, deploy changes during off-hours. Users must restart Claude Code and approve the configuration before telemetry collection begins.
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. Go to Settings → Company Settings → AI Tools → Integrations.
  2. Select Connected.
  3. Select Claude Code — OpenTelemetry.
  4. Expand Managed settings JSON.
  5. Copy the generated OpenTelemetry configuration.
  6. Add the configuration to the user’s Claude Code settings.
  7. Save the configuration.
  8. Restart Claude Code if required.
  9. 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:

{
            "env": {
              "OTEL_RESOURCE_ATTRIBUTES": "user.email=user@company.com"
            }
          }

Replace user@company.com with the user’s email address.

Per-user configuration required: Because user.email is unique for each user, this value cannot be stored in one shared managed-settings.json file.

Configure it separately using one of these methods:

  • Per-user MDM configuration that inserts the correct email address.
  • A login or provisioning script.
  • The user’s own ~/.claude/settings.json file.

Without a per-user OTEL_RESOURCE_ATTRIBUTES value, Claude Code activity may not be attributed to the correct user in LinearB.

Deploy managed settings for AWS Bedrock

Use the OpenTelemetry integration for AWS Bedrock. The Admin API and Analytics API integrations 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 or 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.

Important: 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

  1. Deploy the generated configuration.
  2. Ask a developer to restart Claude Code and approve the managed settings.
  3. Use Claude Code to perform development activity.
  4. Go to Settings → Company Settings → AI Tools → Integrations.
  5. Select Connected.
  6. Select Claude Code — OpenTelemetry.
  7. Confirm that the integration status is Connected.
  8. 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.

Estimated consumption is not a billing total. Vendor plans, discounts, credits, negotiated pricing, and pricing changes can cause the estimate to differ from the provider’s invoice.
User matching: New Claude users are automatically merged with matching Git users. User merges may occur on the following day.
Manage or Rotate the Ingest Token

Manage or Rotate the Ingest Token

No Edit action: OpenTelemetry does not provide the standard Edit button because its connection settings are not editable. Use Rotate when the ingest token must be replaced.

Rotate the ingest token if it has been exposed, compromised, or must be replaced under your organization’s security policy.

  1. Go to Settings → Company Settings → AI Tools → Integrations.
  2. Select Connected.
  3. Select Claude Code — OpenTelemetry.
  4. Next to Ingest Token, click Rotate.
  5. Review the confirmation message.
  6. Click Rotate token.
  7. Copy the newly generated managed-settings JSON.
  8. Update your Claude managed settings or individual-user settings.
  9. Redeploy the updated configuration.
Important: Rotating the token immediately revokes the current token. Claude Code cannot send telemetry until the new configuration is deployed and approved.

What happens to historical data?

  • Rotating the token does not delete previously collected data.
  • OpenTelemetry is push-based, so data is not recollected after rotation.
  • Data stops arriving when the old token is revoked and resumes after the new configuration is deployed.
  • Activity from the interruption is not backfilled.

Revoked tokens remain visible under Previous tokens for audit purposes.

Disconnect or Reconnect

Disconnect or Reconnect

Disconnecting OpenTelemetry stops LinearB from accepting new telemetry and moves the integration to the Disconnected list. Previously collected data is preserved.

Disconnect the integration

  1. Go to Settings → Company Settings → AI Tools → Integrations.
  2. Select Connected.
  3. Select Claude Code — OpenTelemetry.
  4. Click Disconnect.
  5. Confirm the action.

Reconnect the integration

  1. Go to Settings → Company Settings → AI Tools → Integrations.
  2. Select Disconnected.
  3. Select Claude Code — OpenTelemetry.
  4. Click Reconnect.
  5. Complete validation to restore the integration.
Duplicate integrations: If another active OpenTelemetry integration exists, disconnect it before reconnecting the previous one.

Learn more:

Troubleshooting

Troubleshooting

The Integration Shows an Error

  • Verify that OpenTelemetry is the selected Claude Code connection type.
  • Confirm that the integration has not been disconnected.
  • 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.json file.
  • 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_ATTRIBUTES contains 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

How did we do?

Connect Amazon Q Developer to LinearB

Connect Claude Code using the Admin API

Contact