add basic prometheus metrics

This commit is contained in:
nghduc97 2024-05-02 01:12:14 +07:00
parent 1c2e5ff1ea
commit 8b024c6ee5
No known key found for this signature in database
3 changed files with 9 additions and 0 deletions

View File

@ -61,12 +61,17 @@ INSTALLED_APPS = [
# Apprise API
'api',
# Prometheus
'django_prometheus',
]
MIDDLEWARE = [
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'django.middleware.common.CommonMiddleware',
'core.middleware.theme.AutoThemeMiddleware',
'core.middleware.config.DetectConfigMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware',
]
ROOT_URLCONF = 'core.urls'

View File

@ -29,4 +29,5 @@ from api import urls as api_urls
urlpatterns = [
path('', include(api_urls)),
path('', include('django_prometheus.urls')),
]

View File

@ -24,3 +24,6 @@ requests
paho-mqtt < 2.0.0
gntp
cryptography
# prometheus metrics
django-prometheus