Skip to main content

No project description provided

Project description

Muffin-Metrics – Send data to Graphite/StatsD from Muffin application.

Build Status Donate


  • python >= 3.3


Muffin-Metrics should be installed using pip:

pip install muffin-metrics


Add muffin_metrics to PLUGINS in your Muffin Application configuration.


METRICS_BACKENDS – Graphite backends in format ([])

    ('udp': 'udp://address:port'),
    ('tcp': 'tcp://address:port'),
    ('statsd_udp': 'udp+statsd://address:port'),
    ('statsd_tcp': 'tcp+statsd://address:port'),

METRICS_DEFAULT – Default backend (None)

METRICS_FAIL_SILENTLY – Don’t raise connection’s exceptions (False)

METRICS_MAXUDPSIZE – Max size of UDP message (512)

METRICS_PREFIX – Prefix for metrics (muffin.)


def my_view(request):
    # Context manager (group metrics to pipeline and send them as one message)
    with (yield from as metrics:
        metrics.send(42, path='')
        # ...
        metrics.send(31, path='some.some')

    # Send data
    yield from, path='one.hungred', backend='mybackend')

    # Create client and send data
    metrics = yield from'tcp')
    metrics.send('twenty.four', 24)

    # Send data to statsd
    with (yield from'statsd_tcp')) as client:
        client.incr('request.method.%s' % request.method)
        client.incr('response.status.%s' % response.status)

Bug tracker

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at


Development of Muffin-Metrics happens at:


  • klen (Kirill Klenov)


Licensed under a MIT license.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
muffin_metrics-0.1.4-py3-none-any.whl (7.0 kB) Copy SHA256 hash SHA256 Wheel py3
muffin-metrics-0.1.4.tar.gz (6.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page