Skip to main content

A library to metric your Flask app using Satella

Project description

flask-satella-metrics

Build Status Test Coverage Code Climate Issue Count PyPI PyPI version PyPI

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

flask_satella_metrics-1.5.1-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file flask_satella_metrics-1.5.1-py2.py3-none-any.whl.

File metadata

  • Download URL: flask_satella_metrics-1.5.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.4 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

Hashes for flask_satella_metrics-1.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2c8140663d0d5d08762a775872f405fbfecf060fa99494538d92638d62362a3f
MD5 a309079c6f8a12c48422a6268b6ac2bf
BLAKE2b-256 1eb5ec4940f6e7144a39eb9b351b871e3e81277508b142c5f05665301dfa995a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page