Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics: Prevent a single metric have more than 100 data points #1062

Closed
heitorlessa opened this issue Mar 7, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@heitorlessa
Copy link
Contributor

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)

  1. Initialize Metrics()
  2. 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

How to enable debug mode**

# paste logs here
@heitorlessa heitorlessa added bug Something isn't working triage Pending triage from maintainers pending-release Fix or implementation already in dev waiting to be released labels Mar 7, 2022
@heitorlessa heitorlessa removed the triage Pending triage from maintainers label Mar 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2022

This is now released under 1.25.2 version!

@github-actions github-actions bot closed this as completed Mar 7, 2022
@github-actions github-actions bot removed the pending-release Fix or implementation already in dev waiting to be released label Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant