aiostats

Statsd utility for Python 3’s asyncio

API

class aiostats.StatsD(loop, hostname, host, port, prefix, app_prefix='app')[source]

Sends statistics to the stats daemon over UDP

decrement(stats, sample_rate=1)[source]

Decrements one or more stats counters

>>> # noinspection PyUnresolvedReferences
>>> decrement('some.int')
gauge(stats, value, sample_rate=1)[source]

Sets one or more gauges to a value

>>> # noinspection PyUnresolvedReferences
>>> gauge('some.int', 'some_value')
increment(stats, sample_rate=1)[source]

Increments one or more stats counters

>>> # noinspection PyUnresolvedReferences
>>> increment('some.int')
>>> # noinspection PyUnresolvedReferences
>>> increment('some.int', 0.5)
protocol = None
timing(stats, time, sample_rate=1)[source]

Log timing information

>>> # noinspection PyUnresolvedReferences
>>> timing('some.time', '500')
update_stats(stats, delta=1, sample_rate=1, metric='c')[source]

Updates one or more stats counters by arbitrary amounts

>>> # noinspection PyUnresolvedReferences
>>> update_stats('some.int', 10)
class aiostats.WrappedStatsD(*args, **kwargs)[source]

Sends statistics to the stats daemon over UDP

increment(stats, sample_rate=1)[source]

Increments one or more stats counters

>>> # noinspection PyUnresolvedReferences
>>> increment('some.int')
>>> # noinspection PyUnresolvedReferences
>>> increment('some.int', 0.5)
timing(stats, time, sample_rate=1)[source]

Log timing information

>>> # noinspection PyUnresolvedReferences
>>> timing('some.time', '500')
update_stats(stats, delta=1, sample_rate=1, metric='c')[source]

Updates one or more stats counters by arbitrary amounts

>>> # noinspection PyUnresolvedReferences
>>> update_stats('some.int', 10)

Dependencies

  • micro.di

Indices and tables