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

# Datadog

> Connect Datadog with an API key and an application key so OPTIMAZE can import estimated and final costs.

Connect Datadog to OPTIMAZE with an API key, an application key and your Datadog site. OPTIMAZE imports estimated and final costs by product for the parent organisation and its child organisations.

> [!NOTE]
>
> Datadog is in beta. The tile on the **Integrations** page is marked **Beta**.

## Prerequisites

* Access to the Datadog parent organisation.
* A Datadog user with the `usage_read` and `billing_read` permissions, to own the application key.

## Set up the Datadog integration

**1. Create an API key and an application key in Datadog**

1. In Datadog, open **Organization Settings** and create an API key.
2. Create an application key owned by a user who has the `usage_read` and `billing_read` permissions.
3. Create both keys in the parent organisation, so costs cover the parent and its child organisations.

**2. Enter the details in OPTIMAZE**

Under **Data**, select **Integrations**. On the **Datadog** tile, select **Connect**, then fill in the form.

| Field | What to enter |
| :- | :- |
| **API key** | The Datadog API key |
| **Application key** | The Datadog application key |
| **Datadog site** | The domain you sign in to Datadog on, for example `datadoghq.com` or `datadoghq.eu` |
| **Display name (optional)** | A name to tell this connection apart from others |

**3. Connect**

Select **Connect**.

## What happens next

When you select **Connect**, OPTIMAZE runs a connection check before it starts importing. Each part of the check shows as passed, failed or not checked, and a later part is not checked when an earlier one fails.

| Check | What it confirms |
| :- | :- |
| **Authentication** | The credentials were accepted |
| **Access** | The credentials can read billing and usage data |
| **Required objects** | Anything you had to create in your own account exists. Not checked for providers that need nothing beyond credentials |
| **Data available** | There is cost data to import |

Once the check passes, the integration appears under **Connected** on the **Integrations** page. OPTIMAZE imports the previous six months of history on the first sync, and each later sync re-reads the last three days to pick up late changes.

Datadog reports estimated costs for the current and previous month and final costs once a month closes. OPTIMAZE replaces an estimate with the final figure when it arrives, so recent months can move until Datadog finalises them.

## Troubleshooting

* **Authentication** fails: a key is wrong or revoked, or **Datadog site** does not match where you sign in.
* **Access** fails: the application key's owner is missing `usage_read` or `billing_read`, or the keys were created in a child organisation.
* **Recent months differ from the invoice**: those months are still estimates. They change to final cost once Datadog closes the month.
* **Data available** fails: Datadog has no cost data for the period yet. Wait for Datadog to report usage, then connect again.


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