captureProvisionFailed emits warehouse_provision_failed with a stable reason category, but only when the terminal Failed transition actually landed (updateErr == nil). Emitting on a failed CAS would let a stuck warehouse re-fire the event every reconcile tick.
(w *configstore.ManagedWarehouse, reason string, updateErr error)
| 29 | // captureProvisionFailed emits warehouse_provision_failed with a stable reason |
| 30 | // category, but only when the terminal Failed transition actually landed |
| 31 | // (updateErr == nil). Emitting on a failed CAS would let a stuck warehouse |
| 32 | // re-fire the event every reconcile tick. |
| 33 | func captureProvisionFailed(w *configstore.ManagedWarehouse, reason string, updateErr error) { |
| 34 | if updateErr != nil { |
| 35 | return |
| 36 | } |
| 37 | props := provisionEventProps(w) |
| 38 | props["reason"] = reason |
| 39 | analytics.Default().Capture("warehouse_provision_failed", w.OrgID, props) |
| 40 | } |
| 41 |
no test coverage detected