From e57a43eafad85f0c72a48ebc3396c9367796dbaf Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 23 Sep 2021 23:16:31 +0200 Subject: [PATCH] Correct capitalization of environment variable name. When I initially deployed this, I used an uppercase variable name as later versions of the Prometheus client library (all of which I am using in various of my projects) switched to uppercase and deprecated the old way of specifying this variable. Unfortunately the `django-prometheus` library uses a lowercase variable to check whether the multiprocess mode is in use, so we were collecting per-worker metrics the entire time, which completely messed up our time series. --- namespaces/default/site/deployment.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/namespaces/default/site/deployment.yaml b/namespaces/default/site/deployment.yaml index 2ff829b..c528dba 100644 --- a/namespaces/default/site/deployment.yaml +++ b/namespaces/default/site/deployment.yaml @@ -48,7 +48,9 @@ spec: cpu: 250m memory: 400Mi env: - - name: PROMETHEUS_MULTIPROC_DIR + # Needs to match with the variable name being read in django-prometheus + # https://github.com/korfuri/django-prometheus/blob/434a3ba36bdada45c9633451f5f6cfd145814ccf/django_prometheus/exports.py#L119 + - name: prometheus_multiproc_dir value: /tmp envFrom: - secretRef: