Skip to main content

Flask metrics in Carbon Statsd format.

Project description

Flask-Statsd

Generate and send Flask metrics in Graphite Carbon Format format.

Install

pip install flask-carbon-statsd

# Latest Code

pip install git+https://github.com/labeneator/flask_carbon_statsd.git

Usage Example

# myapp.py
from flask import Flask, Blueprint
from flask_carbon_statsd import FlaskCarbonStatsdTimerCounter

flask_metrics = FlaskCarbonStatsdTimerCounter(host='localhost', port=8125)


app = Flask(__name__)
flask_metrics.init_app(app)

# or
flask_metrics = FlaskCarbonStatsd(app=app, host='localhost', port=8125)

bp = Blueprint('dashboard', __name__)

@bp.route('/dashboard')
def index(device):
    return 'OK'

app.register_blueprint(bp)
  • Request /dashboard with FlaskCarbonStatsdTimer

    flask.carbon.statsd.dev.flask_template.app.local.LocalHost-3.dashboard.index.200:3.650904|ms
    
  • Request /dashboard with FlaskCarbonStatsdTimerCounter

    flask.carbon.statsd.dev.flask_template.app.local.LocalHost-3.dashboard.index.200:3.650904|ms
    flask.carbon.statsd.dev.flask_template.app.local.LocalHost-3.dashboard.index.200:1|c
    

Project details


Download files

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

Source Distribution

flask-carbon-statsd-0.1.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file flask-carbon-statsd-0.1.tar.gz.

File metadata

  • Download URL: flask-carbon-statsd-0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for flask-carbon-statsd-0.1.tar.gz
Algorithm Hash digest
SHA256 67a7f8831eed0e1124646db1cc599bf36cdbd2d80e304515e7a0c292e690a97f
MD5 9258d0a4f1ec8a84debe1b9b006eef3f
BLAKE2b-256 a164e7c5df8645e0c112cc505cf1147a825ac11642e6a906f8d95706f86e85f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page