Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (25 sloc) 1018 Bytes
import statsd
import datetime as dt
class Raw(statsd.Client):
'''Class to implement a statsd raw message.
If a service has already summarized its own
data for e.g. inspection purposes, use this
summarized data to send to a statsd that has
the raw patch, and this data will be sent
to graphite pretty much unchanged.
See for
more info.
def send(self, subname, value, timestamp=None):
'''Send the data to statsd via self.connection
:keyword subname: The subname to report the data to (appended to the
client name)
:keyword value: The raw value to send
if timestamp is None:
ts = int("%s"))
ts = timestamp
name = self._get_name(, subname)'%s: %s %s' % (name, value, ts))
return statsd.Client._send(self, {name: '%s %s|r' % (value, ts)})
Jump to Line
Something went wrong with that request. Please try again.