make this work with statsd and be awesome

Issue #3 open
created an issue

it would be great if this thing can work together with statsd

I can join this effort if needed

Comments (4)

  1. Boaz Leskes repo owner

    Sounds great and from what I see not to hard to report things to statsd.

    There is one conceptual hurdle - pycounters aggregates data and reports the average (max,min,total). From my understanding statsd does the same. What is a good way to send pycounters' data to statsd?

    Perhaps it would have if you write a short example for what you expect to send to statsd for the simple example mentioned in pycounters docs:

    from pycounters.shortcuts import frequency
    def f():
        """ some interesting work like serving a request """


    from pycounters.shortcuts import time
    def f():
        """ some interesting work like serving a request """
  2. Anonymous

    I haven't dive into the code of pycounters yet, but I would imagine decorators like @freQuency and @Георгий Милославский would send the collected data directly to statsd without doing any aggregations on the data if it's setup with statsd as reporter backend

    import pycounters

    and the reporter will sends data directly to statsd

  3. Boaz Leskes repo owner


    The suggested way will be hard to implement. The are two main reasons:

    1. The counters collect data they need based on the metrics they measure. This potentially mean they destroy the data which means we can't send it to statsd
    2. The save on performance and aggregation all reporters receive an aggregated output from all counters on all processes. This means that by the time the StatsReporter kicks in there is only aggregated data.


  4. Log in to comment