Skip to main content

PagerDuty Webhooks Review

PagerDuty is a critical tool that helps engineering and devops teams manage their incident response. Automating responses to incidents is a great use case for webhooks.

An important thing to note about PagerDuty’s webhooks is that they’re on version 3. According to PagerDuty’s webhook docs, V1 webhook extensions became unsupported in November 2021 and lost functionality on October 31, 2022. V2 webhooks reached end-of-support on October 31, 2022, and no end-of-life date has been set for them.

We’ll strictly be covering their current version 3 of webhooks.

When we look at webhook solutions, we’re generally looking for 7 things: signature verification, retries, manual retries, exponential backoff, visibility/logs, event types, and multiple endpoint support. For signature verification, our reference point is the Standard Webhooks specification, which defines the standard headers and signing scheme.

TL;DR:
✅ Signature Verification
✅ Retries
⬜ Exponential Backoff
⬜ Manual Retries
✅ Visibility into Logs
✅ Event Types
✅ Multiple Endpoints Support

Signature Verification ✅​

Signature Verification is a critical security feature of webhooks. It lets users verify that a webhook was actually sent from the expected source.

V3 of Webhooks include a signature in the request header. Each delivery carries an X-PagerDuty-Signature header whose v1= value is an HMAC of the payload body using SHA-256, computed with a secret that PagerDuty generates when the subscription is created. The header can hold more than one signature, so a secret can be rotated without downtime. They’ve also emphasized how important it is for their users to verify the messages and written up an explanation of how to do it with example code. pagerduty verification example

Retries ✅​

Webhook messages often fail. Without retries, users may miss many notifications which results in a bad user experience.

PagerDuty’s webhook behavior docs say a failed webhook is retried periodically for up to 48 hours. After that the delivery is considered a failure and the webhook is dropped. Timeouts, 5xx and 429 responses, and connection or DNS errors are retried. Any other 4xx response is treated as permanent and dropped without a retry. PagerDuty expects a 2xx response within 5 seconds for generic webhooks.

Two days is enough time to notice a failing endpoint and fix it, which is a big improvement over the 20-minute window we found when we first reviewed PagerDuty. One thing to watch: after 3 consecutive webhooks are dropped, the subscription is disabled for 24 hours and anything queued for it is dropped too. You can re-enable it from the subscription’s settings page or through the API.

Looking to send webhooks at scale?

Schedule a Call

Exponential Backoff​

Exponential backoff is an algorithm that increases the delay between retries exponentially. This ensures that your system won’t get bottleneck from having to re-queue failed webhooks while also giving users time to fix broken endpoints before they burn through all their retry attempts.

PagerDuty’s docs say retries happen periodically over the 48 hours, but they don’t publish the interval between attempts or say whether it grows. Without a documented schedule we can’t give this a checkmark.

Manual Retries​

In the event that a user’s endpoint is failing, its nice to give the developer tasked with debugging the endpoint, the option to initiate a retry manually instead of having to wait for the next scheduled retry (this could be several hours of waiting if they’re close to the end of the retry schedule).

We could not find any mention of resending a failed delivery manually. A subscription does have a Send Test Event button, but that sends a test event, not a replay of the delivery that failed.

Visibility into Logs ✅​

Giving users visibility into the delivery logs is critical for troubleshooting/debugging.

Each webhook subscription now has a Recent Attempts tab that shows the request PagerDuty sent, with headers and body, and each response from your endpoint with its status code and time. Delivery attempts are available for 30 days after the first attempt. The tab is available on all paid plans.

Event Types ✅​

Event types are identifiers denoting the type of message being sent and are the primary way for webhook consumers to configure what events they are interested in receiving.

PagerDuty lists the available event types, covering incidents and services, in its webhook docs. Each subscription selects the event types it wants to receive, so different endpoints can get different events.

Multiple Endpoint Support ✅​

Many webhook solutions only allow one endpoint URL to be specified where all messages will be received. By enabling your users to create multiple endpoints, they’ll be able to choose which endpoints receive which messages. Multiple endpoint support and event types go hand in hand.

PagerDuty’s “Create a webhook subscription” endpoint allows users to create new subscriptions with different endpoints by specifying a URL. You can create up to 10 webhook subscriptions per service or team, and the same again at the account level.

Summary​

PagerDuty’s webhooks have improved a lot since we first reviewed them. A 48-hour retry window and 30 days of delivery attempts close the two biggest gaps we found, and we still appreciate that they go the extra mile to explain how to verify signatures. What’s still missing is a published retry schedule and a way to resend a failed delivery yourself.

If you’re looking to implement world class webhooks, consider trying Svix, our webhooks as a service product that makes it super easy to build a secure, reliable, and scalable webhook solution through an API.