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

# Datadog Integration

> Connect your Datadog account to Corelayer to monitor logs, services, and metrics with intelligent debugging.

## Prerequisites

* A Datadog account with log indexing and metrics enabled
* Permissions to create API keys and Application keys in Datadog

## Step-by-Step Setup

### 1. Navigate to Integrations

In your Corelayer dashboard, go to the **Integrations** page.

### 2. Add Datadog Integration

Click the **Add Integration** button and select **Datadog** from the list of available integrations.

### 3. Enter Organization Details

Provide the following:

* **Organization Name** — Your Datadog organization name
* **App URL** — Your Datadog application URL (e.g., `https://app.datadoghq.com`)

### 4. Create an API Key

In your Datadog account:

1. Go to **Organization Settings > API Keys**
2. Click **New Key**
3. Name the key (e.g., `Corelayer`)
4. Copy the key and paste it into the Corelayer setup form

### 5. Create an Application Key

In your Datadog account:

1. Go to **Organization Settings > Application Keys**
2. Click **New Key**
3. Name the key (e.g., `Corelayer`)
4. Ensure the key has the following scopes:
   * `logs_read_data`
   * `logs_read_index_data`
   * `logs_read_config`
   * `metrics_read`
5. Copy the key and paste it into the Corelayer setup form

### 6. Test Connection

Click **Test Connection** to verify that Corelayer can access your Datadog account.

### 7. Select Resources

Once connected, choose which resources to monitor:

* **Log Services** — Select the services whose logs Corelayer should analyze
* **Log Indexes** — Choose which log indexes to query
* **Metrics** — Select metrics relevant to your services

### 8. Add Datadog Resources to Your Service Maps

When configuring your Corelayer Service Maps, select which Datadog services and metrics are relevant to each service.

## What Corelayer Can Do With Datadog

Once connected, Corelayer will:

* Query logs from your selected services and indexes to gather context during debugging
* Monitor metrics for anomalies and correlate with error events
* Combine Datadog observability data with other integrations for comprehensive root-cause analysis

## Managing Your Integration

### Disconnecting

To disconnect your Datadog integration:

1. Navigate to Settings > Integrations
2. Find your Datadog integration and click **Uninstall**
3. Confirm the uninstallation
4. Optionally, revoke the API and Application keys in your Datadog account

## Troubleshooting

### Integration Not Working?

* Verify your API key and Application key are correct
* Ensure the Application key has the required scopes (`logs_read_data`, `logs_read_index_data`, `logs_read_config`, `metrics_read`)
* Check that your Datadog App URL matches your region
* Confirm that the services and indexes you selected are active and receiving data

Need help? [Contact support](mailto:support@corelayer.com) for assistance with your Datadog integration.
