Skip to content

Commit

Permalink
Fix redis connection
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel.chi committed Feb 13, 2023
1 parent 54852fb commit 6b7ce7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Repositories/PrometheusRepository/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6b7ce7a

Please sign in to comment.