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

# Datadog Source

> Configure the Datadog source in Sawmills to receive logs and metrics from the Datadog Agent via HTTP intake endpoints. Traces are not supported.

## Supported Data Types

📘 **Logs** | 📈 **Metrics**

<Note>Traces are **not** supported through the Datadog source. Traces must be sent directly to Datadog. See the [Datadog Agent Configuration guide](/docs/send-data-from-datadog-agent#traces-bypass-configuration) for details.</Note>

## Supported Metric Types

The Datadog source accepts standard Datadog metric series types:

| Metric Type | Description                                                 |
| :---------- | :---------------------------------------------------------- |
| Gauge       | Represents the current value of a metric at a point in time |
| Count       | Tracks the number of events over a flush interval           |
| Rate        | Tracks the per-second rate of events over a flush interval  |
| Histogram   | Agent-side aggregated percentiles, averages, and counts     |

<Warning>
  The Datadog distributions endpoint `/api/v1/distribution_points` is not currently supported.
</Warning>

## Supported Ingestion Paths

The Datadog source accepts Datadog HTTP intake requests directly. You can send Datadog metrics payloads to the Sawmills Collector without running a Datadog Agent.

Supported metrics endpoints:

* `/api/v1/series`
* `/api/v2/series`
* `/api/v1/check_run`
* `/api/v1/sketches`
* `/api/beta/sketches`

This means you can either:

* send Datadog HTTP metrics payloads directly to the Sawmills Collector from your own service or job
* configure a Datadog Agent to send metrics to the Sawmills Collector

For Datadog Agent configuration, see [How to send data from Datadog agent](/docs/send-data-from-datadog-agent).

### Direct API Example

```bash theme={null}
curl -X POST http://<collector-host>:8126/api/v2/series \
  -H 'Content-Type: application/json' \
  -d '{
    "series": [{
      "metric": "example.metric",
      "type": 3,
      "points": [{"timestamp": 1710000000, "value": 1.0}],
      "resources": [{"name": "example-host", "type": "host"}],
      "tags": ["env:test"]
    }]
  }'
```

## Configuration

| Name            | Type   | Default            | Required | Description                                                                              |
| :-------------- | :----- | :----------------- | :------- | :--------------------------------------------------------------------------------------- |
| Name            | String | none               | true     | Unique identifier within Sawmills                                                        |
| Logs Address    | String | `${env:MY_POD_IP}` | true     | Address the Datadog source should listen to for logs                                     |
| Logs Port       | Int    | 10518              | true     | Port the Datadog source should listen to for logs                                        |
| Metrics Address | String | `${env:MY_POD_IP}` | true     | Address to which the Datadog Metrics source should bind. Defaults to `${env:MY_POD_IP}`. |
| Metrics Port    | Int    | 8126               | true     | Port to which the Datadog Metrics source should bind.                                    |

<Note>The pod’s IP address is retrieved by defining an environment variable `MY_POD_IP` from the pod’s status field `status.podIP`. You can access this value using `${env:MY_POD_IP}` in your configuration to dynamically reference the pod’s IP at runtime.</Note>

For instructions on configuring the Datadog agent to send data to this source, see [How to send data from Datadog agent](/docs/send-data-from-datadog-agent).
