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

# Datadog as a data source

> Bring data from Datadog to Nekt.

Datadog is a monitoring and analytics platform for cloud-scale applications, providing monitoring of servers, databases, tools, and services through a SaaS-based data analytics platform. It offers comprehensive logging, metrics, and tracing capabilities to help organizations monitor their infrastructure and applications in real-time.

<img height="50" src="https://mintcdn.com/nekt/3MFKt2g7jzqFpztO/assets/logo/logo-datadog.jpeg?fit=max&auto=format&n=3MFKt2g7jzqFpztO&q=85&s=c7a77e7bec2fc69ae870b641265d53c4" data-path="assets/logo/logo-datadog.jpeg" />

## Configuring Datadog as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the Datadog option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

You'll need to provide API credentials from your Datadog account to authenticate the connection.

The following configurations are available:

* **API Key**: The API key to authenticate against the API service. You can find this in your Datadog account under Organization Settings > API Keys. Check [Datadog's documentation](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys) for more details.

* **App Key**: The application key to authenticate against the API service. You can find this in your Datadog account under Organization Settings > Application Keys. Check [Datadog's documentation](https://docs.datadoghq.com/account_management/api-app-keys/#application-keys) for more details.

* **Start Date**: The earliest record date to sync. This will be the earliest date for which log data will be retrieved.

* **Query** (optional): The query to search for logs. If not provided, all logs will be retrieved. You can use Datadog's query syntax to filter by service, host, tags, or any other attributes.

Once you're done, click **Next**.

### 2. Select streams

Choose which data streams you want to sync. The Datadog connector exposes a single stream: **logs**.

Select the stream and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.

* **Layer**: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
* **Folder**: a folder can be created inside the selected layer to group all tables being created from this new data source.
* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** to all tables at once and make this process faster!
* **Sync Type**: you can choose between INCREMENTAL and FULL\_TABLE.
  * Incremental: every time the extraction happens, we'll get only the new data - which is good if, for example, you want to keep every record ever fetched.
  * Full table: every time the extraction happens, we'll get the current state of the data - which is good if, for example, you don't want to have deleted data in your catalog.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

Optionally, you can define some additional settings:

* Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource [here](https://docs.nekt.com/get-started/core-concepts/resource-control).
* Determine when to execute an **Additional [Full Sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync)**. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

<Warning>For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.</Warning>

# Streams and Fields

Below you'll find the available data stream from Datadog and its corresponding fields:

<AccordionGroup>
  <Accordion title="Logs">
    Stream for retrieving log events from Datadog with their associated metadata and attributes.

    | Field        | Type   | Description                                                                                   |
    | ------------ | ------ | --------------------------------------------------------------------------------------------- |
    | `id`         | String | Unique identifier for each log event                                                          |
    | `timestamp`  | String | When the log event occurred                                                                   |
    | `type`       | String | Type of log event                                                                             |
    | `attributes` | Object | Additional log metadata including host, service, message, status, tags, and custom attributes |

    **Attributes Object Contains:**

    * `host` - The host where the log originated
    * `service` - The service name
    * `message` - The log message content
    * `status` - Status of the log event
    * `tags` - Array of tags associated with the log
    * `attributes` - Array of custom attributes with key-value pairs
    * `timestamp` - Timestamp within the attributes object

    **Primary Key:** `id`
    **Replication Key:** `timestamp`
  </Accordion>
</AccordionGroup>

# Data Model

The following diagram shows the structure of the Datadog logs stream:

```mermaid theme={null}
erDiagram
    LOGS {
        string id PK
        string timestamp
        string type
        object attributes
    }
```

# Implementation Notes

### Data Quality Considerations

* The logs stream uses `timestamp` as the replication key for incremental syncs
* All log attributes are nested within the `attributes` object
* Custom log attributes and tags provide additional context for filtering and analysis

### API Limits & Performance

* Use the optional `query` parameter to filter logs and reduce extraction time
* Consider the volume of logs when setting extraction frequency
* Datadog's API has rate limits that the connector respects automatically

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

<Card title="Download Datadog skills file" icon="wand-magic-sparkles" href="/sources/datadog.md">
  Datadog connector documentation as plain markdown, for use in AI agent contexts.
</Card>
