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

# Datadog

> Connect Datadog, verify a log search, and fix credential or permission problems. Optionally let agents read feature flags.

Connect Datadog so the agent can search application logs while investigating a support issue. You can also let it read feature flag configuration.

## Before You Connect

You'll need an organization admin account in Decimal, plus a Datadog **API key** and **Application key** for the organization whose logs you want to query. Create the keys in Datadog's **Organization Settings**; its [key guide](https://docs.datadoghq.com/account_management/api-app-keys/) covers creation and scoping.

Give the application key these log permissions:

| Permission | What It Allows |
| - | - |
| `logs_read_data` | Read log data, subject to Datadog's restriction queries |
| `logs_read_index_data` | Read log data from the indexes the key's owner can access |

The key's owner must also have access to the logs you need. Check Datadog's [permissions reference](https://docs.datadoghq.com/account_management/rbac/permissions/#log-management) if a scoped key still can't read them.

## Connect Datadog

1. Open **Settings → Integrations → Datadog** in Decimal.
2. Enter the **API key** and **Application key**.
3. Select the **Site** where your Datadog organization lives. Match the region you use to sign in; don't leave **US1** selected if your organization is elsewhere.
4. Click **Connect**. Decimal tests a log search before saving the connection.
5. Check that **Status** reads **Connected** and that **Site** matches your organization.

The connection test can succeed with no matching logs. Use a known log entry to check that the agent can find the data you need.

## Verify a Log Search

Open Datadog's Log Explorer and find a recent log entry you can recognize. Note a distinctive message or request ID, the time range, and the index if you use more than one.

In [Playground](/playground/overview), ask for that entry. Replace the placeholders with your own values:

> Search Datadog logs for "REQUEST\_ID" between START\_TIME and END\_TIME in UTC, using index INDEX\_NAME. Show the matching entries and the Log Explorer link.

Compare the returned entries with Datadog. Open the Log Explorer link to check the query and time range. If the result is empty, use the same search in Datadog before changing permissions.

For a support-ticket investigation that doesn't query logs, check **Logs Investigation** under the Support Agent's [capabilities](/agents/investigation#capabilities), if that section is available in your workspace.

## Let Agents Read Feature Flags

Add `feature_flag_config_read` and `feature_flag_environment_config_read` to the application key if you want the agent to inspect feature flag configuration. These permissions are separate from log access; Datadog's [flag permissions](https://docs.datadoghq.com/account_management/rbac/permissions/#feature-flags) describe them.

On the connected Datadog page in Decimal, turn on **Let agents read feature flags** under **Feature flags**. Decimal checks access before saving the setting. If the switch won't stay on, check both scopes and try again.

Then ask in Playground: "Find the Datadog feature flag FLAG\_KEY and show its configuration for ENVIRONMENT." Use a flag and environment you can compare with Datadog.

## Troubleshoot the Connection

| What You See | What to Check |
| - | - |
| **Connect** is unavailable | Fill in both key fields and select a site. |
| An authentication error when connecting | Check the selected site, both keys, and the application's log scopes. Confirm that the key's owner can read the required logs. |
| **Connected**, but no matching logs | Compare the query, index, and time range with Log Explorer. Check whether Datadog restricts the key's owner to particular logs or indexes. |
| Log searches stopped working | Check whether either key was revoked or the application key's owner was disabled. Datadog revokes a user's application keys when their account is disabled. |
| Feature flags won't turn on | Check both feature flag scopes, then try **Let agents read feature flags** again. A working log connection doesn't verify feature flag access. |

After correcting the problem, repeat the known-log search or feature flag lookup above. If it still fails, [email us](mailto:support@getdecimal.ai) with the site, error text, time range, and the Decimal conversation or ticket URL. Leave keys out of the message.

## Replace Keys or Disconnect

Prepare replacement keys before disconnecting. On the Datadog page in Decimal, click **Disconnect** and confirm, then enter the replacement keys, select the same site, and click **Connect**. Check the **Let agents read feature flags** setting again and repeat your verification search.

Disconnecting removes the connection from Decimal. To revoke the keys themselves, use Datadog's [key settings](https://docs.datadoghq.com/account_management/api-app-keys/).


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