{"repo":"django-commons/django-prometheus","free":true,"listed":false,"github":"https://github.com/django-commons/django-prometheus","clone":"git clone https://github.com/django-commons/django-prometheus.git","description":"Export Django monitoring metrics for Prometheus.io","language":"Python","stars":1662,"topics":["prometheus","django","django-prometheus","python","monitoring","exported-metrics","metrics","prometheus-client"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"django-prometheus Export Django monitoring metrics for Prometheus.io Features This library provides Prometheus metrics for Django related operations: Requests & Responses Database access done via Django ORM Cache access done via Django Cache framework Metrics Reference For a detailed list and explanation of all metrics exported by this library, see documentation/metrics.md. Usage Requirements Django = 4.2 Python 3.9 and above. Installation Install with: Or, if you're using a development version cloned from this repository: This will install prometheus client as a dependency. Quickstart In your settings.py: In your urls.py: Configuration Prometheus uses Histogram based grouping for monitoring latencies. The default buckets are: You can define custom buckets for latency, adding more buckets decreases performance but increases accuracy: --- You can have a custom namespace for your metrics: This will prefix all metrics with project word like this: Monitoring your databases SQLite, MySQL, and PostgreSQL databases can be monitored. Just replace the ENGINE property of your database, replacing django.db.backends with django prometheus.db.backends . Monitoring your caches Filebased, memcached, redis caches can be monitored. Just replace the cache backend to use the one provided by django prometheus django.core.cache.backends with django prometheus.cache.backends . Monitoring your models You may want to monitor the creation/deletion/update rate for your model. This can be done by addin","default_branch":null,"files":null,"tree":[],"storefront":"/r/django-commons","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/django-commons/django-prometheus/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}