Skip to main content

Tool for stream statistics to carbon daemon (from graphite)

Project description

Tools for serving statistic data to carbon/graphite server.

To install package into django need:

  • add ‘ua2.carbon.middleware.MeasureMiddleware’ at the top of MIDDLEWARE_CLASSES list
  • into settings.py add next lines:
from ua2.carbon.loaders import django_loader
django_loader()

Usage examples

Measure function execution time

from ua2 import carbon

@carbon.measure('myapp')
def test():
        print "Hello World!"

Measure arbitrary block execution time

from ua2 import carbon

def test():
        with carbon.Profiler('myapp'):
                for i in range(1,100):
                        print "Hello World!"

Send raw value to carbon

from ua2 import carbon

def test():
        for i in range(1,100):
                print "Hello World!"
                carbon.send('metric.hello.world', 1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ua2.carbon, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size ua2.carbon-0.0.4.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page