Versions in this module Expand all Collapse all v1 v1.0.2 Nov 20, 2022 Changes in this version + func Handler() http.Handler + func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler + func HandlerForTransactional(reg prometheus.TransactionalGatherer, opts HandlerOpts) http.Handler + func InstrumentHandlerCounter(counter *prometheus.CounterVec, next http.Handler, opts ...Option) http.HandlerFunc + func InstrumentHandlerDuration(obs prometheus.ObserverVec, next http.Handler, opts ...Option) http.HandlerFunc + func InstrumentHandlerInFlight(g prometheus.Gauge, next http.Handler) http.Handler + func InstrumentHandlerRequestSize(obs prometheus.ObserverVec, next http.Handler, opts ...Option) http.HandlerFunc + func InstrumentHandlerResponseSize(obs prometheus.ObserverVec, next http.Handler, opts ...Option) http.Handler + func InstrumentHandlerTimeToWriteHeader(obs prometheus.ObserverVec, next http.Handler, opts ...Option) http.HandlerFunc + func InstrumentMetricHandler(reg prometheus.Registerer, handler http.Handler) http.Handler + type HandlerErrorHandling int + const ContinueOnError + const HTTPErrorOnError + const PanicOnError + type HandlerOpts struct + DisableCompression bool + EnableOpenMetrics bool + ErrorHandling HandlerErrorHandling + ErrorLog Logger + MaxRequestsInFlight int + Registry prometheus.Registerer + Timeout time.Duration + type InstrumentTrace struct + ConnectDone func(float64) + ConnectStart func(float64) + DNSDone func(float64) + DNSStart func(float64) + Got100Continue func(float64) + GotConn func(float64) + GotFirstResponseByte func(float64) + PutIdleConn func(float64) + TLSHandshakeDone func(float64) + TLSHandshakeStart func(float64) + Wait100Continue func(float64) + WroteHeaders func(float64) + WroteRequest func(float64) + type Logger interface + Println func(v ...interface{}) + type Option interface + func WithExemplarFromContext(getExemplarFn func(requestCtx context.Context) prometheus.Labels) Option + func WithExtraMethods(methods ...string) Option + type RoundTripperFunc func(req *http.Request) (*http.Response, error) + func InstrumentRoundTripperCounter(counter *prometheus.CounterVec, next http.RoundTripper, opts ...Option) RoundTripperFunc + func InstrumentRoundTripperDuration(obs prometheus.ObserverVec, next http.RoundTripper, opts ...Option) RoundTripperFunc + func InstrumentRoundTripperInFlight(gauge prometheus.Gauge, next http.RoundTripper) RoundTripperFunc + func InstrumentRoundTripperTrace(it *InstrumentTrace, next http.RoundTripper) RoundTripperFunc + func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error)