prometheus-flask-exporter
Prometheus metrics exporter for Flask
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you run Flask applications with Prometheus monitoring infrastructure already in place and need straightforward request-level metrics. The low install friction and permissive license make adoption easy. However, the aging maintenance status (521 days since last release) means you should verify compatibility with your Flask and Python versions before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with only two runtime dependencies (prometheus_client and flask).
- Maintenance status is aging—last release was 521 days ago, though the repository remains active with recent commits and 685 stars.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
last release 2025-03-11 (521 days) · last repo commit 2025-03-25 · 685 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,229,514 downloads/mo, #2,692 on PyPI
Alternatives
Verify before relying
from flask import Flask
from prometheus_flask_exporter import PrometheusMetrics
app = Flask(__name__)
metrics = PrometheusMetrics(app)
@app.route('/')
def main():
pass # requests tracked by default- Whether the package actively maintains compatibility with Flask versions beyond those listed in classifiers
- Performance overhead of metrics collection on high-throughput applications
What it is and what it does
Prometheus Flask exporter integrates Prometheus metrics collection directly into Flask applications. It automatically tracks HTTP request duration, request count, and uncaught exceptions using a Prometheus registry, exposing them on a `/metrics` endpoint by default. The library provides decorators to define custom metrics (counters, gauges, histograms, summaries) on individual endpoints and supports filtering which endpoints are tracked.
The package depends on prometheus_client for metric primitives and flask for the web framework. It's designed for applications that need observability into request patterns and performance without manual instrumentation of every endpoint. Configuration options allow changing the metrics endpoint path, registry, grouping strategy, and default labels applied to all metrics.
Use it for
- Monitor Flask application request latency and throughput in production environments with Prometheus scraping
- Track endpoint-specific metrics like request count by status code or custom business logic counters
- Exclude sensitive endpoints from metrics collection using decorators or regex path patterns
- Expose application version and metadata as static Prometheus gauge metrics
- Group request metrics by endpoint function name instead of URI path to reduce cardinality
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you run Flask applications with Prometheus monitoring infrastructure already in place and need straightforward request-level metrics. The low install friction and permissive license make adoption easy. However, the aging maintenance status (521 days since last release) means you should verify compatibility with your Flask and Python versions before committing to production use.
Install
prometheus-flask-exporter on PyPI
Before you install
Low friction install with only two runtime dependencies (prometheus_client and flask). Maintenance status is aging—last release was 521 days ago, though the repository remains active with recent commits and 685 stars.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
from flask import Flask
from prometheus_flask_exporter import PrometheusMetrics
app = Flask(__name__)
metrics = PrometheusMetrics(app)
@app.route('/')
def main():
pass # requests tracked by default
Verify before relying
- Whether the package actively maintains compatibility with Flask versions beyond those listed in classifiers
- Performance overhead of metrics collection on high-throughput applications
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesprometheus_clientflask |
| Maintenance | Aging 521 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,229,514 / month, #2,692 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Monitoring |
Evidence: prometheus_flask_exporter-0.23.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “flask prometheus metrics exporter”
- prometheus-flask-exporterExports HTTP request metrics from Flask applications to Prometheus,…
- opentelemetry-exporter-prometheus-remote-writeExports metrics from OpenTelemetry Python SDK directly to Prometheus…
- opentelemetry-exporter-prometheusExports OpenTelemetry metrics to Prometheus for scraping and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also airflow-exporter · prometheus-api-client · starlette-exporter · opentelemetry-exporter-prometheus · django-prometheus · prometheus-fastapi-instrumentator · opentelemetry-exporter-prometheus-remote-write · prometheus-async · prometheus-client · Flask-RESTful