awslabs / aws-embedded-metrics-python

Amazon CloudWatch Embedded Metric Format Client Library
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format.html
Apache License 2.0
208 stars 35 forks source link

Fix @metric_scope for generator and async generator functions #113

Closed acradu closed 1 month ago

acradu commented 7 months ago

Issue #, if available:

Description of changes: This change updates @metric_scope to iterate through the wrapped generator, allowing metric collection on each iteration

fernandoaguilar commented 1 month ago

anyone plan on merging this in? this fixes the no current running event loop error for us, we will have to fork the repo otherwise if this is not merged in. @acradu

drduhe commented 2 weeks ago

Can you do a latest release with this change?