# Configuration Reference

`ObanSentinel.Plugin` is configured in the `plugins:` list of an Oban instance.
All durations are milliseconds. Prefer the explicit `*_ms` names in new
configuration; `:lookback` and `:cooldown` remain compatibility aliases.

| Option | Default | Description |
| --- | --- | --- |
| `:window_ms` | 5 minutes | Rolling outcome and duration window. |
| `:failure_threshold` | `0.25` | Failure ratio required to open a circuit. |
| `:minimum_samples` | `20` | Minimum outcomes before evaluation. |
| `:cooldown_ms` | 5 minutes | Time an open circuit stays open. |
| `:recovery_check_interval_ms` | 30 seconds | Plugin recovery polling interval. |
| `:action` | `:pause_queue` | `:pause_queue` or `:emit_only`. |
| `:auto_recover` | `true` | Whether due circuits are automatically closed. |
| `:max_samples_per_worker` | `10_000` | Maximum outcomes, starts, and durations retained per worker. |
| `:policies` | `%{}` | Per-worker overrides keyed by Oban worker name strings. |
| `:notifier` | `nil` | Module implementing `ObanSentinel.Notifier`. |
| `:notifier_opts` | `[]` | Options passed to `notify/3`. |

## Worker policy fields

Each policy may override `:failure_threshold`, `:minimum_samples`,
`:cooldown_ms`, `:action`, and `:auto_recover`. It inherits all omitted values
from plugin-level configuration.

## Webhooks

The built-in notifier accepts `:url` and, for tests or custom HTTP adapters,
`:client`. The client must provide `post(url, options)` and return either
`{:ok, %{status: integer()}}` or `{:error, reason}`. Successful responses are
limited to status codes 200 through 299.
