We’re seeing a weird lag in our real-time queue dashboards. The OpenTelemetry spans are propagating correctly through the Data Actions, but the waitingCount from the Statistics API is stuck on old values.
Here’s the setup:
- We trigger a Data Action that calls
/api/v2/analytics/queues/realtime - We inject the
trace_idinto the span context - The span hits Jaeger, but the payload shows
waitingCount: 0even when we have 5 agents waiting.
Code snippet for the Data Action HTTP call:
{
"method": "GET",
"url": "https://api.mypurecloud.com/api/v2/analytics/queues/realtime",
"params": {
"groupBy": "queue",
"interval": "PT1M"
},
"headers": {
"Authorization": "Bearer {{auth_token}}"
}
}
The response body looks like this:
{
"items": [
{
"id": "queue-123",
"name": "Support",
"waitingCount": 0,
"availableAgents": 10
}
]
}
I’ve tried adding ?interval=PT30S but it doesn’t help. The issue seems to be that the API is returning cached data. Is there a way to force a fresh fetch in the request? Or am I missing a header?
The trace shows the call completed in 200ms, which is too fast for a real-time calculation. This makes our observability metrics useless for current queue state. Need to fix this before the next sprint demo.