Claude Code · Direct Setup
- Org-wide (recommended)
- Per developer
Push settings to all developers via the Claude admin console. Requires a Claude for Teams or Enterprise plan and an Owner or Primary Owner role.
- Go to claude.ai → Admin Settings → Claude Code → Managed settings
- Add the following environment variables:
| Key | Value |
|---|---|
CLAUDE_CODE_ENABLE_TELEMETRY | 1 |
OTEL_METRICS_EXPORTER | otlp |
OTEL_LOGS_EXPORTER | otlp |
OTEL_EXPORTER_OTLP_PROTOCOL | http/protobuf |
OTEL_EXPORTER_OTLP_ENDPOINT | https://telemetry.mstone.ai |
OTEL_EXPORTER_OTLP_HEADERS | x-shared-secret=<your-shared-secret> |
- Save — settings are pushed automatically to all developers in your organization.
Settings Config
Save to ~/.claude/settings.json on each developer machine:
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://telemetry.mstone.ai",
"OTEL_EXPORTER_OTLP_HEADERS": "x-shared-secret=<your-shared-secret>"
}
}
Set User Identity
Add to your shell profile (~/.zshrc or ~/.bashrc):
export OTEL_RESOURCE_ATTRIBUTES="user.login=$(whoami),user.email=$(whoami)@your-company-domain.com"
Then reload: source ~/.zshrc
Restart Claude Code
Close and reopen Claude Code for settings to take effect.