> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Datadog

> Datadog logs, monitors, metrics, dashboards, and APM traces.

Connect Datadog so Struct Agent can query logs, metrics, traces and monitoring context. Check the permissions needed for the requested job; monitor changes require the corresponding write access.

## Inspect access and existing connections

Use a claimed workspace with permission to configure connections.

```bash theme={null}
struct whoami --json
struct connections catalog datadog --json
struct connections list --json
```

Use the catalog's current fields, choices and permission requirements. Reuse an existing healthy connection instead of creating a duplicate.

## Connect with the CLI

Supply credentials from approved secret storage through `DATADOG_API_KEY`, `DATADOG_APP_KEY`. The catalog describes which are needed for the selected authentication method. Do not put literal secrets in shell arguments or chat.

Replace example values with the intended resource:

```bash theme={null}
struct connect datadog --site us1
```

Choose the correct site, for example `--site us5`. A 403 for metrics while logs work can indicate missing `timeseries_query`. Check the permission report rather than granting a broad role blindly.

## Verify and recover

Use the returned connection ID:

```bash theme={null}
struct connections show CONNECTION_ID --json
struct connections test CONNECTION_ID --json
```

Inspect `ok`, `health` and missing permissions, not only the exit code. `struct connections grant-command CONNECTION_ID` prints repair instructions where supported; have an authorized operator apply them. For expired OAuth links, start the connection command again and use the new link. Do not reconnect to a different account silently.

Verify a bounded operation for the requested job. Connection health proves checked access; it does not prove telemetry arrival, an investigation or alert delivery.

## What Struct reads

Metrics, monitors and their history, APM traces by trace ID, logs, dashboards, and events such as deploys and config changes.

## What Struct writes

With Auto Monitors on, Struct creates and maintains its own monitors, plus one webhook that sends their alerts back to Struct.

## Permissions

The application key's role needs these scopes: `monitors_read`, `integrations_read`, `metrics_read`, `timeseries_query`, `logs_read_data`, `apm_read`, `apm_service_catalog_read`, `dashboards_read`, `events_read`, `slos_read`. Auto Monitors also needs `monitors_write`, `create_webhooks`, `manage_integrations`.

### Telemetry and monitor reads

Read logs, metrics, APM traces, dashboards and existing monitors.

| Scope | Used for |
| - | - |
| `monitors_read` | Monitors and alert state, and validating monitor definitions |
| `integrations_read` | Checking the webhook that delivers alerts to Struct (Auto Monitors) |
| `metrics_read` | Metric metadata |
| `timeseries_query` | Metric values |
| `logs_read_data` | Reading logs |
| `apm_read` | APM traces |
| `apm_service_catalog_read` | Service definitions, used to find your services and check access |
| `dashboards_read` | Dashboards |
| `events_read` | Charting event monitors (Auto Monitors) |
| `slos_read` | Charting SLO monitors (Auto Monitors) |

### Manage monitoring

Create and maintain the monitors Struct manages and the webhook that sends their alerts to Struct.

| Scope | Used for |
| - | - |
| `monitors_write` | Creating, updating and deleting the monitors Struct manages |
| `create_webhooks` | Creating the webhook that delivers alerts to Struct |
| `manage_integrations` | Repairing that webhook if it changes |

* Datadog checks permissions on the application key's role, not the API key. A missing scope shows up as `403 Forbidden` from the matching endpoint.

### How to grant

**Give the application key's role these scopes.** Open [https://app.datadoghq.com/organization-settings/application-keys](https://app.datadoghq.com/organization-settings/application-keys), select the application key Struct uses, and give its role these scopes: monitors\_read, monitors\_write, integrations\_read, create\_webhooks, manage\_integrations, metrics\_read, timeseries\_query, logs\_read\_data, apm\_read, apm\_service\_catalog\_read, dashboards\_read, events\_read, slos\_read.

Permission catalog version `2026-11-04.1`. See [permission changes](https://docs.struct.ai/reference/permission-changes.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.