MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / countMidStreamResync

Method countMidStreamResync

internal/server/server.go:1421–1430  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1419// changing their name, and a mixed-version fleet would report two populations
1420// under one metric for the length of a rollout.
1421func (s *Server) countMidStreamResync(activity bool) {
1422 if s.metrics == nil {
1423 return
1424 }
1425 if activity {
1426 s.metrics.EventMidstreamResyncsTotal.Inc()
1427 return
1428 }
1429 s.metrics.WatchMidstreamResyncsTotal.Inc()
1430}
1431
1432// SetMetrics attaches Prometheus metrics to the server.
1433// Must be called before the first request is served.

Callers 2

handleSSEMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected