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.

OpenTelemetry does not provide historical backfill. Data collection begins after OpenTelemetry is enabled, the generated configuration is deployed, and users approve the managed settings.
Only one Claude Code connection can be active at a time. Adding or reconnecting another Claude Code connection replaces the active connection. Previously collected data is preserved.

To compare all available methods, see Choose a Claude Code connection .

Enable OpenTelemetry

Enable OpenTelemetry

  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.
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.
If another Claude Code connection is active, LinearB asks you to confirm the switch. Click Yes, switch integrations to replace it with OpenTelemetry.
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 Claude Code — OpenTelemetry.
  3. Expand Managed settings JSON.
  4. Copy the generated configuration.
  5. Open your Claude managed-settings configuration.
  6. Paste the generated configuration into the managed settings.
  7. Deploy the updated configuration to your users.

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

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 after users approve the settings.
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 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 Claude Code — OpenTelemetry.
  3. Expand Managed settings JSON.
  4. Copy the generated OpenTelemetry configuration.
  5. Add the configuration to the user’s Claude Code settings.
  6. Save the configuration.
  7. Restart Claude Code if required.
  8. 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.

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

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

AWS Bedrock users:

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

  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 Claude Code — OpenTelemetry.
  6. Confirm that the connector status is Connected.
  7. 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.
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

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 Claude Code — OpenTelemetry.
  3. Next to Ingest Token, click Rotate.
  4. Review the confirmation message.
  5. Click Rotate token.
  6. Copy the newly generated managed-settings JSON.
  7. Update your Claude managed settings or individual-user settings.
  8. Redeploy the updated configuration.
Rotating the token immediately revokes the current token. Claude Code cannot send telemetry until the new configuration is deployed and approved.

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.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