[aws-cloudwatch] The period of a MathExpression is not respected on CloudWatch #9156
Labels
@aws-cdk/aws-cloudwatch
Related to Amazon CloudWatch
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
p1
The
period
of aMathExpression
CloudWatch metric that is used in aGraphWidget
is currently not respected. In particular, it is possible to specify a period of 1 minute, but for data points still to be spaced every 5 minutes.Reproduction Steps
Assume below that
queue
is someaws_sqs.Queue
, anddashboard
is someaws_cloudwatch.Dashboard
. Then consider the following:In CloudWatch, this produces a widget showing data points every 5 minutes, rather than every 1 minute as expected.
Error Log
The actual JSON produced for the widget above will be similar to the following (apart from QueueName and region changes):
This corresponds to showing measurements spaced every 5 minutes by default.
If the first
metrics
item in the dictionary above is replaced withthen data points are spaced correctly every 1 minute. However, the code produced by the CDK does not generate this.
Environment
aws-cli/1.18.8 Python/3.7.4 Linux/5.3.0-62-generic botocore/1.15.8
1.45.0 (build 0cfab15)
v10.16.3
Linux 5.3.0-62-generic #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Python 3.7.4
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: