httpinstrumentation

package
v0.0.0-...-4fb4148 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL