prometheus_client_php
prometheus_client_php copied to clipboard
Exemplars support
Prometheus have added support for Exemplars, which are a technique to allow linking metrics (like histograms buckets) with tracing. The golang client library supports them already https://github.com/prometheus/client_golang/blob/75560f1d20c5e1fd435c0d26b5601843a18dc22b/prometheus/histogram.go#L278
Not really sure if it will go by design here https://github.com/PromPHP/prometheus_client_php/blob/master/src/Prometheus/Histogram.php
But the idea is to be able to observe and to add the exemplar (which usually contains a traceID value) so you can render it with grafana afterwards and open the trace/span interface related with it.
Prometheus exemplar source code https://github.com/prometheus/prometheus/blob/main/pkg/exemplar/exemplar.go
Hey @hrodic,
good idea, on a first (not deep) look it looks like this is something we can consider doing. Would you like to submit an MR :)? Otherwise, I would try to tackle this in the next two weeks.
Cheers,
- Lukas
I am not able to work on this soon but I might eventually. Thank you.