A library to metric your Flask app using Satella
Project description
flask-satella-metrics
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.
Source Distribution
Built Distribution
Close
Hashes for flask-satella-metrics-1.4.win-amd64.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | ced95921be9a83161c123d5f8bdadbf937fcbaa26e46b04462ea01e6b094cda5 |
|
MD5 | b8fb0a9eadeb1c8bad77136de17c1d6e |
|
BLAKE2b-256 | 8861307445fda93f679857830f594554bac851ca3cca9b207808219ae9f05d84 |
Close
Hashes for flask_satella_metrics-1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23808ab616213d3411710502fad44f14b7b0363f77ed230d8a346ae665476685 |
|
MD5 | 56e81236d958463008871efceef45de4 |
|
BLAKE2b-256 | 9aff333f46fc89d10758948e959723f170acfb784dcbd56bcb6cfa0a39ebfbea |