prometheus_client_php icon indicating copy to clipboard operation
prometheus_client_php copied to clipboard

Exemplars support

Open hrodic opened this issue 3 years ago • 2 comments

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

hrodic avatar Mar 23 '21 14:03 hrodic

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

LKaemmerling avatar Mar 29 '21 05:03 LKaemmerling

I am not able to work on this soon but I might eventually. Thank you.

hrodic avatar Apr 29 '21 17:04 hrodic