$npx skillfedfor your agent

starlette-exporter

Prometheus metrics exporter for Starlette applications.

Worth itPyPI MonitoringReleased Jul 20261.9M downloads / moApache License 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — starlette_exporter-0.24.0-py3-none-any.whl
v0.24.0 · released 2026-07-29 · Python >=3.8 · 2 runtime deps: prometheus_client, starlette

Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a standard need for Prometheus monitoring of web applications. The permissive Apache 2.0 license poses no restrictions. Install it if you run Starlette and need Prometheus metrics without writing custom instrumentation.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with only two runtime dependencies (prometheus_client and starlette).
  • Actively maintained with recent releases; last commit 2026-07-29.

License · maintenance · safety

Apache License 2.0 (permissive) — Apache License 2.0 (permissive): you can use, modify, and distribute this package freely in commercial and open-source projects, provided you include a copy of the license and state significant changes.

last release 2026-07-29 (16 days) · last repo commit 2026-07-29 · 413 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,916,953 downloads/mo, #3,434 on PyPI

Verify before relying

pip install starlette_exporter

from starlette.applications import Starlette
from starlette_exporter import PrometheusMiddleware, handle_metrics

app = Starlette()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics", handle_metrics)
  • Whether the package works with all current versions of prometheus_client and starlette, or if specific version ranges are required.
  • Performance overhead of metric collection in high-throughput scenarios.
  • Compatibility with frameworks beyond Starlette (e.g., FastAPI) given only starlette is listed as a runtime dependency.
Same gist for agents: .md · .json

What it is and what it does

starlette_exporter is a middleware that automatically instruments Starlette applications to collect HTTP metrics compatible with Prometheus. It tracks three core metrics: total request count (starlette_requests_total), request duration distribution (starlette_request_duration_seconds), and concurrent requests in progress (starlette_requests_in_progress). Each metric is labeled by HTTP method, request path, and response status code, allowing fine-grained monitoring and alerting.

The middleware integrates as a standard Starlette middleware and exposes metrics via a /metrics endpoint that Prometheus can scrape. It supports customization through options like custom labels (static or request-derived), histogram bucket configuration, path grouping for cardinality control, and filtering or grouping of unhandled paths. It also provides helper functions to extract label values from request or response headers with cardinality constraints.

Use it for

  • Monitor request latency distribution and identify performance regressions in Starlette services.
  • Track concurrent request volume to detect capacity issues and inform auto-scaling decisions.
  • Add custom labels from headers to correlate metrics with deployment environment or tenant information.
  • Exclude health-check or probe endpoints from metrics collection to reduce noise and cardinality.
  • Integrate trace IDs as exemplars in Prometheus histograms to link metrics to distributed traces.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has no known vulnerabilities, low install friction, and solves a standard need for Prometheus monitoring of web applications. The permissive Apache 2.0 license poses no restrictions. Install it if you run Starlette and need Prometheus metrics without writing custom instrumentation.

Install

starlette-exporter on PyPI

Before you install

Low friction: pure Python wheel with only two runtime dependencies (prometheus_client and starlette). Actively maintained with recent releases; last commit 2026-07-29.

License in practice

Apache License 2.0 (permissive): you can use, modify, and distribute this package freely in commercial and open-source projects, provided you include a copy of the license and state significant changes.

Quickstart

pip install starlette_exporter

from starlette.applications import Starlette
from starlette_exporter import PrometheusMiddleware, handle_metrics

app = Starlette()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics", handle_metrics)

Verify before relying

  • Whether the package works with all current versions of prometheus_client and starlette, or if specific version ranges are required.
  • Performance overhead of metric collection in high-throughput scenarios.
  • Compatibility with frameworks beyond Starlette (e.g., FastAPI) given only starlette is listed as a runtime dependency.

Package facts

LicenseApache License 2.0 permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
prometheus_clientstarlette
MaintenanceActively maintained 16 days since the last release
Last repo commit
First released
Downloads1,916,953 / month, #3,434 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: starlette_exporter-0.24.0-py3-none-any.whl

Tags

Capabilities
prometheus metrics starletterequest monitoring middlewarehttp metrics exporterprometheus histogram counter gaugeapplication performance metricsstarlette middleware monitoringweb framework instrumentation
Topics
prometheusobservabilitymiddleware

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 › “request monitoring middleware”

Give your agent the search over MCP, or paste the wish link into any chat.

More Monitoring packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

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.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
opentelemetry-semantic-conventions Worth it
PyPI · Monitoring · released Jul 2026

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.

Apache-2.0pure Python · 3.10+
542.9Mdownloads / mo
opentelemetry-sdk Worth it
PyPI · Monitoring · released Jul 2026

Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.

Apache-2.0pure Python · 3.10+
521.8Mdownloads / mo
opentelemetry-api With conditions
PyPI · Monitoring · released Jul 2026

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.

Apache-2.0pure Python · 3.10+
463.8Mdownloads / mo
opentelemetry-exporter-otlp-proto-http Worth it
PyPI · Monitoring · released Jul 2026

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.

Apache-2.0pure Python · 3.10+
409.9Mdownloads / mo
opentelemetry-instrumentation Worth it
PyPI · Monitoring · released Jul 2026

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.

Apache-2.0pure Python · 3.10+
393.5Mdownloads / mo

See also aioprometheus · prometheus-fastapi-instrumentator · starlette-prometheus · prometheus-flask-exporter · airflow-exporter · django-prometheus · opentelemetry-exporter-prometheus · prometheus-client · starlette-compress · fastapi-healthchecks