# ErrorLens × PagerDuty — Starter Pack

> Escalate critical errors into incidents and trigger on-call rotations with full root cause context.

**Category:** Monitoring & APM
**Required plan:** Starter or higher

---

## 1. Before you start

Use an Events API v2 Integration Key (Service → Integrations → +Add an integration → Events API v2). The integration key, NOT a personal API key, is what ErrorLens needs.

## 2. Configuration fields

| Field | Type | Required | Example |
|-------|------|----------|---------|
| `apiKey` | password | yes | `u+…` |
| `serviceId` | text | yes | `PXXXXXX` |



### `config.json` template

Drop this into your config tooling (1Password, Doppler, Vault, ...) — ErrorLens
reads the same shape from your dashboard form.

```json
{
  "apiKey": "<your-apiKey>",
  "serviceId": "<your-serviceId>"
}
```

## 3. What ErrorLens sends

Once configured, ErrorLens POSTs the payload below to the integration the
moment an analysis completes. Use this to write tests for any forwarder /
transformer you wrap around the webhook.

```json
{
  "event": "analysis.completed",
  "analysisId": "7b2f1e9d-...-...-...-...",
  "title": "Production checkout 500s — Dec 1",
  "url": "https://app.errorlens.ai/dashboard/analysis/7b2f1e9d-...",
  "result": {
    "severity": "critical",
    "summary": "NullPointerException in PaymentService.process() during guest checkout.",
    "rootCause": "customer.getPaymentMethod() returns null because guest profiles do not initialize payment methods.",
    "suggestedFix": "Initialize a default payment method on the guest profile, or guard with a null-check in PaymentService.",
    "affectedServices": [
      "payment-svc",
      "order-svc"
    ],
    "occurrences": 148,
    "language": "Java",
    "framework": "Spring Boot"
  },
  "user": {
    "id": "usr_...",
    "email": "on-call@yourcompany.com",
    "plan": "pro"
  },
  "receivedAt": "1970-01-01T00:00:00.000Z"
}
```

## 4. Setting it up in ErrorLens

1. Sign in at https://app.errorlens.ai (or your self-hosted instance).
2. Go to **Dashboard → Integrations**.
3. Find **PagerDuty** in the catalog and click **Connect**.
4. Paste the values from your `config.json` into the form.
5. Hit **Save** — the first test event fires immediately.

## 5. Removing the integration

Disabling the integration from the same screen stops further events; it
does NOT revoke the token on the PagerDuty side. Rotate or delete the
credential in PagerDuty as well if you're decommissioning it.

---

_Generated by ErrorLens · 2026-05-11 ·
provider `pagerduty`_
