DataDog / datadogpy

The Datadog Python library
https://datadoghq.com/
Other
609 stars 302 forks source link

[statsd] Disable statsd buffering by default #692

Closed sgnn7 closed 2 years ago

sgnn7 commented 2 years ago

What does this PR do?

Due to impact on users of other clients where buffering was enabled by default, especially in environments and frameworks where fork() is used we will for the time being disable buffering by default until a decision is made on the path forward. Buffering can still be turned on with disable_buffering = False flag it's just that for now it is defaulted to True.

Description of the Change

Alternate Designs

In discussion (TBD). We may revert this and use automated ways to detect environments that are incompatible to thread-based buffering.

Possible Drawbacks

Lower performance in high-throughput environments.

Verification Process

Unit tests cover most of this:

python$(python --version 2>&1 | cut -c8-8)" -m unittest -vvv tests.unit.dogstatsd.test_statsd

Additional Notes

This change may be reversed in the future but for now, the risk is too high for user disruption.

Release Notes

Disable statsd buffering by default. Buffering can be enabled with disable_buffering = False flag.

Note: Since this is just a partial revert of https://github.com/DataDog/datadogpy/pull/670, removal of both release notes can be done as it's a net-0 change

Review checklist (to be filled by reviewers)

sgnn7 commented 2 years ago

/azp run

azure-pipelines[bot] commented 2 years ago
Azure Pipelines successfully started running 2 pipeline(s).
therve commented 2 years ago

/azp run

azure-pipelines[bot] commented 2 years ago
Azure Pipelines successfully started running 2 pipeline(s).