> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/6.-build-wire-your-code/integration-pagerduty.md).

# PagerDuty escalation

Recipe — escalate critical evaluation regressions to PagerDuty by polling and forwarding.

The Stratix platform doesn't ship a PagerDuty webhook integration today. Customers route alerts by:

1. Running a scheduled job that calls the SDK's evaluation/trace-evaluation methods
2. Inspecting the result
3. Forwarding to PagerDuty's events API on failure

```python
import os, requests
from layerlens import Stratix
client = Stratix()

# Run your release-gate or continuous evaluation
evaluation = client.evaluations.get(EVAL_ID_TO_MONITOR)

if not evaluation.is_success or evaluation.accuracy < 0.95:
 requests.post(
 "https://events.pagerduty.com/v2/enqueue",
 json={
 "routing_key": os.environ["PD_ROUTING_KEY"],
 "event_action": "trigger",
 "payload": {
 "summary": f"Stratix evaluation regression: {evaluation.id}",
 "severity": "critical",
 "source": "stratix",
 "custom_details": {
 "evaluation_id": evaluation.id,
 "status": str(evaluation.status),
 "accuracy": evaluation.accuracy,
 },
 },
 },
 timeout=10,
 )
```

Wire from any scheduler (cron, GitHub Actions schedule, Lambda, k8s CronJob) — same pattern as [daily smoke eval](/9.-improve-tune-the-system/daily-smoke-eval.md).

## See also

* [Notifications](https://github.com/LayerLens/gitbook-full/blob/main/13-reference/sdk-python/notifications.md) — in-app and email notifications (platform-native)
* [Cookbook: daily smoke eval](/9.-improve-tune-the-system/daily-smoke-eval.md)
