# 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="/files/1lF6gykB9h0GfPrdCJo5" alt=""><figcaption></figcaption></figure>

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

Then, set up Claude Code with the following environment:

```
jq '.env += {
    "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="/files/q99YUoVn4dErKkCUu7D3" 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.turngate.io/setup/integrations/claude.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
