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.5.win-amd64.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7d4ffac5be7dffa79ef7980fcd4a640198c3d0a86a7a4edcc3cbc996f49e4ba |
|
MD5 | 10bdbc5aecff0a3954474900698074c7 |
|
BLAKE2b-256 | d414420bd9d7682875640fe39a2657565b8c16eb354d7db8287dd0110923c5b3 |
Close
Hashes for flask_satella_metrics-1.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcbe74bb49cd18c773b15f09bd9c8a49aa1686633057eb5b5040749ec1f07973 |
|
MD5 | ce0968900f6025039b709e9b6c70e72c |
|
BLAKE2b-256 | 6d42ce6ee23dd0cf2c236ea645680d96864709764618d0bbb74071b472a6ca6a |