Jimdo / prometheus_client_php

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

Flush only metric data from Redis instead of complete server #81

Open jlis opened 6 years ago

jlis commented 6 years ago

How it currently behaves: After the flushRedis() method is called, the complete Redis server incl. all databases is flushed using FLUSHALL. One dedicated Redis server/cluster is required to use the Redis adapter.

How it should behave: Only the metric data (the keys and the actual metrics) are deleted via a LUA script. A shared Redis server/cluster can be used for collecting metrics using the Redis adapter.

I also switched from PHPUnit 4.1.0 to ~5.7 since >=PHP 5.6.3 is required in the composer file.

jlis commented 6 years ago

ping.

seiffert commented 6 years ago

Hi @jlis, thank you for your contribution! Would you mind adding a test case that validates that no other data is removed from the Redis instance? Thanks!

jlis commented 6 years ago

@seiffert I added the tests as requested :)

jlis commented 5 years ago

Ping

dbaltas commented 5 years ago

any news on this one?

jlis commented 5 years ago

Nah, I guess the repo is dead.

NoelDavies commented 5 years ago

This project is dead, but I'm maintaining it under my employer - https://github.com/endclothing/prometheus_client_php. Feel free to submit the PR there.