File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,17 +84,22 @@ def startup(self) -> None:
8484 This function starts prometheus server.
8585 It starts it only in case if it's a worker process.
8686 """
87- from prometheus_client import REGISTRY , start_http_server # noqa: PLC0415
87+ from prometheus_client import ( # noqa: PLC0415
88+ CollectorRegistry ,
89+ start_http_server ,
90+ )
8891 from prometheus_client .multiprocess import ( # noqa: PLC0415
8992 MultiProcessCollector ,
9093 )
9194
9295 if self .broker .is_worker_process :
9396 try :
94- MultiProcessCollector (REGISTRY )
97+ registry = CollectorRegistry ()
98+ MultiProcessCollector (registry )
9599 start_http_server (
96100 port = self .server_port ,
97101 addr = self .server_addr ,
102+ registry = registry ,
98103 )
99104 except OSError as exc :
100105 logger .debug ("Cannot start prometheus server: %s" , exc )
You can’t perform that action at this time.
0 commit comments