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

# Datadog Logs

> Stream Policy Gateway events to Datadog Logs via the intake API.

Stream Policy Gateway policy events to Datadog via the Logs intake API.

## Configure

In the console, add a connector with:

| Field   | Value                                                      |
| ------- | ---------------------------------------------------------- |
| Type    | Datadog Logs                                               |
| Site    | `datadoghq.com`, `datadoghq.eu`, `us3.datadoghq.com`, etc. |
| API key | Your Datadog API key                                       |
| Service | e.g. `abliteration`                                        |
| Tags    | e.g. `env:prod,team:platform`                              |

## Event shape

Events hit `https://http-intake.logs.<site>/api/v2/logs` as JSON:

```json theme={"system"}
{
  "ddsource": "abliteration",
  "service": "abliteration",
  "ddtags": "env:prod",
  "event_id": "3d14a2b8-...",
  "event_type": "enforcement",
  "policy_id": "support-bot",
  "decision": "refuse",
  "effective_decision": "allow",
  "enforced": false,
  "rollout_mode": "shadow",
  "reason_code": "REFUSE",
  "policy_target": "chat.completions",
  "project_id": "proj_support_bot",
  "model": "abliterated-model",
  "triggered_categories": []
}
```

## Verify

In Datadog Logs Explorer:

```text theme={"system"}
service:abliteration @decision:refuse @enforced:true
```

## Build a monitor

Alert on sustained deny rate:

```text theme={"system"}
logs("service:abliteration @decision:refuse @enforced:true").rollup("count").last("5m") > 50
```

See the full field list in [connectors](/policy-gateway/connectors).
