class statsd.connection.Connection(host=None, port=None, sample_rate=None)

Statsd Connection

  • host – The statsd host to connect to, defaults to localhost
  • port – The statsd port to connect to, defaults to 8125
  • sample_rate – The sample rate, defaults to 1 (meaning always)
send(data, sample_rate=None)

Send the data over UDP while taking the sample_rate in account

The sample rate should be a number between 0 and 1 which indicates the probability that a message will be sent. The sample_rate is also communicated to statsd so it knows what multiplier to use.

Project Versions

Previous topic

Statsd Module Reference

Next topic


This Page