Skip to main content

A library to metric your FastAPI app using Satella

Project description


Build Status Test Coverage Maintainability Issue Count PyPI PyPI version PyPI

fastapi-satella-metrics is an application to seamlessly measure your FastAPI application using Satella's metrics.

Example use:

import fastapi
from fastapi_satella_metrics import SatellaMetricsMiddleware
app = fastapi.FastAPI()

And to launch a Prometheus exporter use the following snippet:

from satella.instrumentation.metrics.exporters import PrometheusHTTPExporterThread
phet = PrometheusHTTPExporterThread('', 8080, {'service_name': 'my_service'})

Or, if you desire to export your metrics within Flask, just use:

import fastapi
from fastapi_satella_metrics import PrometheusExporter
app = fastapi.FastAPI()
PrometheusExporter(app, {'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.

Files for fastapi-satella-metrics, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size fastapi_satella_metrics-1.0.2-py2.py3-none-any.whl (4.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page