-
Notifications
You must be signed in to change notification settings - Fork 158
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
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.
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. |
Hi @matteofigus, I'll pick up the review for this right after the release of Bedrock Agent Functions on Tue 06/03. |
8f8454b
to
6278aa8
Compare
|
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.
Thanks for the changes, and apologies for the delayed review. Got caught between PTO and other launches.
I've left a few comments, I think we're getting closer but we need to tweak the logic to align with the addDimension
(singular) method.
I've also answered to your questions in the linked issue, I hope it'll clarify the doubts - apologies for the confusion there.
6fcd6db
to
cc82cf8
Compare
- Align addDimensions() validation with addDimension() method - Add proper value validation and duplicate dimension warnings - Update getCurrentDimensionsCount() to include dimensionSets - Fix dimension count validation logic
- Add tests for invalid dimension values (empty, null, undefined) - Add tests for dimension overwrite warnings - Achieve 100% code coverage for addDimensions method
cc82cf8
to
4fb32b7
Compare
|
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.
Thank you for fixing this bug!
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Fix:
addDimensions()
should create a setSummary
Changes
This PR fixes issue #3777 where
addDimensions()
was incorrectly adding dimensions to the existing set instead of creating a new dimension set.Changes made:
addDimensions()
method inMetrics.ts
to create a new dimension set rather than adding to existing dimensionsdimensionSets
array to store multiple dimension setsaddDimensions()
Documentation updates:
addDimensions()
to create multiple dimension setsaddDimensions()
creates a new set rather than modifying existing dimensionsIssue number: #3777
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.