Open
Description
Version
v5.2.3
Steps and/or minimal code example to reproduce
It is not actually a bug but a better and simpler computation exist. Currently, time to drain metrics in SQS is calculated as below [1] , which is indirect. A better estimate can be calculated using RATE function [2].
Expected behavior
Instead of directly getting the consumption rate, current computation estimate based on different metrics which is less accurate.
Actual behavior
A better and direct method can be used.
Other details
A sample code for this is
{
"metrics": [
[ { "expression": "m1/ABS(RATE(m1))", "label": "TimeToDrain (sec)", "id": "e1", "region": "us-east-1" } ],
[ "AWS/SQS", "ApproximateNumberOfMessagesVisible", "QueueName", "some-test-queue", { "id": "m1", "visible": false, "region": "us-east-1" } ]
],
"view": "timeSeries",
"stacked": false,
"region": "us-east-1",
"stat": "Average",
"period": 300
}