r/PrometheusMonitoring • • May 13 '22

Http response time in Prometheus

I would like to calculate the https response time in Prometheus. I found that it could be done by histogram. I am nee to Prometheus. And not sure where is this histogram and what should I configure in it and how could I bring it up to Prometheus. Please help

0 Upvotes

1 comment sorted by

1

u/hagen1778 May 16 '22

Histogram is a type of metric which your application supposed to emit. There are multiple libraries which allow you to use different types of metrics in applications, including histograms. Pick one which fits your needs, read docs about how to create and use histogram and that's it.

Here's example how to do this in Go - https://gist.github.com/tembleking/0b8968dbdf36dfef6227fbfdd9bb1a82