Skip to content

Commit

Permalink
Merge pull request #3 from umbrellio/redis-connection-fix
Browse files Browse the repository at this point in the history
Fix redis connection
  • Loading branch information
lazeevv authored Feb 14, 2023
2 parents 54852fb + 8a136cc commit a652c74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Repositories/PrometheusRepository/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ 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 a652c74

Please sign in to comment.