Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions content/en/ai_agents_console/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,77 @@

### Claude Code

#### Option 1: Anthropic Usage and Costs integration (recommended)

Check warning on line 34 in content/en/ai_agents_console/_index.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.headings

'Option 1: Anthropic Usage and Costs integration (recommended)' should use sentence-style capitalization.

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)

Check warning on line 40 in content/en/ai_agents_console/_index.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.headings

'Option 2: OpenTelemetry (OTLP)' should use sentence-style capitalization.

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`.

Check warning on line 44 in content/en/ai_agents_console/_index.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_insensitive

Use 'helps' or 'helps ensure' instead of 'Ensure'.
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="otlp_logs_endpoint" >}}",
"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=<DATADOG_API_KEY>"
}
}
```

Replace `<DATADOG_API_KEY>` with your Datadog API key.

<div class="alert alert-info">To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system or <a href="https://code.claude.com/docs/en/server-managed-settings">server-managed settings</a> to distribute the Claude Code settings file across all managed devices.</div>

Check notice on line 65 in content/en/ai_agents_console/_index.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.
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.

#### 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`.

Check warning on line 72 in content/en/ai_agents_console/_index.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_insensitive

Use 'helps' or 'helps ensure' instead of 'Ensure'.
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"
}
}
```

<div class="alert alert-info">To set up AI Agents Console for Claude Code across your organization, your IT team can use a Mobile Device Management (MDM) system or <a href="https://code.claude.com/docs/en/server-managed-settings">server-managed settings</a> to distribute the Claude Code settings file across all managed devices.</div>

Check notice on line 100 in content/en/ai_agents_console/_index.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.
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.
Expand All @@ -50,3 +117,7 @@
[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
Loading