For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setup — Claude Code desktop app (OTel telemetry to Revenium)

Configure OpenTelemetry in the Claude Code desktop app so its AI usage is metered in Revenium — the desktop app does not configure this automatically the way the CLI does.

Set the values below once and your Claude Code desktop app usage is metered in Revenium alongside your CLI usage.

Configure the desktop app

These settings are not under the app's settings screen, which is where most people look first. They belong to the environment the session runs in:

  1. In the Claude desktop app, open the Code tab and start a New session.

  2. Click the environment selector — it shows Local — and open its settings using the gear icon beside Local.

  3. Add the Revenium OTLP settings below there.

  4. Fully quit and relaunch the app.

Anthropic's own desktop app quickstart covers the Code tab and choosing an environment if you are new to the app.

Settings to add

Use a Revenium metering key (rev_mk_*), not an Anthropic/OpenAI provider key — the Revenium key authenticates telemetry ingest.

CLAUDE_CODE_ENABLE_TELEMETRY=1
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.revenium.ai/meter/v2/otlp
OTEL_EXPORTER_OTLP_HEADERS=x-api-key=rev_mk_your_tenant_yourkey
OTEL_EXPORTER_OTLP_PROTOCOL=http/json
OTEL_LOGS_EXPORTER=otlp
OTEL_METRICS_EXPORTER=none
OTEL_LOGS_EXPORT_INTERVAL=5000

Field meanings are identical to the CLI managed-settings page (endpoint = Revenium OTLP; header = your metering key; protocol http/json; logs exporter otlp is how Revenium receives per-call telemetry; metrics none because Revenium bills from log events only; logs export interval 5000 ms, a 5-second flush).

Optional: OTEL_RESOURCE_ATTRIBUTES for your own internal sub-segmentation. Desktop sessions are already distinguishable in Revenium by service.name=claude-code-desktop (set automatically), so no source tag is required for correct attribution.

Verify your configuration

Run a short Claude Code desktop session; usage should appear in Revenium after the next telemetry flush. If nothing appears, check: the metering key is active, the OTLP endpoint matches your Revenium environment, and the app was fully quit and relaunched after the change.

Why this is needed

Optional background — you do not need this to complete the steps above.

Claude Code CLI installs pick up your organization's Revenium telemetry configuration from your team's managed settings, so the CLI is metered as soon as you sign in. The desktop app reads its configuration from the environment a session runs in rather than from those managed settings, so the same values are entered there once, by hand. After that, desktop sessions are ingested and attributed in Revenium the same way CLI sessions are.

Last updated

Was this helpful?