RecordReloadSuccess rewrites the ProviderInfo GaugeVec from the outcomes and stamps the success-time gauge. Reset clears series for providers that have left the configuration so they don't linger as stale.
(outcomes []ProviderOutcome)
| 76 | // providers that have left the configuration so they don't linger as |
| 77 | // stale. |
| 78 | func (m *Metrics) RecordReloadSuccess(outcomes []ProviderOutcome) { |
| 79 | if m == nil { |
| 80 | return |
| 81 | } |
| 82 | WriteProviderInfoSnapshot(m.ProviderInfo, outcomes) |
| 83 | m.ProvidersLastReloadSuccessTimestampSeconds.Set(float64(time.Now().Unix())) |
| 84 | } |
| 85 | |
| 86 | // WriteProviderInfoSnapshot Resets info and writes one series per |
| 87 | // outcome. Both aibridged and aibridgeproxyd use this so the |