We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4337a1e commit f2bd661Copy full SHA for f2bd661
django_prometheus/exports.py
@@ -42,8 +42,11 @@ def SetupPrometheusEndpointOnPort(port, addr=""):
42
"autoreloader is active. Use the URL exporter, or start django "
43
"with --noreload. See documentation/exports.md."
44
)
45
+
46
+ registry = prometheus_client.CollectorRegistry()
47
+ prometheus_client.MultiProcessCollector(registry)
48
try:
- prometheus_client.start_http_server(port, addr=addr)
49
+ prometheus_client.start_http_server(port, addr=addr, registry=registry)
50
except OSError:
51
"""
52
first process serves metrics on port 8001, other processes raise error: port already in use
0 commit comments