Browse Source

fix(api): use API of prometheus-client 0.8.0

Summary of why this is necessary: https://github.com/korfuri/django-prometheus/issues/219

Upstream change that caused it: https://github.com/prometheus/client_python/blob/v0.8.0/prometheus_client/values.py vs
https://github.com/prometheus/client_python/blob/v7.1.0/prometheus_client/values.py
Commit: https://github.com/prometheus/client_python/commit/ce7063fc2957716aa6fa9dc4f49bd970ad1249ed
Nils Wisiol 5 years ago
parent
commit
c350aef44f
2 changed files with 2 additions and 1 deletions
  1. 1 1
      api/api/settings.py
  2. 1 0
      api/requirements.txt

+ 1 - 1
api/api/settings.py

@@ -224,7 +224,7 @@ except ImportError:
 else:
     import prometheus_client
     prometheus_client.values.ValueClass = prometheus_client.values.MultiProcessValue(
-        _pidFunc=uwsgi.worker_id)
+        process_identifier=uwsgi.worker_id)
 
 if DEBUG and not EMAIL_HOST:
     EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'

+ 1 - 0
api/requirements.txt

@@ -10,6 +10,7 @@ django-prometheus~=2.0.0
 dnspython~=1.16.0
 httpretty~=0.9.0
 mysqlclient~=1.4.0
+prometheus-client~=0.8.0  # added to control django-prometheus' dependency version
 psl-dns~=1.0
 pylibmc~=1.6.1
 requests~=2.23.0