Skip to content

Maintenance: change the maximum number of user-defined metric dimensions to 29 #1413

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

Closed
2 tasks done
gshpychka opened this issue Aug 3, 2022 · 8 comments
Closed
2 tasks done

Comments

@gshpychka
Copy link

gshpychka commented Aug 3, 2022

Summary

AWS increased the quotas for CloudWatch today; specifically, the maximum number of dimensions a metric can have was increased from 10 to 30 (https://aws.amazon.com/about-aws/whats-new/2022/08/amazon-cloudwatch-metrics-increases-throughput)

The validation should take this into account and raise the limit accordingly.

Why is this needed?

Previously, the limit was 10 dimensions per metric, and this was raised to 30 today. We should reflect it and allow the user to take advantage of this

Which area does this relate to?

No response

Solution

Change https://github.com/awslabs/aws-lambda-powertools-python/blob/bb1eda742583d58790219942a49a5d2489ea91ea/aws_lambda_powertools/metrics/base.py#L17 to MAX_DIMENSIONS = 29

Acknowledgment

@gshpychka gshpychka added internal Maintenance changes triage Pending triage from maintainers labels Aug 3, 2022
@heitorlessa
Copy link
Contributor

Thanks for flagging it @gshpychka! We had a chat with the CloudWatch team before making it public.

@rubenfonseca @leandrodamascena should we treat this as a breaking change or not? We'd have to change the MAX_DIMENSIONS and our tests as the ValidationError will no longer occur past 9.

If you think this is not a breaking change, we can bundle it for our release this Friday.

@heitorlessa heitorlessa removed the triage Pending triage from maintainers label Aug 4, 2022
@rubenfonseca
Copy link
Contributor

rubenfonseca commented Aug 4, 2022 via email

@leandrodamascena
Copy link
Contributor

I don't think this is a breaking change change either. The old code will continue to work with a maximum of 9 dimensions and the new one will be able to use a maximum of 29.

it's a nice improvement to add more metrics/dimensions to Cloudwatch and I'm sure customers will be happy about it.

@heitorlessa
Copy link
Contributor

Alright then! @gshpychka, would you like to do the honours and make a PR for this change?

We can craft a PR if you don't have the bandwidth

@leandrodamascena
Copy link
Contributor

Hi @gshpychka. I think I can submit a PR for this issue if you're busy. I think (not sure) that tomorrow there should be a release and it would be interesting to have this improvement.

@heitorlessa heitorlessa removed the internal Maintenance changes label Aug 5, 2022
@github-actions github-actions bot added the pending-release Fix or implementation already in dev waiting to be released label Aug 5, 2022
@gshpychka
Copy link
Author

Apologies, couldn't get to it yesterday.

@heitorlessa
Copy link
Contributor

no problem at all @gshpychka, we only "rushed" a bit because we're releasing this to everyone today ;)

Thanks for checking in (and more importantly for flagging it)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2022

This is now released under 1.27.0 version!

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

No branches or pull requests

4 participants