-
Notifications
You must be signed in to change notification settings - Fork 26
chore: add support for multiple dimensions #884
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #884 +/- ##
===========================================
+ Coverage 77.24% 77.28% +0.03%
===========================================
Files 272 272
Lines 10812 10875 +63
Branches 1264 1278 +14
===========================================
+ Hits 8352 8405 +53
- Misses 2047 2054 +7
- Partials 413 416 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
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.
Amazing job @hjgraca!
Issue number: #845
Summary
Changes
adding support for multiple dimensions in a single call, updating dimension validation and management logic, and introducing new unit tests to ensure robustness.
Enhancements to Dimension Handling:
AddDimensions
method to support adding multiple dimensions at once, with validation for non-null keys and values (libraries/src/AWS.Lambda.Powertools.Metrics/IMetrics.cs
,libraries/src/AWS.Lambda.Powertools.Metrics/Metrics.cs
,libraries/src/AWS.Lambda.Powertools.Metrics/Model/MetricDirective.cs
). [1] [2] [3]libraries/src/AWS.Lambda.Powertools.Metrics/Model/MetricDirective.cs
). [1] [2]API Improvements:
SetService
method for setting the service name and a staticAddDimensions
method for adding dimensions globally (libraries/src/AWS.Lambda.Powertools.Metrics/Metrics.cs
). [1] [2]AddDimensionSet
method to handle lists of dimensions, ensuring they are treated as cohesive units (libraries/src/AWS.Lambda.Powertools.Metrics/Model/Metadata.cs
,libraries/src/AWS.Lambda.Powertools.Metrics/Model/MetricsContext.cs
). [1] [2]Refactoring and Bug Fixes:
ExpandAllDimensionSets
method to ensure the last value for duplicate keys is used, aligning with expected behavior (libraries/src/AWS.Lambda.Powertools.Metrics/Model/MetricDirective.cs
).Dimensions
list (libraries/src/AWS.Lambda.Powertools.Metrics/Metrics.cs
).These updates enhance the flexibility and reliability of the Metrics library, making it easier to manage and validate dimensions in AWS Lambda applications.
User experience
Output
Checklist
Please leave checklist items unchecked if they do not apply to your change.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.