File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
microbootstrap/bootstrappers Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -76,20 +76,19 @@ def is_ready(self) -> bool:
7676 return bool (self .instrument_config .prometheus_middleware_cls and super ().is_ready ())
7777
7878 def bootstrap_before (self ) -> dict [str , typing .Any ]:
79- self .collector_registry = prometheus_client .CollectorRegistry ()
8079 return {
8180 "asgi_routes" : (
8281 (
8382 self .instrument_config .prometheus_metrics_path ,
84- prometheus_client .make_asgi_app (self . collector_registry ),
83+ prometheus_client .make_asgi_app (prometheus_client . REGISTRY ),
8584 ),
8685 )
8786 }
8887
8988 def bootstrap_after (self , application : AsgiFastStream ) -> AsgiFastStream : # type: ignore[override]
9089 if self .instrument_config .prometheus_middleware_cls and application .broker :
9190 application .broker .add_middleware (
92- self .instrument_config .prometheus_middleware_cls (registry = self . collector_registry )
91+ self .instrument_config .prometheus_middleware_cls (registry = prometheus_client . REGISTRY )
9392 )
9493 return application
9594
You can’t perform that action at this time.
0 commit comments