prometheus_client_php
prometheus_client_php copied to clipboard
Counters, gauges and histograms init with zero values
Atm u can't create histogram with zero value upfront (for correct grafana increase function to work), because it will increment _count and mess with averages in future. It would be nice to have initialization mechanics (for example, on register method), as discussed in other clients, like here or here
I'm not that good at redis and lua, i've looked into current updateSomething realizations for redis and couln't come up with solution, but if u'll point me in right direction, i think i can try to help
Hey @EdgarSedov,
good point! I already looked a bit into the code and I don't think this is easy solvable. The "problem" is that we only set the value/metric when you call inc/set/observe on the specific metric types. Before it does not "reach" the underlying storage and will be "thrown" away. I will think about it a bit more, but I think we can not fix it with the current architecture for this library.
@LKaemmerling Hi' i've made a draft with possible solution, please take a look when u'll have some time
@LKaemmerling is there any plan on this ? I saw the PR didn't move since 2 years ?