@@ -292,7 +292,7 @@ protected function collectHistograms(): array
292292 sort ($ keys );
293293 $ histograms = [];
294294 foreach ($ keys as $ key ) {
295- $ raw = $ this ->redis ->hGetAll (ltrim ($ key , $ this ->redis ->prefix ( '' ) ));
295+ $ raw = $ this ->redis ->hGetAll (ltrim ($ key , $ this ->redis ->getOption (RedisClient:: OPT_PREFIX ) ?? '' ));
296296 if (! isset ($ raw ['__meta ' ])) {
297297 continue ;
298298 }
@@ -373,7 +373,7 @@ protected function removePrefixFromKey(string $key): string
373373 return $ key ;
374374 }
375375
376- return substr ($ key , strlen ($ this ->redis ->prefix ( '' )));
376+ return substr ($ key , strlen ($ this ->redis ->getOption (RedisClient:: OPT_PREFIX )));
377377 }
378378
379379 /**
@@ -483,7 +483,7 @@ protected function collectGauges(bool $sortMetrics = true): array
483483 sort ($ keys );
484484 $ gauges = [];
485485 foreach ($ keys as $ key ) {
486- $ raw = $ this ->redis ->hGetAll (ltrim ($ key , $ this ->redis ->prefix ( '' ) ));
486+ $ raw = $ this ->redis ->hGetAll (ltrim ($ key , $ this ->redis ->getOption (RedisClient:: OPT_PREFIX ) ?? '' ));
487487 if (! isset ($ raw ['__meta ' ])) {
488488 continue ;
489489 }
@@ -525,7 +525,7 @@ protected function collectCounters(bool $sortMetrics = true): array
525525 sort ($ keys );
526526 $ counters = [];
527527 foreach ($ keys as $ key ) {
528- $ raw = $ this ->redis ->hGetAll (ltrim ($ key , $ this ->redis ->prefix ( '' ) ));
528+ $ raw = $ this ->redis ->hGetAll (ltrim ($ key , $ this ->redis ->getOption (RedisClient:: OPT_PREFIX ) ?? '' ));
529529 if (! isset ($ raw ['__meta ' ])) {
530530 continue ;
531531 }
0 commit comments