DataDog / datadogpy

The Datadog Python library
https://datadoghq.com/
Other
605 stars 303 forks source link

Fix potential metric loss when open_buffer is combined with disable_buffering=False #820

Closed vickenty closed 3 months ago

vickenty commented 3 months ago

What does this PR do?

Fix potential metric loss when open_buffer is combined with disable_buffering=False.

Description of the Change

Remove call to _reset_buffer from open_buffer.

When disable_buffering=False, the buffer may contain still unsent metrics, which are lost when we reset the buffer.

Alternate Designs

Possible Drawbacks

Verification Process

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)