const ( // ResourcesMetricName is the name of the Prometheus metric used to monitor Boskos resources. ResourcesMetricName = "boskos_resources" // ResourcesMetricDescription is the description for the Prometheus metric used to monitor Boskos resources. ResourcesMetricDescription = "Number of resources recorded in Boskos by resource type and state." )
func NewResourcesCollector ¶
NewResourcesCollector returns a collector which exports the current counts of Boskos resources, segmented by resource type and state.
NormalizeResourceMetrics "normalizes" the list of provided Metrics by bucketing any state not in states into the "Other" state, and by ensuring every state in states has some count (even if zero). It then applies the function for each combination of resource type and state.