From 6b7ce7a55d60441284e66e2e210e2fdf78f607ad Mon Sep 17 00:00:00 2001 From: "pavel.chi" Date: Mon, 13 Feb 2023 16:46:38 +0300 Subject: [PATCH] Fix redis connection --- src/Repositories/PrometheusRepository/Installer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Repositories/PrometheusRepository/Installer.php b/src/Repositories/PrometheusRepository/Installer.php index 1d1cf5f..4dc39d8 100644 --- a/src/Repositories/PrometheusRepository/Installer.php +++ b/src/Repositories/PrometheusRepository/Installer.php @@ -23,8 +23,10 @@ public function install(array $config): void $this->app->singleton(PrometheusRepositoryContract::class, function () use ($config) { /** @var RedisManager $redisManager */ $redisManager = $this->app->make(RedisManager::class); + $connection = $config['connections']['prometheus']['redis']; + $redis = $redisManager->connection($connection)->client(); - $storage = Redis::fromExistingConnection($redisManager->client()); + $storage = Redis::fromExistingConnection($redis); $registry = new CollectorRegistry($storage, false); return new PrometheusRepository($registry, $config);