Browse Source

HOT-FIX: Add Prometheus metrics

pull/3623/head
Edward Ribeiro 2 years ago
parent
commit
af60efa365
  1. 4
      sapl/settings.py
  2. 2
      sapl/urls.py

4
sapl/settings.py

@ -93,6 +93,8 @@ INSTALLED_APPS = (
'webpack_loader',
'django_prometheus',
) + SAPL_APPS
# FTS = Full Text Search
@ -123,6 +125,7 @@ HAYSTACK_CONNECTIONS = {
}
MIDDLEWARE = [
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
@ -132,6 +135,7 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware',
]
if DEBUG:
INSTALLED_APPS += ('debug_toolbar',)

2
sapl/urls.py

@ -69,6 +69,8 @@ urlpatterns += [
path("robots.txt", TemplateView.as_view(
template_name="robots.txt", content_type="text/plain")),
path('prometheus/', include('django_prometheus.urls')),
]

Loading…
Cancel
Save