MCPcopy
hub / github.com/caddyserver/caddy / metricsInstrumentedRoute

Struct metricsInstrumentedRoute

modules/caddyhttp/metrics.go:300–304  ·  view source on GitHub ↗

metricsInstrumentedRoute wraps a compiled route Handler with metrics instrumentation. It wraps the entire compiled route chain once, collecting metrics only once per route match.

Source from the content-addressed store, hash-verified

298// instrumentation. It wraps the entire compiled route chain once,
299// collecting metrics only once per route match.
300type metricsInstrumentedRoute struct {
301 handler string
302 next Handler
303 metrics *Metrics
304}
305
306func newMetricsInstrumentedRoute(ctx caddy.Context, handler string, next Handler, m *Metrics) *metricsInstrumentedRoute {
307 m.init.Do(func() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected