-
Notifications
You must be signed in to change notification settings - Fork 154
Bug: Override of default dimension with new value results into wrong CloudWatch dimension output #1773
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @Jimmy89 thank you for taking the time to report the issue. I was able to reproduce the bug and indeed the dimension gets duplicated. I have created a sample minimal example which can be found in this repo: https://github.com/dreamorosi/repro-1773 I will add this to our backlog so we can fix it. |
|
This is now released under v1.14.2 version! |
Expected Behaviour
If I set a default dimension, e.g.
type
with the valuemeeting
, and then set through singleMetric with the same dimension name set to another value, the output to CloudWatch contains twice the dimensiontype
. This is incorrect in my understanding.Current Behaviour
Code snippet
Output:
The
Dimensions
field containstype
twice, which should be once in my understanding.Steps to Reproduce
Run code snippet below and watch output.
Possible Solution
When writing the dimension you could use
new Set
to ensure the array does not contain duplicates.Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
18.x
Packaging format used
npm
Execution logs
No response
The text was updated successfully, but these errors were encountered: