emit returns the wired metrics backend, defaulting to NoOp so handler-level instrumentation doesn't need nil guards everywhere.
()
| 256 | // emit returns the wired metrics backend, defaulting to NoOp so |
| 257 | // handler-level instrumentation doesn't need nil guards everywhere. |
| 258 | func (a *API) emit() telemetry.Metrics { |
| 259 | if a.metrics == nil { |
| 260 | return telemetry.NoOp{} |
| 261 | } |
| 262 | return a.metrics |
| 263 | } |
| 264 | |
| 265 | // publishAsync fires an event in a fresh goroutine so the handler's |
| 266 | // response is not blocked by webhook routing. Returns immediately. |
no outgoing calls