Fun one today. Think of the Genesys Cloud Analytics API as a leaky faucet - it drips events, and we’re trying to catch every drop with PagerDuty. The issue isn’t missing events, it’s getting the same event triggering multiple PagerDuty incidents, almost immediately after each other. It’s like trying to fill a bucket with that leaky faucet, and the overflow protection is way too sensitive.
We’ve got an Analytics alert set up monitoring queue abandon rate. When it crosses 5%, it triggers a webhook to our internal service, which then formats a PagerDuty v2 event. The alert itself seems accurate - GC Analytics shows the rate jumping, and the webhook fires. The problem is PagerDuty shows two, sometimes three, incidents for the same alert evaluation.
The service is written in Node.js, using the PagerDuty Events API v2 SDK (version 2.4.3). Here’s the relevant code snippet for creating the event:
const pagerDuty = require('pagerduty-events-api');
const client = new pagerDuty.Client();
async function createPagerDutyIncident(abandonRate, queueName) {
const event = {
routing_key: 'YOUR_ROUTING_KEY',
event_action: 'trigger',
payload: {
summary: `High Abandon Rate - ${queueName}`,
detail: `Abandon rate exceeded 5% (${abandonRate}%)`,
source: 'Genesys Cloud Analytics'
},
dedup_key: 'abandon-rate-' + queueName //trying to dedup on queue name
};
try {
await client.trigger(event);
console.log('PagerDuty incident created.');
} catch (error) {
console.error('Error creating PagerDuty incident:', error);
}
}
We’ve tried setting dedup_key - initially, just a static value, then the queue name. Doesn’t help. The PagerDuty UI shows no correlation ID - it’s as if the requests are just arriving independently. Network traces show the webhook firing, and the POST requests to PagerDuty are successful (202 responses). I also checked the GC alert history - it’s only triggering once per rate crossing, so it’s not a double-fire from the source. The GC environment is prod, using the Miami region. The webhook endpoint is TLS 1.2 secured.
It feels like a race condition somewhere, or maybe PagerDuty is having issues with handling similar events rapidly. The mic stays hot, just need to stop the flood.