PromPHP / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
415 stars 91 forks source link

Predis support? #156

Open matheusbento opened 2 months ago

matheusbento commented 2 months ago

I'm using Predis on my laravel, I tried to use something like this:

$connection = $this->app->make('redis')->connection(config('prometheus.redis'))->client();
$adapter = Redis::fromExistingConnection($connection);
$registry = new CollectorRegistry($adapter, false);
$renderer = new RenderTextFormat();
$result = $renderer->render($registry->getMetricFamilySamples());
return response()->json(['data' => $result]);

its saying that is not possible to convert Predis to Redis, but I would like to continue working with Predis,

What can I do to keep using this lib?