-
Notifications
You must be signed in to change notification settings - Fork 156
fix(metrics): addDimensions() documentation and tests #3964
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
base: main
Are you sure you want to change the base?
fix(metrics): addDimensions() documentation and tests #3964
Conversation
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit unsure about the changes in this entire file. It seems that we re-declared all the types that were previously in the packages/metrics/src/types/Metrics.ts
file for no apparent reason.
This seems to break the compilation (see failed CI) - can we revert?
Thanks for catching this! I've reverted the types/index.ts file to its original state. This was an unintended change that happened during the implementation. The PR now only contains documentation updates and test fixes. |
|
Fix:
addDimensions()
should create a setSummary
Changes
This PR fixes issue #3777 by modifying the
addDimensions()
method to create a new dimension set rather than concatenating dimensions into the existing set. The implementation follows the EMF specification which supports multiple dimension sets within theDimensions
array.Issue number: #3777
Description of changes
Key changes:
addDimensions()
to create a new dimension set that includes default dimensionsaddDimensionSet()
for consistency with other Powertools for AWS Lambda implementationsserializeMetrics()
to include all dimension sets in the EMF outputclearDimensions()
to clear both individual dimensions and dimension setsExample
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.