Closed
Description
What were you trying to accomplish?
Adding 100 metric data points for telemetry purposes for a single metric.
Expected Behavior
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.
Current Behavior
More than 100 metric data points can be added.
Possible Solution
Serialize and flush metric data set when a single metric reaches 100 data points. Dimensions etc should be kept intact.
Steps to Reproduce (for bugs)
- Initialize
Metrics()
- Add a single metric e.g.,
metrics.add_metric(name=..., unit=..., value=[one_hundred_values])
Environment
- Powertools version used: 1.25.1
- Packaging format (Layers, PyPi): PyPi
- AWS Lambda function runtime: 3.9
- Debugging logs
# paste logs here