From 3516a0e3e0c3b2653e3b6a02f41ad97e8e721e50 Mon Sep 17 00:00:00 2001 From: Hyunsoo Kim Date: Thu, 14 Mar 2024 17:39:17 -0400 Subject: [PATCH] Add InstanceType dimension to node level GPU metrics (#1090) --- RELEASE_NOTES | 6 ++ go.mod | 34 +++++----- go.sum | 68 +++++++++---------- plugins/processors/gpuattributes/processor.go | 45 ++++++------ .../emf_and_kubernetes_with_gpu_config.yaml | 2 +- .../otel/exporter/awsemf/kubernetes.go | 3 +- .../otel/exporter/awsemf/translator_test.go | 4 +- 7 files changed, 85 insertions(+), 77 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index a7cd6f860e..9cc1248027 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,3 +1,9 @@ +======================================================================== +Amazon CloudWatch Agent 1.300034.1 (2024-03-14) +======================================================================== +Enhancements: +* [ContainerInsights] Add InstanceType attribute to GPU metrics + ======================================================================== Amazon CloudWatch Agent 1.300034.0 (2024-03-04) ======================================================================== diff --git a/go.mod b/go.mod index 8beac47726..9d8b53ebf8 100644 --- a/go.mod +++ b/go.mod @@ -7,38 +7,38 @@ replace github.com/influxdata/telegraf => github.com/aws/telegraf v0.10.2-0.2023 // Replace with https://github.com/amazon-contributing/opentelemetry-collector-contrib, there are no requirements for all receivers/processors/exporters // to be all replaced since there are some changes that will always be from upstream replace ( - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter => github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter => github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsemfexporter v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter => github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.0.0-20240301221517-9cb314e7d27b + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter => github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter => github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsemfexporter v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter => github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.0.0-20240314212739-0ebba1aceb06 ) -replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy => github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsproxy v0.0.0-20240301221517-9cb314e7d27b +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy => github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsproxy v0.0.0-20240314212739-0ebba1aceb06 replace ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/awsutil v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/containerinsight v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/cwlogs v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/k8s v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/proxy v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/xray v0.0.0-20240301221517-9cb314e7d27b + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/awsutil v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/containerinsight v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/cwlogs v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/k8s v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/proxy v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray => github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/xray v0.0.0-20240314212739-0ebba1aceb06 ) replace ( - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza => github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza v0.0.0-20240301221517-9cb314e7d27b + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza => github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza v0.0.0-20240314212739-0ebba1aceb06 // Replace with contrib to revert upstream change https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/20519 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus => github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/translator/prometheus v0.0.0-20240301221517-9cb314e7d27b + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus => github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/translator/prometheus v0.0.0-20240314212739-0ebba1aceb06 ) -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor => github.com/amazon-contributing/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.0.0-20240301221517-9cb314e7d27b +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor => github.com/amazon-contributing/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.0.0-20240314212739-0ebba1aceb06 replace ( - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver => github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver => github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.0.0-20240301221517-9cb314e7d27b - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20240301221517-9cb314e7d27b + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver => github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver => github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.0.0-20240314212739-0ebba1aceb06 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20240314212739-0ebba1aceb06 ) // Omit fields in HTTPClientSettings. Pending fix for https://github.com/open-telemetry/opentelemetry-collector/issues/8627 -replace go.opentelemetry.io/collector/config/confighttp => github.com/amazon-contributing/opentelemetry-collector-contrib/config/confighttp v0.0.0-20240301221517-9cb314e7d27b +replace go.opentelemetry.io/collector/config/confighttp => github.com/amazon-contributing/opentelemetry-collector-contrib/config/confighttp v0.0.0-20240314212739-0ebba1aceb06 // Temporary fix, pending PR https://github.com/shirou/gopsutil/pull/957 replace github.com/shirou/gopsutil/v3 => github.com/aws/telegraf/patches/gopsutil/v3 v3.0.0-20231109213610-a8c21c54a2be // indirect diff --git a/go.sum b/go.sum index e104a0946c..5cb30b8ffa 100644 --- a/go.sum +++ b/go.sum @@ -134,44 +134,44 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1483 h1:J8HaD+Zpfi1gcel3HCKpoHHEsrcuRrZlSnx7R9SCf5I= -github.com/amazon-contributing/opentelemetry-collector-contrib/config/confighttp v0.0.0-20240301221517-9cb314e7d27b h1:JbyxYa3c8PQRpQZpEekKvWMTk2iSiT/M79WikF7vQQQ= -github.com/amazon-contributing/opentelemetry-collector-contrib/config/confighttp v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:3sU3HgF5wc32CVljnzGo4Fn/9+T0N1Z6tCJyKdW2MvM= -github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.0.0-20240301221517-9cb314e7d27b h1:ejIXrN48i5YDshcb+Kwy5IPgwfHvkUXMfdxzjbvVOMU= -github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:9L23Mib5WjvuWRMmLyZrH+OJyeDz0fEZ9e2ummzZlgU= -github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsemfexporter v0.0.0-20240301221517-9cb314e7d27b h1:82/jRNSmc+EzC63bGqfjFDSsQjPWU8OwxoJd9jpIJqI= -github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsemfexporter v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:wTGyQcKa708Ci78kpp+YNr4budNC5QRQ2tiD7LXFRwY= -github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.0.0-20240301221517-9cb314e7d27b h1:Q8OMVsAYFNVBZaxDXj2ZudGWZLeqx8kddMlAGY3GWIw= -github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:n5I9WMdSLqf1nngS88/Os8Ts2xF+jd0RxGVfEP46Xsk= +github.com/amazon-contributing/opentelemetry-collector-contrib/config/confighttp v0.0.0-20240314212739-0ebba1aceb06 h1:U6M4A2uej2fme7eT5qB5nLAzeVn5CC/Fo2leLk7xbzU= +github.com/amazon-contributing/opentelemetry-collector-contrib/config/confighttp v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:3sU3HgF5wc32CVljnzGo4Fn/9+T0N1Z6tCJyKdW2MvM= +github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.0.0-20240314212739-0ebba1aceb06 h1:Cmfz0fvwLL2fQVGEWXNI3FG6INTt3LeX7Ew0W5G/hZc= +github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:9L23Mib5WjvuWRMmLyZrH+OJyeDz0fEZ9e2ummzZlgU= +github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsemfexporter v0.0.0-20240314212739-0ebba1aceb06 h1:RWbRxMrJ7j8hlE8CVPUbwf6bK0FDa/MCGr4N0rIAXxI= +github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsemfexporter v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:wTGyQcKa708Ci78kpp+YNr4budNC5QRQ2tiD7LXFRwY= +github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.0.0-20240314212739-0ebba1aceb06 h1:ebrvBIv9Fm4ISQfhFey3JJ+CQZO8XIbIFuuJ6DpGG3s= +github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:n5I9WMdSLqf1nngS88/Os8Ts2xF+jd0RxGVfEP46Xsk= github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20240301221517-9cb314e7d27b h1:HC4A222OXGHCZBqeYgF3Gn7b4Slhbqdq9eb3xqmfiyE= github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:5JOe6ISApVHBIsZuLb8ppaY06ujDcHCxYJE5wCymNoI= -github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsproxy v0.0.0-20240301221517-9cb314e7d27b h1:zVFqhr3y62aiZLtYQhUNekx9FOZjt9d5vXZm/zNq9Wc= -github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsproxy v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:9EAh+a7cph0PYSAW5xTv9HGMdWopom2dFUJd1AgwMNc= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/awsutil v0.0.0-20240301221517-9cb314e7d27b h1:6Zpwt33dpmekzVpel7D/QazzIQE6I9FSN75e5FTkVYE= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/awsutil v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:Mpe0DhouTXYDk/DyFDyQbjKpVxRTqahohQT5lidS2jY= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/containerinsight v0.0.0-20240301221517-9cb314e7d27b h1:FCzUDb9pW2vnoqoTeGjsx/kGP2qIpESCJfvR6OF+j+U= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/containerinsight v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:Xg5sUWQEuVshBnsZB7wxGDLf5DfzAqnFZGVbMHvoaj8= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/cwlogs v0.0.0-20240301221517-9cb314e7d27b h1:xNzkwWOjoLUiEzeOEZx/mtpnEXLh08eAjPyCCO7NreU= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/cwlogs v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:YNWxiYSLiIxOmw5hmA6jSnK8KVyru1JLX1OQeUCtCf8= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/k8s v0.0.0-20240301221517-9cb314e7d27b h1:l3uTt3PUxGpypKwU0YudxWILtybWpCoijoWW0c4FdhY= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/k8s v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:RNHBmikDFzPQ8GbL/UtLxiJ7xqbK5RrFsfUSnIjJJlE= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/proxy v0.0.0-20240301221517-9cb314e7d27b h1:3N0egSY+PxUT/wPil7ccBH3eayLuZVuTTfLIAXJHElI= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/proxy v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:UIrDCIdIOYvs4RAPPEz5p4nSKVw0aFLa5BrKo5ww0Is= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/xray v0.0.0-20240301221517-9cb314e7d27b h1:6yMzkipSRWcMpQzyrgdLUw6da8nKn5+4/75zpcP8ibg= -github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/xray v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:D6lmFdWbpYRttNnfkZJSs2ZZcAUGfe96/Vrm8tiK3Tw= +github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsproxy v0.0.0-20240314212739-0ebba1aceb06 h1:zm3h6O2qtQCr+blTNR4lSMgSh23C746UxoBb6J65/3c= +github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsproxy v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:9EAh+a7cph0PYSAW5xTv9HGMdWopom2dFUJd1AgwMNc= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/awsutil v0.0.0-20240314212739-0ebba1aceb06 h1:200ofnYqpg2qraBoqOU7b0l0yfzCTwS38GHLvHQcyBU= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/awsutil v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:Mpe0DhouTXYDk/DyFDyQbjKpVxRTqahohQT5lidS2jY= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/containerinsight v0.0.0-20240314212739-0ebba1aceb06 h1:8M/ierVGOxgEeZe2KvQlRaXjarNQAoJXar5yXLoD5vA= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/containerinsight v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:Xg5sUWQEuVshBnsZB7wxGDLf5DfzAqnFZGVbMHvoaj8= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/cwlogs v0.0.0-20240314212739-0ebba1aceb06 h1:f3+ySLrUl+VOrMuxiGPZSAl5/wADNKUB2bgJ7AYYhG0= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/cwlogs v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:YNWxiYSLiIxOmw5hmA6jSnK8KVyru1JLX1OQeUCtCf8= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/k8s v0.0.0-20240314212739-0ebba1aceb06 h1:vaEvcXr6ojcaxHXWcIuwz3ZG6my4qQtBtoNP1tJW02I= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/k8s v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:RNHBmikDFzPQ8GbL/UtLxiJ7xqbK5RrFsfUSnIjJJlE= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/proxy v0.0.0-20240314212739-0ebba1aceb06 h1:W42TFlgeaH7LyrGNBZX4t2MehswrWccuvV6hID2805k= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/proxy v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:UIrDCIdIOYvs4RAPPEz5p4nSKVw0aFLa5BrKo5ww0Is= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/xray v0.0.0-20240314212739-0ebba1aceb06 h1:rbmru2MR8226OfjUelY+6eMFdQzkkgTnUEh5XE7n1Nc= +github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/xray v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:D6lmFdWbpYRttNnfkZJSs2ZZcAUGfe96/Vrm8tiK3Tw= github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240301221517-9cb314e7d27b h1:96/K8X5jsdpzbJqTqbOuSR04zjlvrtUvxdxlxT4u9iM= github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:t/hYoRTnlPuRjh8y0BwVGgNvNIXpU2QJME5YVppUUHQ= -github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza v0.0.0-20240301221517-9cb314e7d27b h1:Mlj7UkmzRGqoQAAfqN74BTtZzXans4a6X/Lveu76ydE= -github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:7uCHpcHoawJsqoyPLxaFROWsZXPSF6/op3Hmw4pV4WE= -github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/translator/prometheus v0.0.0-20240301221517-9cb314e7d27b h1:yOA5poXBCcbcchcGRQYEL5pHUrwqJlZKz7Hs9J7mIP4= -github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/translator/prometheus v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:HXv8nyJ+RUHGLZMPbaPFnWKonYWNTJfZ9ZUudqtwudw= -github.com/amazon-contributing/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.0.0-20240301221517-9cb314e7d27b h1:HSD0iQwUJuRO1iXMxxZQ80WZF3Re/Y+ctm11kujMpr8= -github.com/amazon-contributing/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:L4/sIFbml9J28qd8i2aJGztmCg2FCCtfTdwikpu4JEs= -github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.0.0-20240301221517-9cb314e7d27b h1:BpHUBQvrBwqD/sl+4pus6Jk2q+vPQNk2Y9d4AAJGXd8= -github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:Cs6HCNy7eQcEkyqAoX8HRqkRrExKA31Sc7DIOJKoGRQ= -github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.0.0-20240301221517-9cb314e7d27b h1:JFW+DadLtUQC1LiuFLn7EQpOkxsf7fTRmTJeGS1/lc4= -github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:4IMYeZjU+IgZdXHuiLOIVtdp42lrMjk+rtlQpENeGSM= -github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20240301221517-9cb314e7d27b h1:I3Rws21xhtovJPhB60wSLzmhaN7ASWvOyO2vIysc0U8= -github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20240301221517-9cb314e7d27b/go.mod h1:fnNxw30DVmpiS3tt1nUETZH3g/boGnBLx7+hYwYd9EU= +github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza v0.0.0-20240314212739-0ebba1aceb06 h1:xvDBs4SV2IiHV0huHX0+QGa8ibRwbXjzVJHbK6jr3Jw= +github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:7uCHpcHoawJsqoyPLxaFROWsZXPSF6/op3Hmw4pV4WE= +github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/translator/prometheus v0.0.0-20240314212739-0ebba1aceb06 h1:Ws/BgyBsp77B29XPt8tGA7ChStTl4K4R/Yiuq/Aalgk= +github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/translator/prometheus v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:HXv8nyJ+RUHGLZMPbaPFnWKonYWNTJfZ9ZUudqtwudw= +github.com/amazon-contributing/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.0.0-20240314212739-0ebba1aceb06 h1:4obk//L4XQkjW5zRFqON9csRXY/bWViaxBD06YmCwLo= +github.com/amazon-contributing/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:L4/sIFbml9J28qd8i2aJGztmCg2FCCtfTdwikpu4JEs= +github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.0.0-20240314212739-0ebba1aceb06 h1:uVXn7PU0twNoSczZnF4g2UgZ+cHWbeKUMrUobY1qsgQ= +github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:Cs6HCNy7eQcEkyqAoX8HRqkRrExKA31Sc7DIOJKoGRQ= +github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.0.0-20240314212739-0ebba1aceb06 h1:l0xWl5t9VWfGZT33OjSxjg3ZyrQ9KB40KBxrAVkDLTE= +github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:4IMYeZjU+IgZdXHuiLOIVtdp42lrMjk+rtlQpENeGSM= +github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20240314212739-0ebba1aceb06 h1:StVmvNvsO7EjwS56Ahd0pMqs3orYZegX0DmfnvWqxJo= +github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20240314212739-0ebba1aceb06/go.mod h1:fnNxw30DVmpiS3tt1nUETZH3g/boGnBLx7+hYwYd9EU= github.com/amir/raidman v0.0.0-20170415203553-1ccc43bfb9c9 h1:FXrPTd8Rdlc94dKccl7KPmdmIbVh/OjelJ8/vgMRzcQ= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/antchfx/jsonquery v1.1.5 h1:1YWrNFYCcIuJPIjFeOP5b6TXbLSUYY8qqxWbuZOB1qE= diff --git a/plugins/processors/gpuattributes/processor.go b/plugins/processors/gpuattributes/processor.go index 6d54eece81..e06b2c7c40 100644 --- a/plugins/processors/gpuattributes/processor.go +++ b/plugins/processors/gpuattributes/processor.go @@ -53,6 +53,7 @@ var containerLabelFilter = map[string]map[string]interface{}{ containerinsightscommon.TypeService: nil, containerinsightscommon.GpuUniqueId: nil, containerinsightscommon.ContainerNamekey: nil, + containerinsightscommon.InstanceTypeKey: nil, containerinsightscommon.VersionKey: nil, containerinsightscommon.SourcesKey: nil, containerinsightscommon.Timestamp: nil, @@ -68,19 +69,20 @@ var containerLabelFilter = map[string]map[string]interface{}{ }, } var podLabelFilter = map[string]map[string]interface{}{ - containerinsightscommon.ClusterNameKey: nil, - containerinsightscommon.InstanceIdKey: nil, - containerinsightscommon.GpuDeviceKey: nil, - containerinsightscommon.MetricType: nil, - containerinsightscommon.NodeNameKey: nil, - containerinsightscommon.K8sNamespace: nil, - containerinsightscommon.FullPodNameKey: nil, - containerinsightscommon.PodNameKey: nil, - containerinsightscommon.TypeService: nil, - containerinsightscommon.GpuUniqueId: nil, - containerinsightscommon.VersionKey: nil, - containerinsightscommon.SourcesKey: nil, - containerinsightscommon.Timestamp: nil, + containerinsightscommon.ClusterNameKey: nil, + containerinsightscommon.InstanceIdKey: nil, + containerinsightscommon.GpuDeviceKey: nil, + containerinsightscommon.MetricType: nil, + containerinsightscommon.NodeNameKey: nil, + containerinsightscommon.K8sNamespace: nil, + containerinsightscommon.FullPodNameKey: nil, + containerinsightscommon.PodNameKey: nil, + containerinsightscommon.TypeService: nil, + containerinsightscommon.GpuUniqueId: nil, + containerinsightscommon.InstanceTypeKey: nil, + containerinsightscommon.VersionKey: nil, + containerinsightscommon.SourcesKey: nil, + containerinsightscommon.Timestamp: nil, containerinsightscommon.K8sKey: { containerinsightscommon.HostKey: nil, "labels": nil, @@ -91,14 +93,15 @@ var podLabelFilter = map[string]map[string]interface{}{ }, } var nodeLabelFilter = map[string]map[string]interface{}{ - containerinsightscommon.ClusterNameKey: nil, - containerinsightscommon.InstanceIdKey: nil, - containerinsightscommon.GpuDeviceKey: nil, - containerinsightscommon.MetricType: nil, - containerinsightscommon.NodeNameKey: nil, - containerinsightscommon.VersionKey: nil, - containerinsightscommon.SourcesKey: nil, - containerinsightscommon.Timestamp: nil, + containerinsightscommon.ClusterNameKey: nil, + containerinsightscommon.InstanceIdKey: nil, + containerinsightscommon.GpuDeviceKey: nil, + containerinsightscommon.MetricType: nil, + containerinsightscommon.NodeNameKey: nil, + containerinsightscommon.InstanceTypeKey: nil, + containerinsightscommon.VersionKey: nil, + containerinsightscommon.SourcesKey: nil, + containerinsightscommon.Timestamp: nil, containerinsightscommon.K8sKey: { containerinsightscommon.HostKey: nil, }, diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml index f4498809a6..1eda7e5290 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml @@ -387,6 +387,7 @@ exporters: - - ClusterName - GpuDevice - InstanceId + - InstanceType - NodeName label_matchers: [] metric_name_selectors: @@ -396,7 +397,6 @@ exporters: - node_gpu_memory_used - node_gpu_power_draw - node_gpu_temperature - - node_gpu_fan_speed - dimensions: - - ClusterName - InstanceId diff --git a/translator/translate/otel/exporter/awsemf/kubernetes.go b/translator/translate/otel/exporter/awsemf/kubernetes.go index f72a32ef73..8b62ac773f 100644 --- a/translator/translate/otel/exporter/awsemf/kubernetes.go +++ b/translator/translate/otel/exporter/awsemf/kubernetes.go @@ -489,7 +489,7 @@ func getGPUMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.MetricDeclar }, }, { - Dimensions: [][]string{{"ClusterName"}, {"ClusterName", "NodeName", "InstanceId"}, {"ClusterName", "NodeName", "InstanceId", "GpuDevice"}}, + Dimensions: [][]string{{"ClusterName"}, {"ClusterName", "NodeName", "InstanceId"}, {"ClusterName", "NodeName", "InstanceId", "InstanceType", "GpuDevice"}}, MetricNameSelectors: []string{ "node_gpu_utilization", "node_gpu_memory_utilization", @@ -497,7 +497,6 @@ func getGPUMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.MetricDeclar "node_gpu_memory_used", "node_gpu_power_draw", "node_gpu_temperature", - "node_gpu_fan_speed", }, }, { diff --git a/translator/translate/otel/exporter/awsemf/translator_test.go b/translator/translate/otel/exporter/awsemf/translator_test.go index 46103c5de9..11ef06529a 100644 --- a/translator/translate/otel/exporter/awsemf/translator_test.go +++ b/translator/translate/otel/exporter/awsemf/translator_test.go @@ -412,9 +412,9 @@ func TestTranslator(t *testing.T) { }, }, { - Dimensions: [][]string{{"ClusterName"}, {"ClusterName", "NodeName", "InstanceId"}, {"ClusterName", "NodeName", "InstanceId", "GpuDevice"}}, + Dimensions: [][]string{{"ClusterName"}, {"ClusterName", "NodeName", "InstanceId"}, {"ClusterName", "NodeName", "InstanceId", "InstanceType", "GpuDevice"}}, MetricNameSelectors: []string{ - "node_gpu_utilization", "node_gpu_memory_utilization", "node_gpu_memory_total", "node_gpu_memory_used", "node_gpu_power_draw", "node_gpu_temperature", "node_gpu_fan_speed", + "node_gpu_utilization", "node_gpu_memory_utilization", "node_gpu_memory_total", "node_gpu_memory_used", "node_gpu_power_draw", "node_gpu_temperature", }, }, {