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

Exception when sorting gauge values with labels in Redis.php #45

Closed crazycodr closed 7 years ago

crazycodr commented 7 years ago

I'm just opening this as a reference to an upcoming PR.

I found an issue that happens when you sort gauge entries with labels. You json_decode the labels and expect them to work with them as an array but json decode produces objects by default. I also have a similar error with the TextFormatRenderer that expects arrays instead of stdclasses.

PR coming soon, by the end of day probably.

bracki commented 7 years ago

Merged your changes. Thanks for the contribution!