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