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.2.win-amd64.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb9847c25f8e1afa2769a701b5e2997e7b77dac3c3a926b133d240492cf87246 |
|
MD5 | 0a8691368f6239af6b37fafdb24d3c6f |
|
BLAKE2b-256 | 9b4cb5d1800f7c900275133d45da83c8214dfd3842f755da4fcccc2ae4fcc3a6 |
Close
Hashes for flask_satella_metrics-1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cdc99e8c0c6736f7f3074bed883c77fef53b4366ff8ef8998a19bff2138f220 |
|
MD5 | 7ee6f0b90aba2018a1071f2f5f9ac3fe |
|
BLAKE2b-256 | 5050aa515361cc27af92dde003d07552773442e4e7dcd8f6ef464cf22fb60722 |