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

# Datadog

> Connect Datadog to pull metrics, logs, traces, alerts, and events during investigations.

Connecting Datadog lets Traversal use your logs, metrics, traces, and monitors during investigations so it can surface anomalies, correlate signals, and generate grounded root-cause explanations.

## What Traversal reads

* **Logs** — queried from your log indexes
* **Metrics** — time-series data and tag metadata
* **Spans / Traces** — APM span data
* **Incidents** — active and historical incident records
* **Events** — event stream data
* **Monitors** — monitor state and alert history
* **Dashboards** — dashboard panel definitions

## Setup

<Steps>
  <Step title="Create an API key">
    The API key identifies your Datadog organization. In Datadog, go to:

    **Organization Settings → API Keys → New Key**

    Name it (e.g. `traversal`) and copy the value — it won't be shown again.
  </Step>

  <Step title="Create an Application key">
    The application key authorizes API queries on behalf of a user. Go to:

    **Organization Settings → Application Keys → New Key**

    Name it (e.g. `traversal`) and copy the value — it won't be shown again.

    <Tabs>
      <Tab title="Unscoped key (simpler)">
        Create the application key under a **dedicated read-only Datadog user**.

        The key inherits that user's permissions — no explicit scopes needed. Traversal will have read-only access to everything that user can see.

        <Note>
          Recommended for most setups. Create a service user with the **Datadog Read Only Role** and generate the application key under that account.
        </Note>
      </Tab>

      <Tab title="Scoped key (more restrictive)">
        Create the application key under any user and add the following scopes explicitly:

        | Scope             | What it covers                  |
        | ----------------- | ------------------------------- |
        | `logs_read_data`  | Log queries                     |
        | `metrics_read`    | Metric time-series and tag data |
        | `apm_read`        | Spans and traces                |
        | `incident_read`   | Incident records                |
        | `events_read`     | Event stream                    |
        | `monitors_read`   | Monitor state and alerts        |
        | `dashboards_read` | Dashboard definitions           |

        <Note>
          Use this if your security policy requires explicit permission grants, or if the creating user has broader access you don't want to expose.
        </Note>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Find your API URL">
    Your API URL is based on your Datadog site. To find it, look at your browser URL when logged in to Datadog and match it below:

    | Browser URL         | API URL to use                  |
    | ------------------- | ------------------------------- |
    | `app.datadoghq.com` | `https://api.datadoghq.com`     |
    | `us3.datadoghq.com` | `https://api.us3.datadoghq.com` |
    | `us5.datadoghq.com` | `https://api.us5.datadoghq.com` |
    | `app.datadoghq.eu`  | `https://api.datadoghq.eu`      |
    | `ap1.datadoghq.com` | `https://api.ap1.datadoghq.com` |
    | `ap2.datadoghq.com` | `https://api.ap2.datadoghq.com` |
    | `app.ddog-gov.com`  | `https://api.ddog-gov.com`      |
  </Step>

  <Step title="Configure in Traversal">
    Go to **Company Knowledge → Integrations**, select **Datadog**, and enter:

    * Datadog API URL
    * API key
    * Application key
  </Step>
</Steps>

## More information

* [Datadog API and Application keys](https://docs.datadoghq.com/account_management/api-app-keys/)
* [Datadog OAuth scopes](https://docs.datadoghq.com/api/latest/scopes/)
* [Datadog site URLs](https://docs.datadoghq.com/getting_started/site/)
