diff --git a/vendor/github.com/weaveworks/billing-client/client.go b/vendor/github.com/weaveworks/billing-client/client.go index 366ca1f68..a6862b152 100644 --- a/vendor/github.com/weaveworks/billing-client/client.go +++ b/vendor/github.com/weaveworks/billing-client/client.go @@ -26,13 +26,13 @@ var ( // EventsCounter is the count of billing events EventsCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "billing_client", - Name: "events", - Help: "Number of billing events", - }, []string{"status"}) + Name: "events_total", + Help: "Number and type of billing events", + }, []string{"status", "amount_type"}) // AmountsCounter is the total of the billing amounts AmountsCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "billing_client", - Name: "amounts", + Name: "amounts_total", Help: "Number and type of billing amounts", }, []string{"status", "amount_type"}) ) @@ -192,8 +192,8 @@ func (c *Client) post(e Event) error { } func trackEvent(status string, e Event) { - EventsCounter.WithLabelValues(status).Inc() for t, v := range e.Amounts { + EventsCounter.WithLabelValues(status, string(t)).Inc() AmountsCounter.WithLabelValues(status, string(t)).Add(float64(v)) } } diff --git a/vendor/github.com/weaveworks/billing-client/event.go b/vendor/github.com/weaveworks/billing-client/event.go index c840cb99f..a955d7200 100644 --- a/vendor/github.com/weaveworks/billing-client/event.go +++ b/vendor/github.com/weaveworks/billing-client/event.go @@ -36,6 +36,8 @@ type AmountType string const ( // ContainerSeconds is one of the billable metrics ContainerSeconds AmountType = "container-seconds" + NodeSeconds AmountType = "node-seconds" + Samples AmountType = "samples" ) // Amounts is a map of amount billable metrics to their values diff --git a/vendor/manifest b/vendor/manifest index 4392fa1f2..30ec28ec7 100644 --- a/vendor/manifest +++ b/vendor/manifest @@ -1414,7 +1414,7 @@ "importpath": "github.com/weaveworks/billing-client", "repository": "https://github.com/weaveworks/billing-client", "vcs": "git", - "revision": "bf803baae0177625efc34699d79696644210a022", + "revision": "f5ac1ebd2b577d93dca4d948ca429c499451dbc8", "branch": "master", "notests": true },