Webhook Observability Architecture for Production Systems
Webhooks are deceptively simple. An HTTP POST fires, your endpoint receives it, and the world moves on. Until it doesn't. A payment provider silently changes their payload schema. A partner's events arrive in bursts that overwhelm your queue. A deployment introduces a bug that drops events for six hours before anyone notices.
The gap between "we have webhooks" and "we understand what our webhooks are doing" is where production systems break down. Webhook observability architecture is the practice of designing your systems so that gap doesn't exist—so that every event is traceable, every failure is categorized, and every recovery is fast.
This guide walks through how to architect observability for production-grade webhook systems. It covers the metrics that matter, the dashboards that surface them, the tracing patterns that make debugging fast, the replay workflows that make recovery safe, and the alerting strategies that catch problems before your customers do. It also covers how these patterns integrate with observability platforms like Datadog, Prometheus, and New Relic—and where a managed event gateway like Hookdeck can eliminate the infrastructure you'd otherwise build yourself.
Why webhooks need their own observability strategy
Standard application monitoring wasn't designed for webhooks. APM tools track request-response cycles within your services. But webhooks are asynchronous, cross-boundary, and often controlled by external systems. The source sends when it wants, the payload changes without notice, and delivery failures happen at network boundaries you don't own.
This creates observability gaps that generic monitoring can't fill.
You don't control the sender. When Stripe sends a payment_intent.succeeded event, your APM traces start when the request hits your endpoint. Everything upstream (the scheduling, the retry behavior, the batching) is invisible. You only see the result, not the intent.
Failures are silent. A webhook endpoint returning 200 OK after dropping the payload into a broken processing pipeline looks healthy to every external system. HTTP status codes alone don't tell you whether business logic actually executed.
Volume is unpredictable. Webhook traffic patterns follow external events, not your own release cycles. A partner running a batch export at 2 AM can 10x your event volume without warning. Your dashboards need to distinguish this from an actual incident.
Retry behavior compounds problems. When a destination goes down, webhook senders retry. Those retries arrive alongside fresh events when service recovers, creating a traffic spike at the worst possible moment. Without observability into queue depth and backpressure, you can't manage recovery safely.
Webhook monitoring requires purpose-built instrumentation that understands event lifecycles, not just HTTP transactions.
The core metrics for webhook infrastructure monitoring
Effective webhook observability architecture starts with choosing the right metrics. Not every number your system can produce is worth watching. The metrics below form a baseline that covers health, performance, and reliability for production webhook systems.
Ingestion metrics
These tell you whether events are arriving as expected.
Request rate is the total number of webhook requests per unit of time, broken down by source. A sudden drop from a previously consistent source is often the earliest signal that something is wrong upstream. A sudden spike may indicate batch processing, replay, or a misconfigured sender.
Acceptance rate tracks the ratio of accepted requests to total requests. Rejected requests—those failing authentication, validation, or schema checks—should be tracked separately. A rising rejection rate from a single source usually means the sender changed something.
Discarded requests are accepted requests that produce zero events, typically because filters or deduplication rules excluded them. This metric matters because it tells you whether your filtering logic is behaving as expected. A spike in discards may be normal (you tightened a filter) or may indicate a payload change that's accidentally matching your exclusion rules.
Processing and delivery metrics
These tell you whether events are being processed successfully and on time.
Event success rate is the percentage of events that complete processing without error. This should be tracked per connection (the link between a source and a destination) because a 99.5% success rate across all events can mask a 70% success rate on a single critical integration.
Event failure rate is the inverse, but it's worth tracking explicitly because failure patterns often differ from success patterns. A steady 2% failure rate is very different from zero failures for 23 hours followed by a burst of failures during a deployment window.
Average attempts per event tells you how many delivery attempts the system makes before an event succeeds or is marked as failed. A healthy system has this number close to 1.0. If it's climbing, your destinations are intermittently failing—even if the eventual success rate looks fine.
Response latency (average, p95, and p99) measures how long your destination takes to respond to delivery attempts. Latency spikes often precede failure spikes. If your destination's p99 latency doubles, you're likely about to see timeout-related failures.
Queue health metrics
These are the metrics that tell you whether your system is keeping up.
Pending events (queue depth) is the number of events waiting for delivery. This is arguably the single most important operational metric for production webhook systems. A growing queue means your destinations can't keep up with incoming events, and every minute it grows means longer delays for event delivery.
Oldest pending event (backpressure) tells you how old the oldest undelivered event is. If queue depth is the magnitude of the problem, backpressure is its duration. A queue depth of 10,000 with the oldest event at 30 seconds old is very different from a queue depth of 10,000 with the oldest event at 4 hours old.
Events with scheduled retries tracks how many events are waiting for a future retry attempt. A large number here means many events have already failed at least once and are waiting to try again.
Designing webhook dashboards
Dashboards are where observability becomes actionable. The goal isn't to display every metric you collect—it's to answer specific questions quickly. A well-designed webhook dashboard should let an on-call engineer assess system health within 10 seconds of opening it.
The operational dashboard
This is the primary dashboard your team watches during business hours and that on-call engineers check first during incidents.
The top row should show current system state: total request rate, overall event success rate, current queue depth, and oldest pending event. These four numbers together tell you whether the system is healthy right now. Traffic is flowing, events are succeeding, the queue isn't backing up, and nothing is stuck.
The second row should show time-series charts for the same metrics, typically over the last 24 hours. This context helps distinguish "queue depth just jumped from 0 to 500" (possibly a problem) from "queue depth oscillates between 400 and 600 throughout the day" (normal).
Below that, add per-destination breakdowns. Response latency by destination, failure rate by destination, and queue depth by destination let you quickly identify which specific integration is having problems.
The debugging dashboard
The debugging dashboard is where you go after the operational dashboard tells you something is wrong. It should expose more granular data: error rates broken down by HTTP status code, latency histograms rather than averages, and event volume by source and type.
The most useful panel on a debugging dashboard is often the error breakdown by status code over time. A wall of 503 errors tells you the destination is overloaded or down. A cluster of 422 errors suggests payload validation failures—possibly due to a schema change on your end or the sender's end.
The capacity planning dashboard
This dashboard tracks trends over weeks and months rather than hours: total event volume growth, peak-to-average volume ratios, destination latency trends, and queue depth high-water marks. It answers questions like "do we need to scale our webhook processing infrastructure before the holiday traffic spike?" and "is that new integration's volume growing faster than expected?"
Webhook tracing: following events through the system
Metrics tell you what is happening. Tracing tells you why. Webhook tracing is the practice of following a single event from ingestion through every transformation, routing decision, delivery attempt, and retry to its final state.
What a webhook trace should capture
A useful trace for a webhook event should record the full lifecycle:
- Ingestion: When the request arrived, from which source, the full payload and headers, and whether it was accepted or rejected.
- Routing and transformation: Which connection the event was routed to, what transformations were applied, and whether any filters excluded it.
- Delivery attempts: Each attempt's timestamp, the HTTP status code returned, the response body, the latency, and whether the attempt was a first try or a retry.
- Final state: Whether the event ultimately succeeded, failed permanently, or is still in a retry cycle.
This level of detail is what separates webhook debugging from guesswork. When a customer reports they didn't receive a notification, you need to trace the originating event through every step to identify exactly where it broke.
Structured and unstructured search across events
Tracing a single event is only useful if you can find the right event quickly. Production webhook systems process millions of events, and a trace ID alone isn't always available—especially when the problem report comes from a customer who says "my webhook didn't fire" rather than giving you a correlation ID.
Structured search across your event store is essential. You should be able to query by source, destination, HTTP status code, time range, and ideally by payload content. Searching for all events from a specific source that failed with a 422 between 2:00 PM and 3:00 PM narrows the investigation from millions of events to a handful.
But structured, filter-based search has limits. It requires you to know which field contains the value you're looking for, and it often means constructing complex query syntax. Unstructured (full-text) search across payloads, headers, and metadata is increasingly valuable as webhook volumes grow. An engineer debugging a customer issue often knows a user ID, an email address, or an order number—but not which field it lives in or which source sent it. Being able to type that value into a search bar and get instant results across all requests is a fundamentally different debugging experience from building JSON filter queries. At scale—hundreds of millions of events—this kind of search requires purpose-built indexing, but the payoff in debugging speed is substantial.
Correlating webhook traces with application traces
Webhook events don't exist in isolation. A payment_intent.succeeded event triggers business logic in your application, which may call other services, update databases, and send notifications. Connecting your webhook trace to your application's distributed trace (via a shared trace ID or correlation ID) gives you end-to-end visibility.
If you're using OpenTelemetry, this means propagating trace context from the inbound webhook through your handler code. When your webhook handler starts a span, attach the webhook event ID as an attribute. This lets you correlate a failed payment notification in your webhook dashboard with the specific database timeout that caused it in your APM tool.
Webhook replay workflows
Replay is the bridge between observability and recovery. Detecting a failure is only half the problem—you also need a safe, reliable way to reprocess the events that were affected.
Why replay matters more for webhooks
With internal service-to-service communication, you often have control over both sides. If a consumer fails, you can fix the bug, redeploy, and the upstream service can be asked to resend. With webhooks, the sender is typically external. Asking Stripe or Shopify to re-send specific events isn't always possible, and even when it is, it's manual and slow.
This means your webhook infrastructure must retain events and support redelivery. If you can't replay, every transient failure becomes a permanent data loss.
Single event replay
The simplest form of replay is redelivering a single event. This is useful during development and for isolated production issues. You identify the failed event, inspect its payload to confirm it's the one you want, and trigger redelivery.
The key requirements here are that the original payload and headers are preserved exactly, the retry uses the same destination configuration (or an updated one, if you're testing a fix), and the result is logged as a distinct attempt so you can tell the replay apart from the original failure.
Bulk replay
Bulk replay is necessary when a systemic issue affects many events. A destination goes down for an hour, and 3,000 events fail. You deploy a fix and need to replay all of them.
Safe bulk replay requires rate limiting. Sending 3,000 events simultaneously to a destination that just recovered is a recipe for taking it down again. Replay should be throttled to a rate the destination can handle, ideally using the same rate limiting configuration you use for normal delivery.
Bulk replay also needs filtering. You don't always want to replay every failed event from a time window—maybe only events for a specific connection or a specific error type. The ability to define replay criteria (time range, status code, source, destination) makes bulk replay practical rather than dangerous.
Bookmarks for replay
Some events are worth keeping around permanently—not because they failed, but because they're useful for testing and validation. Edge case payloads, events that exercise unusual code paths, or representative samples from each source can be bookmarked for on-demand replay.
Bookmarked events are exempt from normal data retention policies. When you need to test a deployment against a tricky payload format, you replay the bookmark rather than waiting for (or manufacturing) a real event.
Webhook alerting that reduces noise
Alerting is where observability architecture most often fails. Too few alerts and problems go unnoticed. Too many alerts and everything goes unnoticed because the team has learned to ignore the noise.
Alert on queue health, not just errors
Error-based alerts ("failure rate exceeded 5%") are a starting point, but they miss slow-burn problems. A destination that's responding correctly but slowly will cause queue depth to grow without triggering error alerts. By the time the failure rate spikes (because events start timing out), you're already hours behind.
Alert on queue depth thresholds and backpressure. A rule like "alert when pending events for any destination exceed 1,000 for more than 5 minutes" catches both fast failures and slow degradation.
Alert on absence, not just presence
One of the trickiest webhook failure modes is when events simply stop arriving. If a payment provider's webhook integration breaks silently, your error rate doesn't go up—your event volume goes down. This is invisible to error-based alerting.
Absence alerting detects when expected traffic patterns don't materialize. If a source that normally sends 500 events per hour drops to zero for 30 minutes, that's worth investigating even though no errors occurred.
Issue-based alerting over raw event alerts
Sending an alert for every individual failed webhook event is noisy and unhelpful. If a destination is down, you don't need 500 separate alerts—you need one alert that says "destination X is returning 503 errors, affecting 500 events across 3 connections."
Issue-based alerting groups related failures into a single actionable notification. An issue is created when a failure pattern is detected (e.g., a specific connection begins returning a specific error class), and the team is notified once. The issue tracks the count of affected events, the time window, and the connection details. When the underlying problem is resolved, the issue provides a single point from which to trigger bulk replay.
This approach integrates naturally with incident management tools. An issue can open a PagerDuty incident or post to a Slack channel with enough context for the on-call engineer to start investigating immediately—the error type, the affected connection, the number of impacted events, and the first and last occurrence timestamps.
Integrating webhook observability with your existing stack
Production webhook observability doesn't live in isolation. Your team already has dashboards, alerting rules, and runbooks built around existing observability platforms. Webhook metrics need to flow into those platforms so that on-call engineers don't have to check a separate tool during incidents.
Datadog webhook monitoring
Datadog's strength for webhook monitoring is its combination of custom metrics, dashboards, and alerting within a single platform. When webhook metrics are exported to Datadog, you can build dashboards that overlay webhook queue depth with application-level metrics—for example, showing that a spike in webhook delivery latency coincided with elevated database query times.
Metrics should be tagged with resource-level labels (source name, connection name, destination name) so you can filter and group in Datadog's query language. A dashboard template pre-configured with panels for request rates, event success/failure ratios, queue depth, and response latency provides a starting point that teams can customize.
For alerting, Datadog's anomaly detection works well for webhook volume monitoring. Rather than setting a static threshold for "expected events per hour" that needs constant tuning, anomaly detection learns the normal traffic pattern and alerts on deviations. This catches both traffic spikes and the absence-of-traffic patterns described above.
Prometheus webhook monitoring
Prometheus is a natural fit for teams running Kubernetes or other self-hosted infrastructure. Webhook metrics exported in Prometheus exposition format can be scraped alongside your existing application metrics, visualized in Grafana, and used in Alertmanager rules.
A typical Prometheus configuration for webhook metrics uses a 30-second scrape interval, which balances data freshness with scrape overhead. Counter metrics track cumulative totals (requests, events, attempts) broken down by status labels, while gauge metrics track point-in-time values like queue depth and response latency.
Alertmanager rules for webhook monitoring follow the same patterns described above. A rule that fires when queue depth exceeds a threshold for 5 minutes, routed to the appropriate Slack channel or PagerDuty service, is straightforward to configure and integrates with whatever notification pipeline your team already uses.
Grafana dashboards built on Prometheus data give you time-series visibility into webhook health alongside application metrics. A pre-built dashboard template with panels for request rates, event processing metrics, delivery attempt statistics, queue depth, and response latency breakdowns by source and destination provides the starting point.
New Relic webhook monitoring
New Relic's integration works through its Metrics API, receiving webhook metrics with the standard attributes (team, organization, source, destination, connection) that let you query and alert using NRQL. This is particularly useful for teams that use New Relic as their primary observability platform and want webhook health visible in the same context as their application performance data.
The setup pattern is the same across platforms: export your webhook metrics, build dashboards around the core metrics described above, and configure alerts on queue depth, failure rates, and traffic anomalies. The platform you choose should be the one your team already lives in, not a separate tool that adds context-switching overhead to incident response.
Webhook failure analysis
When something goes wrong, observability needs to help you move from "something is broken" to "here's exactly what happened and what to do about it" as quickly as possible.
Categorizing failures by root cause
Not all webhook failures are the same, and treating them uniformly slows down resolution. Effective webhook failure analysis groups failures into categories that map to different response playbooks:
Destination errors (5xx) indicate the receiving service is having problems. The response is usually to wait, because the destination is likely already being worked on by another team or provider. Your system should hold events and retry automatically.
Validation errors (4xx) indicate something wrong with the event payload or your processing logic. These won't resolve themselves with retries. The response is to inspect the payload, identify the mismatch, fix your handler or transformation, and then replay the affected events.
Timeout errors suggest the destination is overloaded or your processing is too slow. The response depends on context: if the destination is under load, back off and retry with lower concurrency. If your processing logic is slow, investigate and optimize before replaying.
Connection errors (DNS failures, TLS handshake failures, connection refused) point to infrastructure or configuration problems. Check whether the destination URL is correct, whether certificates have expired, or whether a firewall rule changed.
From failure to fix to replay
The workflow for resolving webhook failures follows a consistent pattern: detect the problem (via alerts or dashboard review), investigate the root cause (using traces and structured search), apply the fix (code change, configuration update, or waiting for a third-party to recover), verify the fix (replaying a single test event and confirming success), and then replay the remaining affected events (bulk replay with rate limiting).
Each step in this workflow depends on the observability capabilities described above. Without tracing, investigation is guesswork. Without structured search, finding affected events is manual. Without replay, recovery requires asking external senders to re-fire events.
How Hookdeck handles webhook observability
Building all of the above—metrics collection, dashboards, tracing, replay, alerting, and integrations—from scratch is a significant engineering investment. Hookdeck Event Gateway is a managed event gateway that provides these capabilities as built-in features of its platform.
Built-in metrics and dashboards
Event Gateway's dashboard provides real-time metrics for every layer of the event lifecycle. For sources, you see request rates, acceptance/rejection ratios, and events generated per request. For connections, you see event success and failure rates, average attempts per event, and retry schedules. For destinations, you see delivery rates, response latency (average, p95, p99), and queue depth.
These metrics are available in the dashboard, via the CLI, and through the Metrics API. The Metrics API gives you programmatic access to the same data shown in the dashboard, so you can build internal reporting, feed custom alerting systems, or sync with other tools.
Stateful metrics like queue depth are sampled every 5 seconds. Everything else updates in near real-time.
Event-level tracing and structured search
Every event processed through Hookdeck is fully traceable. You can follow a single event from the moment it was received as a request, through routing, transformation, and filtering, through each delivery attempt (with status code, response body, and latency), to its final state.
Hookdeck provides fast, unstructured search across requests. You can enter any value from your request payloads, headers, or metadata into the search bar and get near-instant results across your full event history—even at scales of hundreds of millions of events. No complex query syntax, no needing to know which field your value lives in. Type a user ID, an email address, or any payload content and see every request containing that value. For more targeted queries, you can still filter by source, destination, status code, time range, and event type.
Replay without custom tooling
Event Gateway supports both single-event and bulk replay as built-in features. Failed events can be replayed with one click from the dashboard or triggered via the CLI and API. Bulk replay accepts filters (time range, status, connection) and applies rate limiting automatically to prevent overwhelming recovering destinations.
Bookmarks let you pin specific requests for permanent retention and on-demand replay, independent of your normal data retention window. This is useful for regression testing and for keeping representative edge-case payloads available.
Issue-based alerting and failure grouping
Instead of alerting on every individual event failure, Hookdeck automatically groups related failures into issues. An issue is created per connection and error class—for example, "503 errors on the payment-webhook connection"—and tracks the count of affected events, the first and last occurrence, and a histogram of occurrences over time.
Issues integrate with notification channels including Slack, Microsoft Teams, PagerDuty, and OpsGenie. When an issue opens, the configured channel receives a notification with enough context to start investigating. Team members can acknowledge issues to signal they're working on them, then trigger bulk replay directly from the issue once the fix is in place.
Metrics export to Datadog, Prometheus, and New Relic
For teams that want webhook metrics alongside their existing application monitoring, Event Gateway supports exporting metrics to Datadog, Prometheus, and New Relic. The exported metrics include request totals (accepted, rejected), event totals (successful, failed, ignored), delivery attempt totals, queue depth, and response latency—all tagged with source, connection, and destination labels for granular filtering.
Hookdeck provides pre-built dashboard templates for both Datadog and Grafana (for Prometheus) so you can get a complete webhook monitoring dashboard into your existing platform in minutes rather than building one from scratch.
The Prometheus integration exposes a standard metrics endpoint that Prometheus scrapes directly. The Datadog integration pushes metrics via API key. The New Relic integration uses the New Relic Metrics API with your license key. Each integration takes a few minutes to configure and starts delivering data immediately.
Build vs. buy: where observability tips the scale
Webhook observability is one of the areas where the build-vs-buy decision becomes clearest. Building the ingestion pipeline, queue, and retry logic for webhooks is well-understood engineering. Building the observability layer on top—metrics collection, event storage and search, trace correlation, replay infrastructure, failure grouping, and integrations with multiple monitoring platforms—is a separate project that often takes longer than the webhook processing itself.
Teams evaluating whether to build webhook infrastructure in-house should consider the observability requirements alongside the delivery requirements. Reliable delivery is table stakes; the ability to diagnose, recover from, and prevent failures is what separates a webhook system that works from one you can confidently operate.
If your team already has the infrastructure and expertise to build and maintain event-level tracing, structured search across millions of events, a replay system with rate limiting, failure categorization and issue management, and metrics export to multiple observability platforms, then building in-house makes sense. If those capabilities represent months of engineering time that would be better spent on core product work, a managed event gateway like Hookdeck provides them out of the box.
Key takeaways
Webhook observability architecture isn't about collecting more data. It's about collecting the right data, presenting it in a way that supports fast decisions, and connecting detection to recovery.
Monitor queue depth and backpressure, not just error rates. These metrics catch slow-burn problems that error-based alerting misses.
Design dashboards for specific questions. An operational dashboard for "is everything healthy right now," a debugging dashboard for "what exactly went wrong," and a capacity planning dashboard for "are we ready for next month's traffic."
Build tracing into your event lifecycle from the start. Structured search across events is what makes debugging fast when your system processes millions of events per day.
Make replay a first-class capability. Without it, every transient failure risks permanent data loss. With it, recovery from even large-scale incidents becomes routine.
Use issue-based alerting to reduce noise. Grouping related failures into issues and routing them to the right team beats sending individual alerts for each failed event.
Export webhook metrics to the observability platform your team already uses. Whether that's Datadog, Prometheus with Grafana, or New Relic, webhook health should be visible in the same context as your application health—not in a separate tool that adds friction to incident response.
Gain control over your webhooks
Try Hookdeck to handle your webhook security, observability, queuing, routing, and error recovery.