Skip to content

Commit

Permalink
EL-1483 Add django metrics endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
starswan committed Apr 30, 2024
1 parent 92eca8e commit 27c8bb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions laalaa/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ def root(*x):
"rest_framework_gis",
"advisers",
"categories",
"django_prometheus",
)

MIDDLEWARE = (
"django_prometheus.middleware.PrometheusBeforeMiddleware",
"advisers.middleware.PingMiddleware",
"django.middleware.cache.UpdateCacheMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
Expand All @@ -74,6 +76,7 @@ def root(*x):
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.middleware.cache.FetchFromCacheMiddleware",
"django_prometheus.middleware.PrometheusAfterMiddleware",
)

ROOT_URLCONF = "laalaa.urls"
Expand Down
1 change: 1 addition & 0 deletions laalaa/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
url(r"^healthcheck.json$", never_cache(HealthcheckView.as_view()), name="healthcheck_json"),
url(r"^admin/", admin_site.urls),
url(r"^", include("advisers.urls")),
url("", include("django_prometheus.urls")),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ django==3.2.19
django-storages==1.13.1
djangorestframework-gis==0.15.0
djangorestframework==3.11.2
django-prometheus<3
logstash-formatter==0.5.9
psycopg2-binary==2.9.4
sentry-sdk==0.19.3
Expand Down

0 comments on commit 27c8bb6

Please sign in to comment.