Bug: Prevent a single metric have more than 100 data points #311
Labels
area/metrics
Core metrics utility
bug
Unexpected, reproducible and unintended software behaviour
status/confirmed
The scope is clear, ready for implementation
Expected Behaviour
Flush metric set when data point is reached to prevent potential data loss, where 100+ data points are added thus being ignored silently by CloudWatch EMF when processed in the background.
docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html#CloudWatch_Embedded_Metric_Format_Specification_structure_target
Current Behaviour
More than 100 metric data points can be added.
Code snippet
Possible Solution
Serialize and flush metric data set when a single metric reaches 100 data points.
Throw exception when adding a metric with 100 data points.
Dimensions etc should be kept intact.
Steps to Reproduce
Run the code added in code snippet
Powertools for AWS Lambda (.NET) version
latest
AWS Lambda function runtime
dotnet6
Debugging logs
No response
The text was updated successfully, but these errors were encountered: