countMidStreamResync records a client told MID-STREAM that it missed events, on a connection that stayed open (BUG-2730). Deliberately NOT countResumeGap: that counter's population is resumes this instance could not serve, and existing alerts are written against it. Widening it in place would have
(activity bool)
| 1469 | // changing their name, and a mixed-version fleet would report two populations |
| 1470 | // under one metric for the length of a rollout. |
| 1471 | func (s *Server) countMidStreamResync(activity bool) { |
| 1472 | if s.metrics == nil { |
| 1473 | return |
| 1474 | } |
| 1475 | if activity { |
| 1476 | s.metrics.EventMidstreamResyncsTotal.Inc() |
| 1477 | return |
| 1478 | } |
| 1479 | s.metrics.WatchMidstreamResyncsTotal.Inc() |
| 1480 | } |
| 1481 | |
| 1482 | // SetMetrics attaches Prometheus metrics to the server. |
| 1483 | // Must be called before the first request is served. |
no outgoing calls
no test coverage detected