Coder Social home page Coder Social logo

swift-informant's Introduction

Swift Informant - Build Status

Swift Proxy Middleware to send events to a statsd instance.

After the request has been serviced (using a event posthook) it will fire a statsd counter incrementing the request method's status code. It breaks these up by whether the request was an operation on an Account, Container, or an Object. In addition to the counter a timer event is fired for the request duration of the event, as well as counter for bytes transferred.

Counter Sample:

obj.GET.200:1|c

Timer Sample:

duration.acct.GET.200:140|ms

Bytes Transferred Sample:

tfer.obj.PUT.201 2423.9

To enable, load informant as the first pipeline entry (even before catcherrors):

pipeline = informant catch_errors healthcheck cache ratelimit proxy-server

And add the following filter config:

[filter:informant]
use = egg:informant#informant
# statsd_host = 127.0.0.1
# statsd_port = 8125
# standard statsd sample rate 0.0 <= 1
# statsd_sample_rate = 0.5
# list of allowed methods, all others will generate a "BAD_METHOD" event
# valid_http_methods = GET,HEAD,POST,PUT,DELETE,COPY
# send multiple statsd events per packet as supported by statsdpy
# combined_events = no
# They key used to combine events for reporting to statsd, alternate
# versions used a # to seperate events. The offical way is by newline
# combine_key = \n
# prepends name to metric collection output for easier recognition, e.g. company.swift.
# metric_name_prepend =

The commented out values are the defaults. This module does not require any additional statsd client modules.

To utilize combined_events you'll need to run a statsd server that supports mulitple events per packet such as statsdpy

Building packages

Clone the version you want and build the package with stdeb:

git clone [email protected]:pandemicsyn/swift-informant.git informant-0.0.8
cd informant-0.0.8
git checkout 0.0.8
python setup.py --command-packages=stdeb.command bdist_deb
dpkg -i deb_dist/python-informant_0.0.8-1_all.deb

swift-informant's People

Contributors

notmyname avatar pandemicsyn avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.