Monitoring webhooks
When webhooks are configured, they often make up a core part of the user flows. Webhook failures are not meaningful to a user, so webhook failures are recorded, but not returned to the user when they occur. To view webhook failures, the webhooks stats APIs must be retrieved.
The webhook stats APIs make it possible to get a detailed breakdown of a webhooks usage. The usability of these statistics is broad.
Monitoring the statistics can help with the following tasks.
- Detecting and remediating failures on specific URLs.
- Monitoring latency between Verify and the configured webhook endpoints
When failures are detected, the webhook request ID of the failure is recorded along with the
error the that webhooks engine generated. This error message, along with the request ID should can
be used to correlate with the request logs on the external system to triage and resolve the
failure.
Note: Statistics are flushed periodically, and can change as frequently as every five
seconds.
Health at a glance
A health API also exists, which uses the details of the statistics to offer a simplified view of webhook health.
This API returns one of the following values.
no-data
- No statistical information is available for this webhook. Either it was never used or it wasn't used for the past seven days.
down
- All configured URLs of this webhook that previously connected successfully now have an error.
recovered
- At least one URL that had a connection failure, now connects successfully.
marginal
- One URL is working consistently, other URLS are failing.
good
- No errors exist.