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

Several instances #106

Closed gigi closed 5 years ago

gigi commented 5 years ago

Hi! Help us to deal with metrics for several PHP servers. For example we have three servers with 'some_logical_counter' metric. If we use APCu adapter every counter will be incremented independently. So prometheus should pull and sum three 'some_logical_counters'. If we switch to Redis then three instances share the same value. Does package's storage adapter affect the way prometheus should handle data?

gdsmith commented 5 years ago

My understanding is that If you are sharing Redis storage between servers/services you should likely include a label to identify the server or use Redis::setPrefix to make the adapter behave in the same way as APCu/InMemory.

gigi commented 5 years ago

Ok. Thanx