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.1.win-amd64.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dee9968d200eaaf1c0f8fc7fd474d8965ee8a488d7de1c3285d3b60c66fc5bb |
|
MD5 | 3b804b4116e5a06182378e2afad01615 |
|
BLAKE2b-256 | eee1bf6498ca948f8e941beb0f73290f374946eb1c69af8ea4ec26ef2d8df54f |
Close
Hashes for flask_satella_metrics-1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72253280ab7f28f77cb715ddcace55b12d8954f6ddd72e8f44e665b9a97f68fc |
|
MD5 | c704c6cbe499b91e7c427ca4fa18553d |
|
BLAKE2b-256 | 80afb055df17cc0a55eb64703cc5555abe60b79fbb1986be3b6d38783e79eb64 |