-
Notifications
You must be signed in to change notification settings - Fork 441
feat(metrics): add runtime validations for the metric name #7026
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
feat(metrics): add runtime validations for the metric name #7026
Conversation
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7026 +/- ##
===========================================
- Coverage 96.25% 96.24% -0.02%
===========================================
Files 275 275
Lines 12884 12896 +12
Branches 950 952 +2
===========================================
+ Hits 12402 12412 +10
- Misses 377 378 +1
- Partials 105 106 +1 ☔ 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.
Hey @sdangol thanks a lot for submitting this PR!! I just left a small comment and we are good to merge.
tests/functional/metrics/required_dependencies/test_metrics_cloudwatch_emf.py
Show resolved
Hide resolved
|
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 a lot for working on this and addressing the feedback @sdangol!
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Issue number: #7010
Summary
This PR adds runtime validation for the metric name. It ensures that the metric name meets the required constraints before they are added, providing better error handling and feedback to users. This was done to prevent potential issues that could have come up due to invalid metric name being passed to Cloudwatch.
Changes
MIN_METRIC_NAME_LENGTH
andMAX_METRIC_NAME_LENGTH
)User experience
Before this, for the users who were passing in an invalid metric name (empty string or a string of more than 255 characters), the metrics would get silently dropped. But, now the users will get an error.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
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.