# Claude Code and Cowork

## OTel Configuration

### Account Requirements

OTel data is sent from the client to an OTel collector via environment variables. As of March 2026, there are no specific account requirements to configure this collection. However, only Teams and Enterprise accounts can supply configuration from a central location using [Server-Managed Settings](https://code.claude.com/docs/en/server-managed-settings). If you are using Server-Managed Settings, the end user cannot modify the OTel configuration.

## Setting up the Claude Code Data Source in the Turngate App

OTel access is controlled via an OTel ingest token. During the onboarding process you will be assigned a token for your org. To get started, go to the [Integrations Page](https://app.turngate.dev/integrations) and start the Claude OTel integration wizard. Walk through the initial steps and then you will be presented with the token and endpoint information.

<figure><img src="https://1393548075-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOucyTG0v1zvVLxweEeuI%2Fuploads%2FO1tnz9ckxEd7AAszbyqR%2Fimage.png?alt=media&#x26;token=f12a10c5-f959-4f49-85f2-539a734b8307" alt=""><figcaption></figcaption></figure>

Copy the token value and store it securely.&#x20;

Then, set up Claude Code with the following environment:

```
jq '.env += {
    "ENABLE_TOOL_SEARCH": "true",
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "OTEL_METRICS_EXPORTER": "otlp",
    "OTEL_LOGS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
    "OTEL_EXPORTER_OTLP_ENDPOINT": "https://collector.turngate.io",
    "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer tg_otel_<YOUR TOKEN HERE>",
    "OTEL_METRIC_EXPORT_INTERVAL": "100000",
    "OTEL_LOGS_EXPORT_INTERVAL": "30000",
    "OTEL_LOG_USER_PROMPTS": "1",
    "OTEL_LOG_TOOL_DETAILS": "1"
  }' ~/.claude/settings.json > /tmp/settings.tmp && mv /tmp/settings.tmp ~/.claude/settings.json
```

These environment variables can either be added manually locally or via the Claude Management interface if you have the appropriate Claude license.&#x20;

Once the integration has been saved within Turngate and environment variables have been appropriately updated, OTel data should be flowing immediately. GIven the nature of OTel, there will be no historic ingestion of logs.

### Setting up Cowork

Take the bearer token and endpoint information and put it in the "Monitoring" section of the Cowork settings in the Claude native app.

<figure><img src="https://1393548075-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOucyTG0v1zvVLxweEeuI%2Fuploads%2FfdrEcXW58YgTBzcLrw3g%2Fimage.png?alt=media&#x26;token=9e66c54b-0837-4169-962c-3f71957fcfdd" alt=""><figcaption></figcaption></figure>

### Other Resources

Claude [Server-Managed Settings](https://code.claude.com/docs/en/server-managed-settings)

Claude [Monitoring Usage](https://code.claude.com/docs/en/monitoring-usage) (OTel Config)
