# django-commons/django-prometheus

Export Django monitoring metrics for Prometheus.io

Repository: https://github.com/django-commons/django-prometheus
Canonical: https://ross.abutalabs.com/products/django-prometheus
Language: Python
License: Apache-2.0
License Family: permissive
Topics: prometheus, django, django-prometheus, python, monitoring, exported-metrics, metrics, prometheus-client
Last push: 2026-07-30T16:35:54+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 62, longevity 100
- inputs: {"age_days": 4168, "days_push": 34, "days_rel": 99, "gap_med": 170.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1665, forks 265 (observed 2026-08-28T04:05:19.071821+00:00)

## What it is
A Django app that exports Prometheus metrics for HTTP requests/responses, Django ORM database access, and Django cache operations. It integrates via middleware and URL routing to expose a /metrics endpoint for Prometheus scraping.

## Use cases
- monitor django application metrics with prometheus
- export request latency histograms from a django app
- track django orm database query metrics
- instrument django cache hits and misses for prometheus
- expose a /metrics endpoint in django for prometheus scraping
- add custom latency buckets for django request monitoring
- namespace django prometheus metrics per project

## When to choose
- you run Django 4.2+ on Python 3.9+ and want Prometheus metrics with minimal setup
- you need request, ORM, and cache metrics out of the box via middleware
- you want configurable latency histogram buckets and metric namespaces

## When to avoid
- your stack is not Django (e.g., Flask, FastAPI, or a non-Python service)
- you need metrics for non-Django ORM databases or non-Django cache backends
- you want a full observability suite with dashboards and alerting rather than metric export

## Facets
- artifact type: library
- maturity: active
- function: monitoring, middleware, http-server
- domain: monitoring, web-development, backend
- platform: python
- tags: prometheus, django, metrics, observability, instrumentation, django-middleware, prometheus-client, histogram-buckets, devops, web-server, docker

## Member repositories
- django-commons/django-prometheus (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:19.071821+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:44:25.920399+00:00, confidence not recorded.
  - readme: https://github.com/django-commons/django-prometheus (fetched 2026-08-28T04:05:19.071821+00:00, sha f5401c446413)
- Data as of 2026-08-30T08:39:29.467469+00:00.
