feat(metrics): add flush_metrics() method to allow manual flushing of metrics#2171
feat(metrics): add flush_metrics() method to allow manual flushing of metrics#2171leandrodamascena merged 6 commits intodevelopfrom
Conversation
695761c to
79433b2
Compare
There was a problem hiding this comment.
This example file was not being used in the documentation, so I just changed the content and started using it.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #2171 +/- ##
========================================
Coverage 97.46% 97.46%
========================================
Files 147 147
Lines 6872 6875 +3
Branches 505 505
========================================
+ Hits 6698 6701 +3
Misses 137 137
Partials 37 37
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Another excellent job Ruben!!
I'm wondering if we should do the same as the typescript and move the "Flushing metrics manually" topic to the "Flushing Metrics" menu. What do you think about?
Reference:
https://awslabs.github.io/aws-lambda-powertools-typescript/latest/core/metrics/#manually
|
Peer-review feedback:
|
heitorlessa
left a comment
There was a problem hiding this comment.
dummy logic to try/finally makes more sense
Co-authored-by: Heitor Lessa <[email protected]> Signed-off-by: Ruben Fonseca <[email protected]>
Co-authored-by: Heitor Lessa <[email protected]> Signed-off-by: Ruben Fonseca <[email protected]>


Issue number: #2109
Summary
Changes
This PR adds a new
flush_metricsto the metrics utility to manually flush the metrics.User experience
Before this PR it was hard for users of the metrics utility to flush the metrics when not running on the Lambda runtime. This simple refactor enables the users
quick access to manually flushing the metrics.
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.