Fix: #222. Support custom registry for MetricsHandler. (#223) · pythonAI/client_python@24d4d95 · GitHub
Skip to content

Commit 24d4d95

Browse files
ioggstreambrian-brazil
authored andcommitted
Fix: prometheus#222. Support custom registry for MetricsHandler. (prometheus#223)
Pass a registry to start_http_server via a MetricsHandler factory implemented as a staticmethod of the existing class.
1 parent 9828994 commit 24d4d95

3 files changed

Lines changed: 26 additions & 4 deletions

File tree

prometheus_client/exposition.py

Lines changed: 20 additions & 3 deletions

prometheus_client/multiprocess.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from . import core
1111

12+
1213
class MultiProcessCollector(object):
1314
"""Collector for files for multi-process mode."""
1415
def __init__(self, registry, path=None):

tests/test_exposition.py

Lines changed: 5 additions & 1 deletion

0 commit comments

Comments
 (0)