instrumentation

package
v0.0.0-...-d552282 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MeasureTime

func MeasureTime(op func()) float64

func NewDummyInstrumentationMiddleware

func NewDummyInstrumentationMiddleware(next http.Handler) http.Handler

A dummy middleware that inserts an event into the context then does nothing with it. Useful for testing other application middlewares that assume an event is present.

func NewInstrumentedHTTPMiddleware

func NewInstrumentedHTTPMiddleware(logger log.Logger, metricsRegistry prometheus.Registerer, unloggedPaths []string, next http.Handler) http.Handler

Types

type Event

type Event struct {
	// contains filtered or unexported fields
}

func NewEvent

func NewEvent() *Event

func (*Event) All

func (e *Event) All() []interface{}

func (*Event) Get

func (e *Event) Get(key string) interface{}

func (*Event) With

func (e *Event) With(keysAndVals ...interface{})

type EventContextKey

type EventContextKey struct{}

Jump to

Keyboard shortcuts

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