From e4b6458597171aa7c933fbe059c09ad455c2e613 Mon Sep 17 00:00:00 2001 From: Amber Tunnell Date: Fri, 10 Apr 2026 16:12:26 -0400 Subject: [PATCH 1/4] Restore OTLP setup instructions to AI Agents Console page Co-Authored-By: Claude Sonnet 4.6 --- content/en/ai_agents_console/_index.md | 69 ++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/content/en/ai_agents_console/_index.md b/content/en/ai_agents_console/_index.md index d2bd5b69acc..959e34d4e74 100644 --- a/content/en/ai_agents_console/_index.md +++ b/content/en/ai_agents_console/_index.md @@ -31,10 +31,75 @@ AI Agents Console supports the following integrations: ### Claude Code +#### Option 1: Anthropic Usage and Costs integration (recommended) + To monitor Claude Code with AI Agents Console, set up the [Anthropic Usage and Costs][4] integration. After setup, navigate to the [AI Agents Console][1] and click the **Claude Code** tile to view metrics. +#### Option 2: OpenTelemetry (OTLP) + +The following procedure configures Claude Code to send telemetry directly to Datadog with the OpenTelemetry protocol (OTLP). To send telemetry through the Datadog Agent instead, see [Forward data through the Datadog Agent](#via-dd-agent). + +1. Ensure that your [Logs configuration][6] includes a catch-all [index][7], or an index that covers `service:claude-code`. +2. Generate a [Datadog API key][8]. +3. Set the following environment variables in your Claude Code settings file (for example, `~/.claude/settings.json`): + + ```json + { + "env": { + "CLAUDE_CODE_ENABLE_TELEMETRY": "1", + "OTEL_LOGS_EXPORTER": "otlp", + "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL": "http/protobuf", + "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "{{< region-param key="http_endpoint_full" >}}/v1/logs", + "OTEL_METRICS_EXPORTER": "otlp", + "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf", + "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "{{< region-param key="otlp_metrics_endpoint" >}}", + "OTEL_EXPORTER_OTLP_HEADERS": "dd-api-key=" + } + } + ``` + + Replace `` with your Datadog API key. + +
To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system to distribute the Claude Code settings file across all managed devices.
+4. Restart Claude Code. + +{{% collapse-content title="Alternative setup: Forward data through the Datadog Agent" level="h4" expanded=false id="via-dd-agent" %}} +1. Ensure that your [Logs configuration][6] includes a catch-all [index][7], or an index that covers `service:claude-code`. +2. [Install the Datadog Agent][9]. +3. Configure your Datadog Agent to enable the OpenTelemetry Collector: + ```yaml + otlp_config: + receiver: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + logs: + enabled: true + otelCollector: + enabled: true + ``` +4. Set the following environment variables in your Claude Code settings file (for example, `~/.claude/settings.json`): + ```json + { + "env": { + "CLAUDE_CODE_ENABLE_TELEMETRY": "1", + "OTEL_METRICS_EXPORTER": "otlp", + "OTEL_LOGS_EXPORTER": "otlp", + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://127.0.0.1:4317", + "OTEL_EXPORTER_OTLP_PROTOCOL": "grpc", + "OTEL_METRIC_EXPORT_INTERVAL": "10000" + } + } + ``` + +
To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system to distribute the Claude Code settings file across all managed devices.
+5. Restart Claude Code. +{{% /collapse-content %}} + +After you restart Claude Code, navigate to the [AI Agents Console][1] in Datadog and click on the **Claude Code** tile. Metrics (usage, cost, latency, errors) should appear within a few minutes. + ### Cursor To monitor Cursor with AI Agents Console, set up the [Cursor][5] integration using the Datadog Extension for Cursor. @@ -50,3 +115,7 @@ After setup, navigate to the [AI Agents Console][1] and click the **Cursor** til [3]: https://www.cursor.com/ [4]: /integrations/anthropic-usage-and-costs/ [5]: /integrations/cursor/?tab=datadogextensionforcursor +[6]: /logs/log_configuration/ +[7]: /logs/log_configuration/indexes/ +[8]: https://app.datadoghq.com/organization-settings/api-keys +[9]: /agent/?tab=Host-based From e42de128c3ef126f2023b097ac63a2786c5f9cb4 Mon Sep 17 00:00:00 2001 From: Amber Tunnell Date: Fri, 10 Apr 2026 16:16:24 -0400 Subject: [PATCH 2/4] Move Datadog Agent setup to Option 3 in AI Agents Console page Co-Authored-By: Claude Sonnet 4.6 --- content/en/ai_agents_console/_index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/en/ai_agents_console/_index.md b/content/en/ai_agents_console/_index.md index 959e34d4e74..a682ef163f8 100644 --- a/content/en/ai_agents_console/_index.md +++ b/content/en/ai_agents_console/_index.md @@ -39,7 +39,7 @@ After setup, navigate to the [AI Agents Console][1] and click the **Claude Code* #### Option 2: OpenTelemetry (OTLP) -The following procedure configures Claude Code to send telemetry directly to Datadog with the OpenTelemetry protocol (OTLP). To send telemetry through the Datadog Agent instead, see [Forward data through the Datadog Agent](#via-dd-agent). +The following procedure configures Claude Code to send telemetry directly to Datadog with the OpenTelemetry protocol (OTLP). 1. Ensure that your [Logs configuration][6] includes a catch-all [index][7], or an index that covers `service:claude-code`. 2. Generate a [Datadog API key][8]. @@ -65,7 +65,10 @@ The following procedure configures Claude Code to send telemetry directly to Dat
To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system to distribute the Claude Code settings file across all managed devices.
4. Restart Claude Code. -{{% collapse-content title="Alternative setup: Forward data through the Datadog Agent" level="h4" expanded=false id="via-dd-agent" %}} +After you restart Claude Code, navigate to the [AI Agents Console][1] in Datadog and click on the **Claude Code** tile. Metrics (usage, cost, latency, errors) should appear within a few minutes. + +#### Option 3: Forward data through the Datadog Agent + 1. Ensure that your [Logs configuration][6] includes a catch-all [index][7], or an index that covers `service:claude-code`. 2. [Install the Datadog Agent][9]. 3. Configure your Datadog Agent to enable the OpenTelemetry Collector: @@ -96,9 +99,6 @@ The following procedure configures Claude Code to send telemetry directly to Dat
To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system to distribute the Claude Code settings file across all managed devices.
5. Restart Claude Code. -{{% /collapse-content %}} - -After you restart Claude Code, navigate to the [AI Agents Console][1] in Datadog and click on the **Claude Code** tile. Metrics (usage, cost, latency, errors) should appear within a few minutes. ### Cursor From 563b64a7915aa5c44a0be6e908e95d0204a86358 Mon Sep 17 00:00:00 2001 From: Amber Tunnell Date: Fri, 10 Apr 2026 16:33:10 -0400 Subject: [PATCH 3/4] Update AI Agents Console page with server-managed settings link, hardcoded OTLP endpoints, and verification steps Co-Authored-By: Claude Sonnet 4.6 --- content/en/ai_agents_console/_index.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content/en/ai_agents_console/_index.md b/content/en/ai_agents_console/_index.md index a682ef163f8..13780dfa795 100644 --- a/content/en/ai_agents_console/_index.md +++ b/content/en/ai_agents_console/_index.md @@ -51,10 +51,10 @@ The following procedure configures Claude Code to send telemetry directly to Dat "CLAUDE_CODE_ENABLE_TELEMETRY": "1", "OTEL_LOGS_EXPORTER": "otlp", "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL": "http/protobuf", - "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "{{< region-param key="http_endpoint_full" >}}/v1/logs", + "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "https://otlp.datadoghq.com/v1/logs", "OTEL_METRICS_EXPORTER": "otlp", "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf", - "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "{{< region-param key="otlp_metrics_endpoint" >}}", + "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://otlp.datadoghq.com/v1/metrics", "OTEL_EXPORTER_OTLP_HEADERS": "dd-api-key=" } } @@ -62,7 +62,7 @@ The following procedure configures Claude Code to send telemetry directly to Dat Replace `` with your Datadog API key. -
To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system to distribute the Claude Code settings file across all managed devices.
+
To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system or server-managed settings to distribute the Claude Code settings file across all managed devices.
4. Restart Claude Code. After you restart Claude Code, navigate to the [AI Agents Console][1] in Datadog and click on the **Claude Code** tile. Metrics (usage, cost, latency, errors) should appear within a few minutes. @@ -97,9 +97,11 @@ After you restart Claude Code, navigate to the [AI Agents Console][1] in Datadog } ``` -
To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system to distribute the Claude Code settings file across all managed devices.
+
To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system or server-managed settings to distribute the Claude Code settings file across all managed devices.
5. Restart Claude Code. +After you restart Claude Code, navigate to the [AI Agents Console][1] in Datadog and click on the **Claude Code** tile. Metrics (usage, cost, latency, errors) should appear within a few minutes. + ### Cursor To monitor Cursor with AI Agents Console, set up the [Cursor][5] integration using the Datadog Extension for Cursor. From d56d0abdec713c4b95c4ab5c57a399ad1f1f0b18 Mon Sep 17 00:00:00 2001 From: Amber Tunnell Date: Fri, 10 Apr 2026 16:36:52 -0400 Subject: [PATCH 4/4] Use region-param shortcodes for OTLP endpoints Co-Authored-By: Claude Sonnet 4.6 --- content/en/ai_agents_console/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/ai_agents_console/_index.md b/content/en/ai_agents_console/_index.md index 13780dfa795..821a14fbaa4 100644 --- a/content/en/ai_agents_console/_index.md +++ b/content/en/ai_agents_console/_index.md @@ -51,10 +51,10 @@ The following procedure configures Claude Code to send telemetry directly to Dat "CLAUDE_CODE_ENABLE_TELEMETRY": "1", "OTEL_LOGS_EXPORTER": "otlp", "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL": "http/protobuf", - "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "https://otlp.datadoghq.com/v1/logs", + "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "{{< region-param key="otlp_logs_endpoint" >}}", "OTEL_METRICS_EXPORTER": "otlp", "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf", - "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://otlp.datadoghq.com/v1/metrics", + "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "{{< region-param key="otlp_metrics_endpoint" >}}", "OTEL_EXPORTER_OTLP_HEADERS": "dd-api-key=" } }