Track your app's webhook delivery metrics
If your public app or custom app uses webhooks, then you can view a report of your app's webhook deliveries from the past seven days in the Partner Dashboard. You can use the webhook metrics report to track any failed webhook deliveries and fix them before they affect merchants.
View an app's webhook deliveries
- Log in to your Partner Dashboard.
- Click Apps.
- In the Webhook deliveries column, click the delivery percentage for the app.
The Webhook metrics page shows failed deliveries over time. Each topic in the table lists the following information for each of the app's webhook subscriptions:
- Webhooks removed: The number of removed webhook subscriptions. Webhooks are removed when 19 consecutive retry attempts for the same webhook fail.
- Failed delivery rate: The percentage of unsuccessful delivery attempts out of the total number of delivery attempts.
- Response time: The 90th percentile of an app's webhook response time. This means that 90% of the app's responses were equal to or faster than the listed time.
From the Webhook metrics page, you can view the following:
Viewing a webhook's delivery logs
When you click a webhook topic on the Webhook metrics page, you can view the delivery logs for that topic. The delivery logs list the following information:
- Response: The response code for the delivery.
- Subscription ID: The unique ID of the subscription that's associated with the delivery.
- Shop ID: The ID of the Shopify store that's associated with the delivery.
- Shop: The URL of the Shopify store that's associated with the delivery.
- Time: The date and time that the most recent delivery attempt was made.
- Retries: The number of delivery attempts that were made.
You can use the subscription ID to identify delivery attempts across a webhook subscription. Search by the subscription ID to see all the delivery attempts for that subscription.
The Response column shows the response code that your webhook sent. A 200 series status response is considered successful. If your app has a high rate of successful responses, then the logs display a sample representation of successful responses.
If your webhook didn't respond with a 200 series status code, then the delivery failed. If the delivery fails, then it's retried up to 19 times. The Retries column shows how many attempts were made to deliver that particular payload.
You can use the response and the number of retries to help figure out which webhooks to fix first. Prioritize fixing the webhooks that have any of the following errors:
- A Removed response: Removed webhooks won't receive any deliveries unless you create them again.
- A Delivery failed response and 19 retries: After 19 failed delivery attempts, webhooks stop receiving deliveries. For webhooks with 19 failed delivery attempts, you might need to import missing data.
- A Delivery failed response and 13 to 18 retries: Webhooks that have failed multiple times in a row are likely to continue failing. You might miss data if these webhooks continue to fail.
Viewing a webhook's delivery details
When you click a delivery on the Delivery logs page, you can view additional information about the delivery, including the following:
- Endpoint: The endpoint that the delivery was sent to.
- Response time: The time between the request and the webhook response. If your webhook doesn't respond within 5.0 seconds, then the delivery fails.
- Payload size: The size of the delivery's payload.
- Retries: The number of delivery attempts left. If there are no retries left and the latest response failed, then the webhook might be removed.
- HTTP headers: The HTTP headers that are sent with the delivery.
Troubleshooting failed deliveries
Delays in data processing that are caused by webhook failures can have an impact on merchants. Each time that a delivery fails, the time between retried deliveries increases. This can cause your data to become out of sync, especially if you process a lot of webhook events or time-sensitive data.
To identify failed deliveries, look for the following:
- Removed webhooks: These webhooks aren’t receiving data because they’ve been removed after multiple failed delivery attempts. You’ll need to fix the issue, then recreate the webhooks.
- Response times between 4.0 seconds and 5.0 seconds: The webhook must respond within 5.0 seconds. If your webhook doesn't respond, then the delivery fails. To resolve timeout failures, delay processing your webhook until you've sent your response.
- Failed delivery rates over 0.5%: This is considered a higher-than-average failed delivery rate, and could mean that your webhook is failing across multiple stores, or has failed multiple times in a row. A high failed delivery rate on one topic might show that you have a store-specific or payload-specific error.
- The same failed delivery rates across all topics: If your topics all have a high failed delivery rate, then your backend might not be responding. To troubleshoot, use your monitoring tools.