Skip to content

Commit

Permalink
Fix stackdriver distribution without bucket bounds
Browse files Browse the repository at this point in the history
New k8s metrics results in error in Stackdriver exporter. In order to
fix it we need to define two infinite buckets with a delimiter of 0.
Fix was verified in Stackdriver dashboard.
  • Loading branch information
aLekSer committed Feb 4, 2019
1 parent dd75eb8 commit 7564fe6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkg/metrics/kubernetes_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func init() {
Name: "k8s_client_cache_list_items",
Measure: cacheListItemCountStats,
Description: "Count of items in a list from the Kubernetes API.",
Aggregation: view.Distribution(),
Aggregation: view.Distribution(0),
}))

runtime.Must(view.Register(&view.View{
Expand All @@ -107,14 +107,14 @@ func init() {
Name: "k8s_client_cache_watch_duration_seconds",
Measure: cacheWatchesLatencyStats,
Description: "Duration of watches on the Kubernetes API.",
Aggregation: view.Distribution(),
Aggregation: view.Distribution(0),
}))

runtime.Must(view.Register(&view.View{
Name: "k8s_client_cache_watch_events",
Measure: cacheItemsInWatchesCountStats,
Description: "Number of items in watches on the Kubernetes API.",
Aggregation: view.Distribution(),
Aggregation: view.Distribution(0),
}))

runtime.Must(view.Register(&view.View{
Expand Down Expand Up @@ -144,15 +144,15 @@ func init() {
Name: "k8s_client_workqueue_latency_seconds",
Measure: workQueueLatencyStats,
Description: "How long an item stays in the work queue.",
Aggregation: view.Distribution(),
Aggregation: view.Distribution(0),
TagKeys: []tag.Key{keyQueueName},
}))

runtime.Must(view.Register(&view.View{
Name: "k8s_client_workqueue_work_duration_seconds",
Measure: workQueueWorkDurationStats,
Description: "How long processing an item from the work queue takes.",
Aggregation: view.Distribution(),
Aggregation: view.Distribution(0),
TagKeys: []tag.Key{keyQueueName},
}))

Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Guides/access-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: >
Installing Agones creates several [Custom Resource Definitions (CRD)](https://kubernetes.io/docs/concepts/api-extension/custom-resources),
which can be accessed and manipulated through the Kubernetes API.

Kubernetes has multiple [client libraries](https://kubernetes.io/docs/reference/client-libraries/), however,
Kubernetes has multiple [client libraries](https://kubernetes.io/docs/reference/using-api/client-libraries/), however,
at time of writing, only
the [Go](https://github.com/kubernetes/client-go) and
[Python](https://github.com/kubernetes-client/python/) clients are documented to support accessing CRDs.
Expand Down

0 comments on commit 7564fe6

Please sign in to comment.