-
Notifications
You must be signed in to change notification settings - Fork 421
fix(api_gateway): fixed custom metrics issue when using debug mode #1827
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(api_gateway): fixed custom metrics issue when using debug mode #1827
Conversation
Newlines are now emitted at the end of api_gateway debug JSON events. This resolves an issue where the debug events would be combined with CloudWatch EMF metrics, resulting in the metrics being ignored.
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
Codecov ReportBase: 97.58% // Head: 97.59% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #1827 +/- ##
========================================
Coverage 97.58% 97.59%
========================================
Files 141 141
Lines 6425 6434 +9
Branches 442 444 +2
========================================
+ Hits 6270 6279 +9
Misses 123 123
Partials 32 32
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Hi @pawosty! Great job catching and fixing this issue. Now I was able to simulate the problem with the current code this PR solves the problem.
Approved.
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Issue number: #1805
Summary
Changes
Newlines are now emitted at the end of api_gateway debug JSON events. This resolves an issue where the debug events would be combined with CloudWatch EMF metrics, resulting in the metrics being ignored.
User experience
Before, if debug mode was enabled in the api_gateway router, custom EMF metrics would be appended to the end of the debug JSON in the same line in standard out. This would result in the custom metrics being ignored by the CloudWatch agent. With this change, the two JSON objects are separated by newlines and CloudWatch recognizes the metrics data and uploads it.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
This is not 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.