Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstrumentHandler ¶
func InstrumentHandler(next http.Handler, _http Http) http.HandlerFunc
InstrumentHandler returns a handler which records HTTP requests as they are made
Types ¶
type Http ¶
type Http struct { RequestsTotal *prometheus.CounterVec RequestDurationHistogram *prometheus.HistogramVec }
type MetricsServer ¶
type MetricsServer struct {
// contains filtered or unexported fields
}
MetricsServer provides instrumentation for HTTP calls
func (*MetricsServer) Register ¶
func (m *MetricsServer) Register(metricsPort int)
Register binds a HTTP server to expose Prometheus metrics
func (*MetricsServer) Serve ¶
func (m *MetricsServer) Serve(cancel chan bool)
Serve http traffic in go routine, non-blocking
Click to show internal directories.
Click to hide internal directories.