Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
exmaples: python: add gauges support
  • Loading branch information
SaveTheRbtz committed Dec 23, 2012
1 parent 422df23 commit 18c67ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/python_example.py
Expand Up @@ -30,6 +30,17 @@ def timing(self, stats, time):
stats = self.format(stats, time, self.SC_TIMING)
self.send(stats, self.addr)

def gauge(self, stats, value):
"""
Log gauges
>>> client = StatsdClient()
>>> client.gauge('example.gauge', 47)
>>> client.gauge(('example.gauge41', 'example.gauge43'), 47)
"""
stats = self.format(stats, value, self.SC_GAUGE)
self.send(stats, self.addr)

def increment(self, stats, sample_rate=1):
"""
Increments one or more stats counters
Expand Down

0 comments on commit 18c67ab

Please sign in to comment.