Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify type and meaning of stacks_* metrics (#402)
* Clarify type and meaning of stacks_* metrics The stacks_failing metric is created as a GaugeVec in the Go code, which represents a set of time series distinguished by labels (in this case, "namespace" and "name"). But each of these time series are of type `gauge`, so the documentation is misleading in referring to them as `gaugevec` (which is not a kind of metric). I've simplified the verbiage a little, in passing. Addresses #399. * Reset stacks_failed gauge when stack deleted The stacks_failed metric is a set of gauges, each labelled with the namespace and name of a Stack object. The controller sets a gauge to `1` when its Stack object is given a state of "failed", and `0` for "succeeded". A query aggregating over the labels will get the count of failed stacks. However: once a Stack is deleted, the gauge remains with the last value -- and if it was failing, it will still be included in the count. So, this commit resets the gauge to `0` when a Stack is deleted (if it had a state at all). Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
- Loading branch information