Skip to content

Commit 6b7ce7a

Browse files
author
pavel.chi
committed
Fix redis connection
1 parent 54852fb commit 6b7ce7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Repositories/PrometheusRepository/Installer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ public function install(array $config): void
2323
$this->app->singleton(PrometheusRepositoryContract::class, function () use ($config) {
2424
/** @var RedisManager $redisManager */
2525
$redisManager = $this->app->make(RedisManager::class);
26+
$connection = $config['connections']['prometheus']['redis'];
27+
$redis = $redisManager->connection($connection)->client();
2628

27-
$storage = Redis::fromExistingConnection($redisManager->client());
29+
$storage = Redis::fromExistingConnection($redis);
2830
$registry = new CollectorRegistry($storage, false);
2931

3032
return new PrometheusRepository($registry, $config);

0 commit comments

Comments
 (0)