Skip to content

Instantly share code, notes, and snippets.

@remh
Created December 24, 2014 01:10
Show Gist options
  • Save remh/deed8245ba74784f51de to your computer and use it in GitHub Desktop.
Save remh/deed8245ba74784f51de to your computer and use it in GitHub Desktop.
--- /opt/datadog-agent/agent/dogstatsd.py 2013-11-25 21:25:21.000000000 +0000
+++ /opt/datadog-agent/agent/dogstatsd_debug.py 2013-12-09 23:26:36.000000000 +0000
@@ -254,6 +254,7 @@
ready = select_select(sock, [], [], timeout)
if ready[0]:
message = socket_recv(buffer_size)
+ log.info(message)
aggregator_submit(message)
if should_forward:
@remh
Copy link
Author

remh commented Dec 24, 2014

We don't have debug logging in dogstatsd as it can potentially receive a huge amount of data and logging the incoming udp packets will kill cpu/disk. Sometimes we need to see that data though when trying to debug dogstatsd submission, so here is a hacky way to do it.

To apply it:

cd /
curl https://gist.githubusercontent.com/remh/deed8245ba74784f51de/raw/de858c35e3e1bcfeca167a18483fffde79045ee1/dogstatsd_debug.py.patch | sudo patch -p 0
sudo service datadog-agent restart

Check the dogstatsd log (in /var/log/datadog/dogstatsd.log )

To undo it:

cd /
curl https://gist.githubusercontent.com/remh/deed8245ba74784f51de/raw/de858c35e3e1bcfeca167a18483fffde79045ee1/dogstatsd_debug.py.patch | sudo patch -p 0 -R
sudo service datadog-agent restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment