You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2f43c24
Browse filesBrowse the repository at this point in the historyBrowse files
fix(metrics): clear in-memory metrics when flush emits nothing
flush_metrics only called clear_metrics after printing an EMF blob.
When an invocation added dimensions or metadata but no metrics, when
raise_on_empty_metrics raised, or when POWERTOOLS_METRICS_DISABLED was
set, nothing was cleared. The next invocation on the same warm container
then emitted the previous dimensions, dimension sets and metadata, and
with metrics disabled the metric values kept piling up.
Clear in a finally block so every flush resets the in-memory data.
Default dimensions are still restored by clear_metrics.
0 commit comments