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

Backward compatiblity with older redis versions #133

Closed drieschel closed 9 months ago

drieschel commented 10 months ago

Hi there!

This PR adds backward compatiblity with redis versions lower 5. Wiping the redis storage did not work without the added command redis.replicate_commands().

According to the redis documentation this command is deprecated in redis 7 but it still exists for backward compatiblity with older redis versions (see here).

We are using a redis 4 cluster and cannot upgrade it easily. So this MR helps us to get this component running without changing it externally.

Also others seem to have the same problem, ie #130 .

drieschel commented 10 months ago

Will it work when another redis version to the redis-version matrix in .github/workflows/tests.yml is added?

drieschel commented 9 months ago

@LKaemmerling Do you miss something here? Would be great if we can have an open conversation about this MR. Would love to see it merged soon. Our metrics are growing and it is actually not possible to reset the counters on application level for us.

LKaemmerling commented 9 months ago

Sorry for the late reply, i'm actually quite busy and the only one who tries to look over this.

Will it work when another redis version to the redis-version matrix in .github/workflows/tests.yml is added?

@drieschel yes this should work. You can try it.

LKaemmerling commented 9 months ago

Thank you!

drieschel commented 9 months ago

Thanks to you @LKaemmerling.