# Datadog Audit Log Export

PropelAuth's [Datadog](https://www.datadoghq.com/) integration allows you to send [Audit Logs](https://docs.propelauth.com/overview/user-management/audit-logs) about your users and organizations to your Datadog instance.

## [Set Up](https://docs.propelauth.com/integrations/datadog#set-up)

Start by navigating to the **Integrations** page in your PropelAuth Dashboard and selecting **Datadog** in the integrations list. Then, click on **Add New Export Location**.

Set your **Datadog Site** and Datadog **API Key**. You can find the **Datadog Site** in your Datadog URL.

To create an API Key, hover over your avatar in the bottom left corner of your Datadog instance and click **API Keys**.

Create and name your API Key. Then, paste it into the **API Key** field in PropelAuth.

## [Choosing Event Filters](https://docs.propelauth.com/integrations/datadog#choosing-event-filters)

There are two main types of events in PropelAuth - User events and Org events. You can find a full list of these events in the [Audit Log documentation](https://docs.propelauth.com/overview/user-management/audit-logs).

By default, all User events and Org events will be sent to your Datadog instance. However, you can also choose to filter down to only include certain events.

## [Event Format](https://docs.propelauth.com/integrations/datadog#event-format)

Once setup, PropelAuth will send a log in JSON format to your Datadog logs. Here is an example of what this can look like:

```json
{
    "caused_by_id": "cd7c3...",
    "caused_by_metadata": {
        "email": "example@propelauth.com"
    },
    "caused_by_source_ip": "1.1.1.1",
    "caused_by_type": "Employee",
    "caused_by_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
    "created_at": 1745606428,
    "event_data": {
        "UserCreated": {
            "email": "example_user@propelauth.com",
            "email_confirmed": true
        }
    },
    "event_type": "UserCreated",
    "hostname": "auth.your-app.com",
    "id": "92070...",
    "service": "propelauth",
    "user_email": "example_user@propelauth.com",
    "user_id": "fad3e6..."
}
```
