MCPcopy Index your code
hub / github.com/coder/coder / recordReloadAttempt

Method recordReloadAttempt

enterprise/aibridgeproxyd/reload.go:71–76  ·  view source on GitHub ↗

recordReloadAttempt stamps the attempt-time gauge at the start of a Reload. A reload that hangs mid-flight is detected by watching the gap between this gauge and ProvidersLastReloadSuccessTimestampSeconds.

()

Source from the content-addressed store, hash-verified

69// Reload. A reload that hangs mid-flight is detected by watching the
70// gap between this gauge and ProvidersLastReloadSuccessTimestampSeconds.
71func (s *Server) recordReloadAttempt() {
72 if s.metrics == nil {
73 return
74 }
75 s.metrics.ProvidersLastReloadTimestampSeconds.Set(float64(time.Now().Unix()))
76}
77
78// recordReloadSuccess rewrites the provider_info GaugeVec from the
79// classified reload and stamps the success-time gauge. Reset clears

Callers 1

ReloadMethod · 0.95

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected