Open chenxin6 opened 8 months ago
I'm not aware of any advantages or disadvantages to using handle_openmetrics
other than the addition of exemplars, but I could be wrong about that. They should both be compatible with Prometheus scraping.
Edit: handle_metrics
and handle_openmetrics
are just simple wrappers around the Prometheus and OpenMetrics exposition formats that are both built into the official Prometheus client, so the answer to your question would come down to differences in those two formats. If I had to choose between them it would be OpenMetrics simply due to to the added exemplar support, and (to my knowledge, for my use cases) no downside. Would appreciate hearing other viewpoints!
As the README.md says, we must use
handle_openmetrics
instead ofhandle_metrics
for exemplars to appear in metrics output. Does it mean that handle_openmetrics is better than handle_metrics? And we should always use handle_openmetrics.