diff --git a/e2e/testcases/otel_collector_test.go b/e2e/testcases/otel_collector_test.go index 47d91e97de..c30f933335 100644 --- a/e2e/testcases/otel_collector_test.go +++ b/e2e/testcases/otel_collector_test.go @@ -47,7 +47,7 @@ import ( const ( DefaultMonitorKSA = "default" MonitorGSA = "e2e-test-metric-writer" - GCMExportErrorCaption = "failed to export time series to GCM" + GCMExportErrorCaption = "One or more TimeSeries could not be written" GCMMetricPrefix = "custom.googleapis.com/opencensus/config_sync" ) diff --git a/e2e/testdata/otel-collector/otel-cm-monarch-rejected-labels.yaml b/e2e/testdata/otel-collector/otel-cm-monarch-rejected-labels.yaml index d32d7525a1..1a559cd65e 100644 --- a/e2e/testdata/otel-collector/otel-cm-monarch-rejected-labels.yaml +++ b/e2e/testdata/otel-collector/otel-cm-monarch-rejected-labels.yaml @@ -51,8 +51,6 @@ data: - prefix: "host.name" - prefix: "k8s.deployment.name" - prefix: "k8s.node.name" - retry_on_failure: - enabled: false sending_queue: enabled: false googlecloud/kubernetes: @@ -72,8 +70,6 @@ data: # will not break this ingestion pipeline create_service_timeseries: true service_resource_labels: false - retry_on_failure: - enabled: false sending_queue: enabled: false processors: diff --git a/manifests/templates/otel-collector.yaml b/manifests/templates/otel-collector.yaml index 89e9533931..6f27ee896e 100644 --- a/manifests/templates/otel-collector.yaml +++ b/manifests/templates/otel-collector.yaml @@ -130,11 +130,14 @@ spec: spec: containers: - name: otel-collector - image: gcr.io/config-management-release/otelcontribcol:v0.54.0-gke.1 + image: gcr.io/config-management-release/otelcontribcol:v0.86.0-gke.1 command: - /otelcontribcol args: - "--config=/conf/otel-collector-config.yaml" + # The prometheus transformer appends `_ratio` to gauge metrics: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.86.0/pkg/translator/prometheus/normalize_name.go#L149 + # Add the feature gate to enable metric suffix trimming. + - "--feature-gates=-pkg.translator.prometheus.NormalizeName" resources: limits: cpu: 1 diff --git a/manifests/templates/reconciler-manager-configmap.yaml b/manifests/templates/reconciler-manager-configmap.yaml index e7e869e736..514ecff62c 100644 --- a/manifests/templates/reconciler-manager-configmap.yaml +++ b/manifests/templates/reconciler-manager-configmap.yaml @@ -181,7 +181,7 @@ data: cpu: "50m" memory: "200Mi" - name: otel-agent - image: gcr.io/config-management-release/otelcontribcol:v0.54.0-gke.1 + image: gcr.io/config-management-release/otelcontribcol:v0.86.0-gke.1 command: - /otelcontribcol args: diff --git a/manifests/templates/reconciler-manager.yaml b/manifests/templates/reconciler-manager.yaml index fbb74636cf..35827e0164 100644 --- a/manifests/templates/reconciler-manager.yaml +++ b/manifests/templates/reconciler-manager.yaml @@ -60,14 +60,14 @@ spec: name: reconciler-manager optional: true # Currently nothing mandatory in the ConfigMap - name: otel-agent - image: gcr.io/config-management-release/otelcontribcol:v0.54.0-gke.1 + image: gcr.io/config-management-release/otelcontribcol:v0.86.0-gke.1 command: - /otelcontribcol args: - "--config=/conf/otel-agent-config.yaml" - # TODO: Remove this feature gate when opentelemetry semantic conventions are used - # in the collector code. - - "--feature-gates=-exporter.googlecloud.OTLPDirect" + # The prometheus transformer appends `_ratio` to gauge metrics: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.86.0/pkg/translator/prometheus/normalize_name.go#L149 + # Add the feature gate to enable metric suffix trimming. + - "--feature-gates=-pkg.translator.prometheus.NormalizeName" resources: limits: cpu: 1 diff --git a/manifests/third_party/resourcegroup-manifest.yaml b/manifests/third_party/resourcegroup-manifest.yaml index 8543b3f928..fd3a29630f 100644 --- a/manifests/third_party/resourcegroup-manifest.yaml +++ b/manifests/third_party/resourcegroup-manifest.yaml @@ -555,7 +555,7 @@ spec: fieldPath: metadata.labels['configsync.gke.io/deployment-name'] - name: OTEL_RESOURCE_ATTRIBUTES value: k8s.pod.name=$(KUBE_POD_NAME),k8s.pod.namespace=$(KUBE_POD_NAMESPACE),k8s.pod.uid=$(KUBE_POD_UID),k8s.pod.ip=$(KUBE_POD_IP),k8s.node.name=$(KUBE_NODE_NAME),k8s.deployment.name=$(KUBE_DEPLOYMENT_NAME) - image: gcr.io/config-management-release/otelcontribcol:v0.54.0-gke.1 + image: gcr.io/config-management-release/otelcontribcol:v0.86.0-gke.1 name: otel-agent ports: - containerPort: 55678 diff --git a/pkg/metrics/otel.go b/pkg/metrics/otel.go index 6877c194cd..155c961f23 100644 --- a/pkg/metrics/otel.go +++ b/pkg/metrics/otel.go @@ -67,8 +67,6 @@ exporters: - prefix: "host.name" - prefix: "k8s.deployment.name" - prefix: "k8s.node.name" - retry_on_failure: - enabled: false sending_queue: enabled: false googlecloud/kubernetes: @@ -88,8 +86,6 @@ exporters: # will not break this ingestion pipeline create_service_timeseries: true service_resource_labels: false - retry_on_failure: - enabled: false sending_queue: enabled: false processors: diff --git a/pkg/reconcilermanager/controllers/otel_controller_test.go b/pkg/reconcilermanager/controllers/otel_controller_test.go index 056c524137..26ddfee82a 100644 --- a/pkg/reconcilermanager/controllers/otel_controller_test.go +++ b/pkg/reconcilermanager/controllers/otel_controller_test.go @@ -46,7 +46,7 @@ const ( // otel-collector ConfigMap. // See `CollectorConfigGooglecloud` in `pkg/metrics/otel.go` // Used by TestOtelReconcilerGooglecloud. - depAnnotationGooglecloud = "de02e5c1da70cff63a1cfb565141899a" + depAnnotationGooglecloud = "017f802612f7bbbac7a90fc8d64ce746" // depAnnotationGooglecloud is the expected hash of the custom // otel-collector ConfigMap test artifact. // Used by TestOtelReconcilerCustom.