# Incident

Something broke or degraded, and someone should look.

Pattern: `incident.*` (this page) · Written with: [`log()`](https://www.prongs.dev/docs/profiles/logs.md) · Intents: [2](#intents) · Levels: `error` `warn`

## Intents

| Intent | Status | Use it for |
|---|---|---|
| [`incident.failed`](https://www.prongs.dev/docs/intents/incident/failed.md) | `error` | Something broke and someone should look: a request, a job, a dependency |
| [`incident.degraded`](https://www.prongs.dev/docs/intents/incident/degraded.md) | `warn` | It worked, but worse than it should: a fallback, a retry, a slow dependency |

## Recording one

Name what happened. The intent sets the level and whether it alerts.

```ts
// Something broke and someone should look: a request, a job, a dependency
log('incident.failed', 'Feed refresh stopped', { source: 'npr', attempt: 3 });

// It worked, but worse than it should: a fallback, a retry, a slow dependency
log('incident.degraded', 'Search fell back to the cached index', { tookMs: 4200 });
```

Writes (incident.failed)

```ts
{
  "intent": "incident.failed",
  "level": "error",
  "alert": true,
  "message": "Feed refresh stopped",
  "data": {
    "source": "npr",
    "attempt": 3
  },
  "time": "2026-10-09T12:00:00.000Z"
}
```

## Is it an incident entry?

Find the row that describes your case, and use the domain on the right.

| If the problem is | Use |
|---|---|
| Who did what, kept as a record: things created, changed, deleted, and changes to access. | [`audit.*`](https://www.prongs.dev/docs/intents/audit.md) |
| Signals worth watching: failed sign-ins, bad tokens, rate limits, probing. | [`security.*`](https://www.prongs.dev/docs/intents/security.md) |
| Something broke or degraded, and someone should look. | `incident.*` (this page) |
| Background work: syncs, backups, migrations, scheduled runs. | [`job.*`](https://www.prongs.dev/docs/intents/job.md) |
| Detail for working on the code, dropped in production. | [`debug.*`](https://www.prongs.dev/docs/intents/debug.md) |

## For registry authors

**Starter intents.** These are the intents `prongs add logs` puts in your registry. Change levels through the [`level.*`](https://www.prongs.dev/docs/intents/logs.md#level) intents, and point [`log()`](https://www.prongs.dev/docs/profiles/logs.md) at your logger.
