Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware interface { // WrapHandler wraps the given HTTP handler for instrumentation. WrapHandler(handlerName string, handler http.Handler) http.HandlerFunc }
Middleware auto instruments net/http HTTP handlers with: * Prometheus metrics + exemplars * Logging * Tracing + propagation
func NewMiddleware ¶
func NewMiddleware(reg prometheus.Registerer, buckets []float64, logger log.Logger, tracer *tracing.Tracer) Middleware
NewMiddleware provides default Middleware. Passing nil as buckets uses the default buckets.
func NewNopMiddleware ¶
func NewNopMiddleware() Middleware
NewNopMiddleware provides a Middleware which does nothing.
Click to show internal directories.
Click to hide internal directories.