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.3.win-amd64.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d9507651cf7278ca7a1866d6f82249e9802773ebb23560bb943c707a93fd50d |
|
MD5 | 8892a87379079be642c08c82a7741b72 |
|
BLAKE2b-256 | b7cbb10538b4410cad46468a809ef2c692763a171be174d9425af11238bd98b1 |
Close
Hashes for flask_satella_metrics-1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f573049cb515b24c156d3a12186d17ce1f9fa6e0ac1751a59e6569a1dee977a |
|
MD5 | 09256767a2e116afcb9ff9af6bad10ba |
|
BLAKE2b-256 | 77f99dca2824cf87854d5c982df8f262eacdc88c37b8bf0cd6d2f4363cc0fb25 |