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
File details
Details for the file flask-satella-metrics-1.5.win-amd64.zip
.
File metadata
- Download URL: flask-satella-metrics-1.5.win-amd64.zip
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7d4ffac5be7dffa79ef7980fcd4a640198c3d0a86a7a4edcc3cbc996f49e4ba |
|
MD5 | 10bdbc5aecff0a3954474900698074c7 |
|
BLAKE2b-256 | d414420bd9d7682875640fe39a2657565b8c16eb354d7db8287dd0110923c5b3 |
File details
Details for the file flask_satella_metrics-1.5-py2.py3-none-any.whl
.
File metadata
- Download URL: flask_satella_metrics-1.5-py2.py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcbe74bb49cd18c773b15f09bd9c8a49aa1686633057eb5b5040749ec1f07973 |
|
MD5 | ce0968900f6025039b709e9b6c70e72c |
|
BLAKE2b-256 | 6d42ce6ee23dd0cf2c236ea645680d96864709764618d0bbb74071b472a6ca6a |