Skip to content

Commit

Permalink
Merge pull request #5 from umbrellio/redis-prefix
Browse files Browse the repository at this point in the history
Remove redis prefix if it exists
  • Loading branch information
dezone authored Mar 15, 2023
2 parents 838be3e + 1d120ab commit f4ac794
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Repositories/PrometheusRepository/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Support\Facades\Route;
use Prometheus\CollectorRegistry;
use Prometheus\Storage\Redis;
use Redis as NativeRedis;
use Umbrellio\EventTracker\Repositories\BaseRepositoryInstaller;

class Installer extends BaseRepositoryInstaller
Expand All @@ -26,6 +27,7 @@ public function install(array $config): void
$connection = $config['connections']['prometheus']['redis'];
$redis = $redisManager->connection($connection)
->client();
$redis->setOption(NativeRedis::OPT_PREFIX, '');

$storage = Redis::fromExistingConnection($redis);
$registry = new CollectorRegistry($storage, false);
Expand Down

0 comments on commit f4ac794

Please sign in to comment.