Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

455 B
Raw Blame
package middleware

import "net/http"

const (
	pkgname string = "go.signoz.io/pkg/http/middleware"
)

// Wrapper is an interface implemented by all middlewares.
type Wrapper interface {
	Wrap(http.Handler) http.Handler
}

// WrapperFunc is to Wrapper as http.HandlerFunc is to http.Handler.
type WrapperFunc func(http.Handler) http.Handler

// WrapperFunc implements Wrapper.
func (m WrapperFunc) Wrap(next http.Handler) http.Handler {
	return m(next)
}