Skip to main content

fw-http-metrics

FastAPI middleware for collecting and exposing Prometheus metrics.

Installation

Add as a poetry dependency to your project:

poetry add fw-http-metrics

Usage

from fastapi import FastAPI
from fw_http_metrics import MetricsMiddleware, get_metrics

app = FastAPI()
app.add_middleware(MetricsMiddleware)
app.add_route("/metrics", get_metrics)

Development

Install the project using poetry and enable pre-commit:

poetry install
pre-commit install

License

MIT

Metadata

Release files for fw-http-metrics 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fw-http-metrics 0.2.0
File Interpreter ABI Platform
fw_http_metrics-0.2.0-py3-none-any.whl Python 3 none any Details

Release files / fw_http_metrics-0.2.0-py3-none-any.whl

Download URL fw_http_metrics-0.2.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a37db4dfe182afa1c4547fb9558c07298836ca0fba61c031872d778cec681c29
BLAKE2b-256 checksum
How to use checksums
063dd595486c800a4aa02dc4311acced88866571261b9c8943be8334c16b3d3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.8 Linux/5.4.109+

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page