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

Function WriteProviderInfoSnapshot

coderd/aibridged/metrics.go:89–94  ·  view source on GitHub ↗

WriteProviderInfoSnapshot Resets info and writes one series per outcome. Both aibridged and aibridgeproxyd use this so the provider_info recording contract stays in one place.

(info *prometheus.GaugeVec, outcomes []ProviderOutcome)

Source from the content-addressed store, hash-verified

87// outcome. Both aibridged and aibridgeproxyd use this so the
88// provider_info recording contract stays in one place.
89func WriteProviderInfoSnapshot(info *prometheus.GaugeVec, outcomes []ProviderOutcome) {
90 info.Reset()
91 for _, o := range outcomes {
92 info.WithLabelValues(o.Name, o.Type, string(o.Status)).Set(1)
93 }
94}

Callers 2

recordReloadSuccessMethod · 0.92
RecordReloadSuccessMethod · 0.85

Calls 3

WithLabelValuesMethod · 0.80
ResetMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected