-
Notifications
You must be signed in to change notification settings - Fork 38
Disallow duplicate dimension sets. #20
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
jaredcnance
added a commit
that referenced
this issue
Feb 22, 2020
jaredcnance
added a commit
that referenced
this issue
Feb 22, 2020
- disallow duplicate dimensions sets - fix integ tests - move helper methods to bottom of file for readability - change expected samples to 3 Closes #20
aaronlna
pushed a commit
to aaronlna/aws-embedded-metrics-java
that referenced
this issue
Nov 22, 2021
This is a Java-equivalent bug-fix for the Node issue: awslabs/aws-embedded-metrics-node#20 New conditions check for any matching dimension set before skipping put dimensions-- to prevent duplicates from being stored. [TESTING] Unit test updated to address edge case; multiple dimension sets added and checked for no duplicates. Ran integration tests using Docker and compared results in CloudWatch.
aaronlna
pushed a commit
to aaronlna/aws-embedded-metrics-java
that referenced
this issue
Nov 22, 2021
This is the Java-equivalent bug-fix for prior issue in Node: awslabs/aws-embedded-metrics-node#20 New conditions check for any matching dimension set before skipping put dimensions. This prevents duplicates from being stored. [TESTING] Unit test updated to address edge case; multiple dimension sets of variable sizes are added and checked. Ran integration tests using Docker and compared results in CloudWatch.
aaronlna
pushed a commit
to aaronlna/aws-embedded-metrics-java
that referenced
this issue
Nov 22, 2021
This is the Java-equivalent bug-fix for prior issue in Node: awslabs/aws-embedded-metrics-node#20 New conditions check for any matching dimension set before skipping put dimensions. This prevents duplicates from being stored. [TESTING] Unit test updated to address edge case; multiple dimension sets of variable size are added and checked. Ran integration tests using Docker and compared results in CloudWatch.
aaronlna
pushed a commit
to aaronlna/aws-embedded-metrics-java
that referenced
this issue
Nov 22, 2021
This is the Java-equivalent bug-fix for prior issue in Node: awslabs/aws-embedded-metrics-node#20 New conditions check for any matching dimension set before skipping put dimensions. This prevents duplicates from being stored. [TESTING] Unit test updated to address edge case; multiple dimension sets of variable size are added and checked. Ran integration tests using Docker and compared results in CloudWatch.
This was referenced Nov 22, 2021
markkuhn
added a commit
to awslabs/aws-embedded-metrics-java
that referenced
this issue
Aug 15, 2022
* fix: prevent putDimensions from storing duplicate dimensions This is the Java-equivalent bug-fix for prior issue in Node: awslabs/aws-embedded-metrics-node#20 New conditions check for any matching dimension set before skipping put dimensions. This prevents duplicates from being stored. [TESTING] Unit test updated to address edge case; multiple dimension sets of variable size are added and checked. Ran integration tests using Docker and compared results in CloudWatch. * fix: change putDimensions to update/sort existing dimension sets when duplicate This change ensures new dimension key-values are used for the EMF root node by removing duplicate dimension sets and adding input dimension set to the end of the collection. Example: ``` [ { "keyA": "value1" }, { "keyA": "value2" }, ] // expected target member: { "keyA": "value2" } ``` [TESTING] Updated unit tests to check for this case wherein putDimensions may be triggered using various dimension set lengths, values, and order. * Update src/test/java/software/amazon/cloudwatchlogs/emf/model/MetricDirectiveTest.java * Update src/test/java/software/amazon/cloudwatchlogs/emf/model/MetricDirectiveTest.java Co-authored-by: Aaron Michael Lamb <[email protected]> Co-authored-by: Mark Kuhn <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
There is no need for duplicate dimension sets like the following.
This would re-create the same metric 3 times and is equivalent to:
This is needed for #14. It allows for things like the following while also allowing for re-use of the logger instance.
The text was updated successfully, but these errors were encountered: