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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file flask_satella_metrics-1.6.0a1-py2.py3-none-any.whl
.
File metadata
- Download URL: flask_satella_metrics-1.6.0a1-py2.py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d8cd0f4e1c08795cb4f54be050f7ef9a11790df1923ec0f875ab68a0c4b5285 |
|
MD5 | b115ceaa72cf21f4c886df5983d23bed |
|
BLAKE2b-256 | d1332c593cdf9f3ad380f328b59d73d7f8e8735d0fc0e7f250fb5528719dfb4f |