Skip to main content

A library to metric your Flask app using Satella

Project description

flask-satella-metrics

Build Status Test Coverage Code Climate Issue Count PyPI PyPI version PyPI

flask-satella-metrics is an application to seamlessly measure your Flask application using Satella's metrics.

Example use:

import flask
from flask_satella_metrics import SatellaMetricsMiddleware
app = flask.Flask(__name__)
SatellaMetricsMiddleware(app)

And to launch a Prometheus exporter use the following snippet:

from satella.instrumentation.metrics.exporters import PrometheusHTTPExporterThread
phet = PrometheusHTTPExporterThread('0.0.0.0', 8080, {'service_name': 'my_service'})
phet.start()

Or, if you desire to export your metrics within Flask, just use:

import flask
from flask_satella_metrics.prometheus_exporter import PrometheusExporter
app = flask.Flask(__name__)
app.register_blueprint(PrometheusExporter({'service_name': 'my_service'}))

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 flask-satella-metrics, version 1.4
Filename, size File type Python version Upload date Hashes
Filename, size flask_satella_metrics-1.4-py2.py3-none-any.whl (4.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size flask-satella-metrics-1.4.win-amd64.zip (7.0 kB) File type Source Python version None Upload date Hashes View

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 DigiCert DigiCert EV certificate StatusPage StatusPage Status page