package httpmiddleware

import "github.com/prometheus/client_golang/examples/middleware/httpmiddleware"

Package httpmiddleware is adapted from https://github.com/bwplotka/correlator/tree/main/examples/observability/ping/pkg/httpinstrumentation

Index

Types

type Middleware

type Middleware interface {
	// WrapHandler wraps the given HTTP handler for instrumentation.
	WrapHandler(handlerName string, handler http.Handler) http.HandlerFunc
}

func New

func New(registry prometheus.Registerer, buckets []float64) Middleware

New returns a Middleware interface.

Source Files

httpmiddleware.go

Version
v1.22.0 (latest)
Published
Apr 8, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
19 hours ago

Tools for package owners.