Monitor Webhook Endpoint Health and Payload Processing Queue
The global admin has access to a webhook health monitoring view within the admin portal that surfaces key operational metrics for the portal webhook infrastructure. This includes the endpoint URL currently configured for the Dynamics portal to target, the number of payloads received and rejected in configurable time windows, current processing queue depth, and recent error events with their HTTP response codes and rejection reasons. The portal sync service and webhook infrastructure write structured logs that are aggregated into this view via the portal integration repository.
User Story
Acceptance Criteria
- Given a global admin opens the webhook health view, when it loads, then they see the active webhook endpoint URL, total payloads received in the last 24 hours, and rejection count with rejection reason breakdown
- Given webhook payloads are being rejected at a rate above 10% in a rolling hour, when a global admin views the health dashboard, then a high-rejection-rate alert is prominently displayed
- Given the webhook infrastructure is unreachable or the Edge Function has error-exited, when a global admin views the health dashboard, then an infrastructure outage alert is shown with the last-known healthy timestamp
- Given a global admin identifies a batch of failed events, when they select those events and trigger reprocessing, then the events are re-enqueued for the portal sync service with a reprocessing flag
- Given a global admin views the health dashboard, when they filter by a specific organization, then the metrics narrow to webhook events scoped to that organization's integration configuration
Business Value
The webhook infrastructure is a critical integration boundary that operates asynchronously and without user-facing feedback. Silent failures — such as the Dynamics portal changing its webhook target URL, a secret rotation mismatch, or an Edge Function regression — will cause the app and portal to silently diverge in data state. A dedicated health monitoring view enables global admins to detect and resolve these failures proactively, before coordinators or peer mentors notice inconsistent data.
Components
- Portal Webhook Infrastructure infrastructure
- Portal Sync Service service
- Portal Integration Repository data