Adds newline (\n) to all packets sent to the DogStatsd endpoint
Description of the Change
To prevent processing of packets that are incomplete by the time they
reach the server for whatever reason, we now add a newline to end of
all of our packets so that the server can recognize and discard partial
messages/metrics.
Alternate Designs
Possible Drawbacks
One character additionally sent with each packet (minimal impact on buffered clients)
Verification Process
Run the test suite (python3 -m unittest -vvv tests.unit.dogstatsd.test_statsd.TestDogStatsd)
Alternatively:
Start a fake statsd server on a separate terminal (./tests/util/fake_statsd_server.py UDP)
Send a metric and ensure it has a newline at the end on the server's received packet output:
What does this PR do?
Adds newline (
\n
) to all packets sent to the DogStatsd endpointDescription of the Change
To prevent processing of packets that are incomplete by the time they reach the server for whatever reason, we now add a newline to end of all of our packets so that the server can recognize and discard partial messages/metrics.
Alternate Designs
Possible Drawbacks
One character additionally sent with each packet (minimal impact on buffered clients)
Verification Process
python3 -m unittest -vvv tests.unit.dogstatsd.test_statsd.TestDogStatsd
)Alternatively:
./tests/util/fake_statsd_server.py UDP
)Additional Notes
Release Notes
N/A
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.