Handler returns an http.Handler for the prometheus.DefaultGatherer, using default HandlerOpts, i.e. it reports the first error as an HTTP error, it has no error logging, and it applies compression if requested by the client. The returned http.Handler is already instrumented using the InstrumentMetr
()
| 94 | // Gatherer, different instrumentation, and non-default HandlerOpts), use the |
| 95 | // HandlerFor function. See there for details. |
| 96 | func Handler() http.Handler { |
| 97 | return InstrumentMetricHandler( |
| 98 | prometheus.DefaultRegisterer, HandlerFor(prometheus.DefaultGatherer, HandlerOpts{}), |
| 99 | ) |
| 100 | } |
| 101 | |
| 102 | // HandlerFor returns an uninstrumented http.Handler for the provided |
| 103 | // Gatherer. The behavior of the Handler is defined by the provided |