Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instrumentation ¶
type Instrumentation struct { UseRouteTemplate bool ReqDurationBuckets []float64 Namespace string Subsystem string Labels map[string]string Registerer prometheus.Registerer // contains filtered or unexported fields }
Instrumentation implements the mux middleware and contains configuration options
func NewCustomInstrumentation ¶
func NewCustomInstrumentation(useRouteTemplate bool, namespace string, subsystem string, reqDurationBuckets []float64, labels map[string]string, registerer prometheus.Registerer) *Instrumentation
NewCustomInstrumentation returns an instrumentation with custom options
func NewDefaultInstrumentation ¶
func NewDefaultInstrumentation() *Instrumentation
NewDefaultInstrumentation returns an instrumentation with the default options
func (*Instrumentation) Middleware ¶
func (i *Instrumentation) Middleware(next http.Handler) http.Handler
Middleware satisifies the mux middleware interface
Click to show internal directories.
Click to hide internal directories.