GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver
Label addition to metrics with prefix "container.googleapis.com" should not break GCP/GKE?
- Dominant language
- Go
- Stars
- 409
- Forks
- 236
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 9
Description
Currently, label addition will break GKE. I checked https://github.com/GoogleCloudPlatform/k8s-stackdriver/blob/master/prometheus-to-sd, for metrics with prefix "container.googleapis.com" (e.g., etcd metrics), if definition (for example, label is one of the definition) of the metric was changed, then the metric is marked as broken and the metric is not going to be pushed: https://github.com/GoogleCloudPlatform/k8s-stackdriver/blob/a39287c62ca7c1ffaa3cac4887f6a92c1943abab/prometheus-to-sd/translator/metric_descriptor_cache.go#L72. prometheus-to-sd only UpdateMetricDescriptors if it contains "custom.googleapis.com" prefix:https://github.com/GoogleCloudPlatform/k8s-stackdriver/blob/1047589c380eed64c94484e7ab989db53d1b907b/prometheus-to-sd/main.go#L141.
How ever, many label additions are conceptually backward compatible since their introduction would not break existing readers that are unaware of the label. So I would expect backward compatible label addition does not break GCP/GKE.
Here is an example: https://github.com/etcd-io/etcd/pull/10022
Contributor guide
Assessment
This issue has not been assessed yet.