From 60a3e5aa976565ee2b7fb033151c8c5a41a5c600 Mon Sep 17 00:00:00 2001 From: "John L. Peterson (Jack)" Date: Mon, 23 Sep 2024 10:55:35 -0400 Subject: [PATCH] [chore] fix TestProcessTelemetryWithHostProc test (#11222) #### Description Fixes failing unit test TestProcessTelemetryWithHostProc under service/internal/proctelemetry/process_telemetry_linux_test.go due to incorrect metric name #### Link to tracking issue Fixes [#11221](https://github.com/open-telemetry/opentelemetry-collector/issues/11221) --- service/internal/proctelemetry/process_telemetry_linux_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/internal/proctelemetry/process_telemetry_linux_test.go b/service/internal/proctelemetry/process_telemetry_linux_test.go index 2b848ad792d..3bdbc9cd74b 100644 --- a/service/internal/proctelemetry/process_telemetry_linux_test.go +++ b/service/internal/proctelemetry/process_telemetry_linux_test.go @@ -39,7 +39,7 @@ func TestProcessTelemetryWithHostProc(t *testing.T) { } else { metricValue = metric.Metric[0].GetGauge().GetValue() } - if strings.HasPrefix(metricName, "process_uptime") || strings.HasPrefix(metricName, "process_cpu_seconds") { + if strings.HasPrefix(metricName, "otelcol_process_uptime") || strings.HasPrefix(metricName, "otelcol_process_cpu_seconds") { // This likely will still be zero when running the test. assert.GreaterOrEqual(t, metricValue, float64(0), metricName) continue