From 74294cb3fd989b3e574ad776a2e397b3e5f5ec4d Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 12 Jan 2024 10:09:23 -0700 Subject: [PATCH] [receiver/kubeletstats] Start name change for cpu.utilization (#25901) **Description:** Starts the name change processor for `*.cpu.utilization` metrics. **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/24905 Related to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27885 --- ...tstats-start-changing-cpu-utilization.yaml | 27 +++ .../kubeletstatsreceiver/documentation.md | 30 ++- .../internal/kubelet/cpu.go | 1 + .../internal/metadata/generated_config.go | 12 ++ .../metadata/generated_config_test.go | 6 + .../internal/metadata/generated_metrics.go | 186 +++++++++++++++++- .../metadata/generated_metrics_test.go | 63 +++++- .../internal/metadata/metrics.go | 4 + .../internal/metadata/testdata/config.yaml | 12 ++ receiver/kubeletstatsreceiver/metadata.yaml | 33 +++- .../testdata/e2e/expected.yaml | 2 +- .../scraper/test_scraper_expected.yaml | 38 ++-- ..._metadata_Container_Metadata_expected.yaml | 18 +- ...ith_metric_groups_all_groups_expected.yaml | 38 ++-- ..._groups_only_container_group_expected.yaml | 18 +- ...etric_groups_only_node_group_expected.yaml | 2 +- ...metric_groups_only_pod_group_expected.yaml | 18 +- ...c_groups_pod_and_node_groups_expected.yaml | 20 +- 18 files changed, 439 insertions(+), 89 deletions(-) create mode 100755 .chloggen/kubeletstats-start-changing-cpu-utilization.yaml diff --git a/.chloggen/kubeletstats-start-changing-cpu-utilization.yaml b/.chloggen/kubeletstats-start-changing-cpu-utilization.yaml new file mode 100755 index 000000000000..c96eb873164d --- /dev/null +++ b/.chloggen/kubeletstats-start-changing-cpu-utilization.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: kubeletstatsreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add new `*.cpu.usage` metrics. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [25901] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/receiver/kubeletstatsreceiver/documentation.md b/receiver/kubeletstatsreceiver/documentation.md index 2b00e234a653..7f9687acc30b 100644 --- a/receiver/kubeletstatsreceiver/documentation.md +++ b/receiver/kubeletstatsreceiver/documentation.md @@ -14,7 +14,7 @@ metrics: ### container.cpu.time -Container CPU time +Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -102,7 +102,7 @@ Container memory working_set ### k8s.node.cpu.time -Node CPU time +Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -220,7 +220,7 @@ Node network IO ### k8s.pod.cpu.time -Pod CPU time +Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -386,6 +386,14 @@ metrics: enabled: true ``` +### container.cpu.usage + +Total CPU usage (sum of all cores per second) averaged over the sample window + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| {cpu} | Gauge | Double | + ### container.uptime The time since the container started @@ -426,6 +434,14 @@ Container memory utilization as a ratio of the container's requests | ---- | ----------- | ---------- | | 1 | Gauge | Double | +### k8s.node.cpu.usage + +Total CPU usage (sum of all cores per second) averaged over the sample window + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| {cpu} | Gauge | Double | + ### k8s.node.uptime The time since the node started @@ -434,6 +450,14 @@ The time since the node started | ---- | ----------- | ---------- | ----------------------- | --------- | | s | Sum | Int | Cumulative | true | +### k8s.pod.cpu.usage + +Total CPU usage (sum of all cores per second) averaged over the sample window + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| {cpu} | Gauge | Double | + ### k8s.pod.cpu_limit_utilization Pod cpu utilization as a ratio of the pod's total container limits. If any container is missing a limit the metric is not emitted. diff --git a/receiver/kubeletstatsreceiver/internal/kubelet/cpu.go b/receiver/kubeletstatsreceiver/internal/kubelet/cpu.go index 00ec2e00451f..15507649147f 100644 --- a/receiver/kubeletstatsreceiver/internal/kubelet/cpu.go +++ b/receiver/kubeletstatsreceiver/internal/kubelet/cpu.go @@ -24,6 +24,7 @@ func addCPUUsageMetric(mb *metadata.MetricsBuilder, cpuMetrics metadata.CPUMetri } value := float64(*s.UsageNanoCores) / 1_000_000_000 cpuMetrics.Utilization(mb, currentTime, value) + cpuMetrics.Usage(mb, currentTime, value) if r.cpuLimit > 0 { cpuMetrics.LimitUtilization(mb, currentTime, value/r.cpuLimit) diff --git a/receiver/kubeletstatsreceiver/internal/metadata/generated_config.go b/receiver/kubeletstatsreceiver/internal/metadata/generated_config.go index 645064c07526..a7d7a70dcb32 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/generated_config.go +++ b/receiver/kubeletstatsreceiver/internal/metadata/generated_config.go @@ -26,6 +26,7 @@ func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error { // MetricsConfig provides config for kubeletstats metrics. type MetricsConfig struct { ContainerCPUTime MetricConfig `mapstructure:"container.cpu.time"` + ContainerCPUUsage MetricConfig `mapstructure:"container.cpu.usage"` ContainerCPUUtilization MetricConfig `mapstructure:"container.cpu.utilization"` ContainerFilesystemAvailable MetricConfig `mapstructure:"container.filesystem.available"` ContainerFilesystemCapacity MetricConfig `mapstructure:"container.filesystem.capacity"` @@ -42,6 +43,7 @@ type MetricsConfig struct { K8sContainerMemoryLimitUtilization MetricConfig `mapstructure:"k8s.container.memory_limit_utilization"` K8sContainerMemoryRequestUtilization MetricConfig `mapstructure:"k8s.container.memory_request_utilization"` K8sNodeCPUTime MetricConfig `mapstructure:"k8s.node.cpu.time"` + K8sNodeCPUUsage MetricConfig `mapstructure:"k8s.node.cpu.usage"` K8sNodeCPUUtilization MetricConfig `mapstructure:"k8s.node.cpu.utilization"` K8sNodeFilesystemAvailable MetricConfig `mapstructure:"k8s.node.filesystem.available"` K8sNodeFilesystemCapacity MetricConfig `mapstructure:"k8s.node.filesystem.capacity"` @@ -56,6 +58,7 @@ type MetricsConfig struct { K8sNodeNetworkIo MetricConfig `mapstructure:"k8s.node.network.io"` K8sNodeUptime MetricConfig `mapstructure:"k8s.node.uptime"` K8sPodCPUTime MetricConfig `mapstructure:"k8s.pod.cpu.time"` + K8sPodCPUUsage MetricConfig `mapstructure:"k8s.pod.cpu.usage"` K8sPodCPUUtilization MetricConfig `mapstructure:"k8s.pod.cpu.utilization"` K8sPodCPULimitUtilization MetricConfig `mapstructure:"k8s.pod.cpu_limit_utilization"` K8sPodCPURequestUtilization MetricConfig `mapstructure:"k8s.pod.cpu_request_utilization"` @@ -85,6 +88,9 @@ func DefaultMetricsConfig() MetricsConfig { ContainerCPUTime: MetricConfig{ Enabled: true, }, + ContainerCPUUsage: MetricConfig{ + Enabled: false, + }, ContainerCPUUtilization: MetricConfig{ Enabled: true, }, @@ -133,6 +139,9 @@ func DefaultMetricsConfig() MetricsConfig { K8sNodeCPUTime: MetricConfig{ Enabled: true, }, + K8sNodeCPUUsage: MetricConfig{ + Enabled: false, + }, K8sNodeCPUUtilization: MetricConfig{ Enabled: true, }, @@ -175,6 +184,9 @@ func DefaultMetricsConfig() MetricsConfig { K8sPodCPUTime: MetricConfig{ Enabled: true, }, + K8sPodCPUUsage: MetricConfig{ + Enabled: false, + }, K8sPodCPUUtilization: MetricConfig{ Enabled: true, }, diff --git a/receiver/kubeletstatsreceiver/internal/metadata/generated_config_test.go b/receiver/kubeletstatsreceiver/internal/metadata/generated_config_test.go index 7b1259eff5ec..91ecb174c7a1 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/generated_config_test.go +++ b/receiver/kubeletstatsreceiver/internal/metadata/generated_config_test.go @@ -27,6 +27,7 @@ func TestMetricsBuilderConfig(t *testing.T) { want: MetricsBuilderConfig{ Metrics: MetricsConfig{ ContainerCPUTime: MetricConfig{Enabled: true}, + ContainerCPUUsage: MetricConfig{Enabled: true}, ContainerCPUUtilization: MetricConfig{Enabled: true}, ContainerFilesystemAvailable: MetricConfig{Enabled: true}, ContainerFilesystemCapacity: MetricConfig{Enabled: true}, @@ -43,6 +44,7 @@ func TestMetricsBuilderConfig(t *testing.T) { K8sContainerMemoryLimitUtilization: MetricConfig{Enabled: true}, K8sContainerMemoryRequestUtilization: MetricConfig{Enabled: true}, K8sNodeCPUTime: MetricConfig{Enabled: true}, + K8sNodeCPUUsage: MetricConfig{Enabled: true}, K8sNodeCPUUtilization: MetricConfig{Enabled: true}, K8sNodeFilesystemAvailable: MetricConfig{Enabled: true}, K8sNodeFilesystemCapacity: MetricConfig{Enabled: true}, @@ -57,6 +59,7 @@ func TestMetricsBuilderConfig(t *testing.T) { K8sNodeNetworkIo: MetricConfig{Enabled: true}, K8sNodeUptime: MetricConfig{Enabled: true}, K8sPodCPUTime: MetricConfig{Enabled: true}, + K8sPodCPUUsage: MetricConfig{Enabled: true}, K8sPodCPUUtilization: MetricConfig{Enabled: true}, K8sPodCPULimitUtilization: MetricConfig{Enabled: true}, K8sPodCPURequestUtilization: MetricConfig{Enabled: true}, @@ -104,6 +107,7 @@ func TestMetricsBuilderConfig(t *testing.T) { want: MetricsBuilderConfig{ Metrics: MetricsConfig{ ContainerCPUTime: MetricConfig{Enabled: false}, + ContainerCPUUsage: MetricConfig{Enabled: false}, ContainerCPUUtilization: MetricConfig{Enabled: false}, ContainerFilesystemAvailable: MetricConfig{Enabled: false}, ContainerFilesystemCapacity: MetricConfig{Enabled: false}, @@ -120,6 +124,7 @@ func TestMetricsBuilderConfig(t *testing.T) { K8sContainerMemoryLimitUtilization: MetricConfig{Enabled: false}, K8sContainerMemoryRequestUtilization: MetricConfig{Enabled: false}, K8sNodeCPUTime: MetricConfig{Enabled: false}, + K8sNodeCPUUsage: MetricConfig{Enabled: false}, K8sNodeCPUUtilization: MetricConfig{Enabled: false}, K8sNodeFilesystemAvailable: MetricConfig{Enabled: false}, K8sNodeFilesystemCapacity: MetricConfig{Enabled: false}, @@ -134,6 +139,7 @@ func TestMetricsBuilderConfig(t *testing.T) { K8sNodeNetworkIo: MetricConfig{Enabled: false}, K8sNodeUptime: MetricConfig{Enabled: false}, K8sPodCPUTime: MetricConfig{Enabled: false}, + K8sPodCPUUsage: MetricConfig{Enabled: false}, K8sPodCPUUtilization: MetricConfig{Enabled: false}, K8sPodCPULimitUtilization: MetricConfig{Enabled: false}, K8sPodCPURequestUtilization: MetricConfig{Enabled: false}, diff --git a/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics.go b/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics.go index 03f94dc800bf..3f312391aba5 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics.go +++ b/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics.go @@ -46,7 +46,7 @@ type metricContainerCPUTime struct { // init fills container.cpu.time metric with initial data. func (m *metricContainerCPUTime) init() { m.data.SetName("container.cpu.time") - m.data.SetDescription("Container CPU time") + m.data.SetDescription("Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation") m.data.SetUnit("s") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -88,6 +88,55 @@ func newMetricContainerCPUTime(cfg MetricConfig) metricContainerCPUTime { return m } +type metricContainerCPUUsage struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills container.cpu.usage metric with initial data. +func (m *metricContainerCPUUsage) init() { + m.data.SetName("container.cpu.usage") + m.data.SetDescription("Total CPU usage (sum of all cores per second) averaged over the sample window") + m.data.SetUnit("{cpu}") + m.data.SetEmptyGauge() +} + +func (m *metricContainerCPUUsage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { + if !m.config.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetDoubleValue(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricContainerCPUUsage) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricContainerCPUUsage) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricContainerCPUUsage(cfg MetricConfig) metricContainerCPUUsage { + m := metricContainerCPUUsage{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + type metricContainerCPUUtilization struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. @@ -834,7 +883,7 @@ type metricK8sNodeCPUTime struct { // init fills k8s.node.cpu.time metric with initial data. func (m *metricK8sNodeCPUTime) init() { m.data.SetName("k8s.node.cpu.time") - m.data.SetDescription("Node CPU time") + m.data.SetDescription("Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation") m.data.SetUnit("s") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -876,6 +925,55 @@ func newMetricK8sNodeCPUTime(cfg MetricConfig) metricK8sNodeCPUTime { return m } +type metricK8sNodeCPUUsage struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills k8s.node.cpu.usage metric with initial data. +func (m *metricK8sNodeCPUUsage) init() { + m.data.SetName("k8s.node.cpu.usage") + m.data.SetDescription("Total CPU usage (sum of all cores per second) averaged over the sample window") + m.data.SetUnit("{cpu}") + m.data.SetEmptyGauge() +} + +func (m *metricK8sNodeCPUUsage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { + if !m.config.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetDoubleValue(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricK8sNodeCPUUsage) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricK8sNodeCPUUsage) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricK8sNodeCPUUsage(cfg MetricConfig) metricK8sNodeCPUUsage { + m := metricK8sNodeCPUUsage{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + type metricK8sNodeCPUUtilization struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. @@ -1534,7 +1632,7 @@ type metricK8sPodCPUTime struct { // init fills k8s.pod.cpu.time metric with initial data. func (m *metricK8sPodCPUTime) init() { m.data.SetName("k8s.pod.cpu.time") - m.data.SetDescription("Pod CPU time") + m.data.SetDescription("Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation") m.data.SetUnit("s") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -1576,6 +1674,55 @@ func newMetricK8sPodCPUTime(cfg MetricConfig) metricK8sPodCPUTime { return m } +type metricK8sPodCPUUsage struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills k8s.pod.cpu.usage metric with initial data. +func (m *metricK8sPodCPUUsage) init() { + m.data.SetName("k8s.pod.cpu.usage") + m.data.SetDescription("Total CPU usage (sum of all cores per second) averaged over the sample window") + m.data.SetUnit("{cpu}") + m.data.SetEmptyGauge() +} + +func (m *metricK8sPodCPUUsage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { + if !m.config.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetDoubleValue(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricK8sPodCPUUsage) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricK8sPodCPUUsage) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricK8sPodCPUUsage(cfg MetricConfig) metricK8sPodCPUUsage { + m := metricK8sPodCPUUsage{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + type metricK8sPodCPUUtilization struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. @@ -2675,6 +2822,7 @@ type MetricsBuilder struct { metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. buildInfo component.BuildInfo // contains version information. metricContainerCPUTime metricContainerCPUTime + metricContainerCPUUsage metricContainerCPUUsage metricContainerCPUUtilization metricContainerCPUUtilization metricContainerFilesystemAvailable metricContainerFilesystemAvailable metricContainerFilesystemCapacity metricContainerFilesystemCapacity @@ -2691,6 +2839,7 @@ type MetricsBuilder struct { metricK8sContainerMemoryLimitUtilization metricK8sContainerMemoryLimitUtilization metricK8sContainerMemoryRequestUtilization metricK8sContainerMemoryRequestUtilization metricK8sNodeCPUTime metricK8sNodeCPUTime + metricK8sNodeCPUUsage metricK8sNodeCPUUsage metricK8sNodeCPUUtilization metricK8sNodeCPUUtilization metricK8sNodeFilesystemAvailable metricK8sNodeFilesystemAvailable metricK8sNodeFilesystemCapacity metricK8sNodeFilesystemCapacity @@ -2705,6 +2854,7 @@ type MetricsBuilder struct { metricK8sNodeNetworkIo metricK8sNodeNetworkIo metricK8sNodeUptime metricK8sNodeUptime metricK8sPodCPUTime metricK8sPodCPUTime + metricK8sPodCPUUsage metricK8sPodCPUUsage metricK8sPodCPUUtilization metricK8sPodCPUUtilization metricK8sPodCPULimitUtilization metricK8sPodCPULimitUtilization metricK8sPodCPURequestUtilization metricK8sPodCPURequestUtilization @@ -2740,12 +2890,22 @@ func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption { } func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSettings, options ...metricBuilderOption) *MetricsBuilder { + if mbc.Metrics.ContainerCPUUtilization.Enabled { + settings.Logger.Warn("[WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead.") + } + if mbc.Metrics.K8sNodeCPUUtilization.Enabled { + settings.Logger.Warn("[WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead.") + } + if mbc.Metrics.K8sPodCPUUtilization.Enabled { + settings.Logger.Warn("[WARNING] `k8s.pod.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead.") + } mb := &MetricsBuilder{ config: mbc, startTime: pcommon.NewTimestampFromTime(time.Now()), metricsBuffer: pmetric.NewMetrics(), buildInfo: settings.BuildInfo, metricContainerCPUTime: newMetricContainerCPUTime(mbc.Metrics.ContainerCPUTime), + metricContainerCPUUsage: newMetricContainerCPUUsage(mbc.Metrics.ContainerCPUUsage), metricContainerCPUUtilization: newMetricContainerCPUUtilization(mbc.Metrics.ContainerCPUUtilization), metricContainerFilesystemAvailable: newMetricContainerFilesystemAvailable(mbc.Metrics.ContainerFilesystemAvailable), metricContainerFilesystemCapacity: newMetricContainerFilesystemCapacity(mbc.Metrics.ContainerFilesystemCapacity), @@ -2762,6 +2922,7 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSetting metricK8sContainerMemoryLimitUtilization: newMetricK8sContainerMemoryLimitUtilization(mbc.Metrics.K8sContainerMemoryLimitUtilization), metricK8sContainerMemoryRequestUtilization: newMetricK8sContainerMemoryRequestUtilization(mbc.Metrics.K8sContainerMemoryRequestUtilization), metricK8sNodeCPUTime: newMetricK8sNodeCPUTime(mbc.Metrics.K8sNodeCPUTime), + metricK8sNodeCPUUsage: newMetricK8sNodeCPUUsage(mbc.Metrics.K8sNodeCPUUsage), metricK8sNodeCPUUtilization: newMetricK8sNodeCPUUtilization(mbc.Metrics.K8sNodeCPUUtilization), metricK8sNodeFilesystemAvailable: newMetricK8sNodeFilesystemAvailable(mbc.Metrics.K8sNodeFilesystemAvailable), metricK8sNodeFilesystemCapacity: newMetricK8sNodeFilesystemCapacity(mbc.Metrics.K8sNodeFilesystemCapacity), @@ -2776,6 +2937,7 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSetting metricK8sNodeNetworkIo: newMetricK8sNodeNetworkIo(mbc.Metrics.K8sNodeNetworkIo), metricK8sNodeUptime: newMetricK8sNodeUptime(mbc.Metrics.K8sNodeUptime), metricK8sPodCPUTime: newMetricK8sPodCPUTime(mbc.Metrics.K8sPodCPUTime), + metricK8sPodCPUUsage: newMetricK8sPodCPUUsage(mbc.Metrics.K8sPodCPUUsage), metricK8sPodCPUUtilization: newMetricK8sPodCPUUtilization(mbc.Metrics.K8sPodCPUUtilization), metricK8sPodCPULimitUtilization: newMetricK8sPodCPULimitUtilization(mbc.Metrics.K8sPodCPULimitUtilization), metricK8sPodCPURequestUtilization: newMetricK8sPodCPURequestUtilization(mbc.Metrics.K8sPodCPURequestUtilization), @@ -2860,6 +3022,7 @@ func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { ils.Scope().SetVersion(mb.buildInfo.Version) ils.Metrics().EnsureCapacity(mb.metricsCapacity) mb.metricContainerCPUTime.emit(ils.Metrics()) + mb.metricContainerCPUUsage.emit(ils.Metrics()) mb.metricContainerCPUUtilization.emit(ils.Metrics()) mb.metricContainerFilesystemAvailable.emit(ils.Metrics()) mb.metricContainerFilesystemCapacity.emit(ils.Metrics()) @@ -2876,6 +3039,7 @@ func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { mb.metricK8sContainerMemoryLimitUtilization.emit(ils.Metrics()) mb.metricK8sContainerMemoryRequestUtilization.emit(ils.Metrics()) mb.metricK8sNodeCPUTime.emit(ils.Metrics()) + mb.metricK8sNodeCPUUsage.emit(ils.Metrics()) mb.metricK8sNodeCPUUtilization.emit(ils.Metrics()) mb.metricK8sNodeFilesystemAvailable.emit(ils.Metrics()) mb.metricK8sNodeFilesystemCapacity.emit(ils.Metrics()) @@ -2890,6 +3054,7 @@ func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { mb.metricK8sNodeNetworkIo.emit(ils.Metrics()) mb.metricK8sNodeUptime.emit(ils.Metrics()) mb.metricK8sPodCPUTime.emit(ils.Metrics()) + mb.metricK8sPodCPUUsage.emit(ils.Metrics()) mb.metricK8sPodCPUUtilization.emit(ils.Metrics()) mb.metricK8sPodCPULimitUtilization.emit(ils.Metrics()) mb.metricK8sPodCPURequestUtilization.emit(ils.Metrics()) @@ -2937,6 +3102,11 @@ func (mb *MetricsBuilder) RecordContainerCPUTimeDataPoint(ts pcommon.Timestamp, mb.metricContainerCPUTime.recordDataPoint(mb.startTime, ts, val) } +// RecordContainerCPUUsageDataPoint adds a data point to container.cpu.usage metric. +func (mb *MetricsBuilder) RecordContainerCPUUsageDataPoint(ts pcommon.Timestamp, val float64) { + mb.metricContainerCPUUsage.recordDataPoint(mb.startTime, ts, val) +} + // RecordContainerCPUUtilizationDataPoint adds a data point to container.cpu.utilization metric. func (mb *MetricsBuilder) RecordContainerCPUUtilizationDataPoint(ts pcommon.Timestamp, val float64) { mb.metricContainerCPUUtilization.recordDataPoint(mb.startTime, ts, val) @@ -3017,6 +3187,11 @@ func (mb *MetricsBuilder) RecordK8sNodeCPUTimeDataPoint(ts pcommon.Timestamp, va mb.metricK8sNodeCPUTime.recordDataPoint(mb.startTime, ts, val) } +// RecordK8sNodeCPUUsageDataPoint adds a data point to k8s.node.cpu.usage metric. +func (mb *MetricsBuilder) RecordK8sNodeCPUUsageDataPoint(ts pcommon.Timestamp, val float64) { + mb.metricK8sNodeCPUUsage.recordDataPoint(mb.startTime, ts, val) +} + // RecordK8sNodeCPUUtilizationDataPoint adds a data point to k8s.node.cpu.utilization metric. func (mb *MetricsBuilder) RecordK8sNodeCPUUtilizationDataPoint(ts pcommon.Timestamp, val float64) { mb.metricK8sNodeCPUUtilization.recordDataPoint(mb.startTime, ts, val) @@ -3087,6 +3262,11 @@ func (mb *MetricsBuilder) RecordK8sPodCPUTimeDataPoint(ts pcommon.Timestamp, val mb.metricK8sPodCPUTime.recordDataPoint(mb.startTime, ts, val) } +// RecordK8sPodCPUUsageDataPoint adds a data point to k8s.pod.cpu.usage metric. +func (mb *MetricsBuilder) RecordK8sPodCPUUsageDataPoint(ts pcommon.Timestamp, val float64) { + mb.metricK8sPodCPUUsage.recordDataPoint(mb.startTime, ts, val) +} + // RecordK8sPodCPUUtilizationDataPoint adds a data point to k8s.pod.cpu.utilization metric. func (mb *MetricsBuilder) RecordK8sPodCPUUtilizationDataPoint(ts pcommon.Timestamp, val float64) { mb.metricK8sPodCPUUtilization.recordDataPoint(mb.startTime, ts, val) diff --git a/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics_test.go b/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics_test.go index 779fe477bf9c..ad03beaee512 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics_test.go @@ -49,6 +49,18 @@ func TestMetricsBuilder(t *testing.T) { mb := NewMetricsBuilder(loadMetricsBuilderConfig(t, test.name), settings, WithStartTime(start)) expectedWarnings := 0 + if test.configSet == testSetDefault || test.configSet == testSetAll { + assert.Equal(t, "[WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + if test.configSet == testSetDefault || test.configSet == testSetAll { + assert.Equal(t, "[WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + if test.configSet == testSetDefault || test.configSet == testSetAll { + assert.Equal(t, "[WARNING] `k8s.pod.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } assert.Equal(t, expectedWarnings, observedLogs.Len()) @@ -59,6 +71,9 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordContainerCPUTimeDataPoint(ts, 1) + allMetricsCount++ + mb.RecordContainerCPUUsageDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordContainerCPUUtilizationDataPoint(ts, 1) @@ -118,6 +133,9 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordK8sNodeCPUTimeDataPoint(ts, 1) + allMetricsCount++ + mb.RecordK8sNodeCPUUsageDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordK8sNodeCPUUtilizationDataPoint(ts, 1) @@ -173,6 +191,9 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordK8sPodCPUTimeDataPoint(ts, 1) + allMetricsCount++ + mb.RecordK8sPodCPUUsageDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordK8sPodCPUUtilizationDataPoint(ts, 1) @@ -299,7 +320,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.cpu.time"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Container CPU time", ms.At(i).Description()) + assert.Equal(t, "Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation", ms.At(i).Description()) assert.Equal(t, "s", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -308,6 +329,18 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, ts, dp.Timestamp()) assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) assert.Equal(t, float64(1), dp.DoubleValue()) + case "container.cpu.usage": + assert.False(t, validatedMetrics["container.cpu.usage"], "Found a duplicate in the metrics slice: container.cpu.usage") + validatedMetrics["container.cpu.usage"] = true + assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) + assert.Equal(t, "Total CPU usage (sum of all cores per second) averaged over the sample window", ms.At(i).Description()) + assert.Equal(t, "{cpu}", ms.At(i).Unit()) + dp := ms.At(i).Gauge().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) + assert.Equal(t, float64(1), dp.DoubleValue()) case "container.cpu.utilization": assert.False(t, validatedMetrics["container.cpu.utilization"], "Found a duplicate in the metrics slice: container.cpu.utilization") validatedMetrics["container.cpu.utilization"] = true @@ -495,7 +528,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["k8s.node.cpu.time"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Node CPU time", ms.At(i).Description()) + assert.Equal(t, "Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation", ms.At(i).Description()) assert.Equal(t, "s", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -504,6 +537,18 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, ts, dp.Timestamp()) assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) assert.Equal(t, float64(1), dp.DoubleValue()) + case "k8s.node.cpu.usage": + assert.False(t, validatedMetrics["k8s.node.cpu.usage"], "Found a duplicate in the metrics slice: k8s.node.cpu.usage") + validatedMetrics["k8s.node.cpu.usage"] = true + assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) + assert.Equal(t, "Total CPU usage (sum of all cores per second) averaged over the sample window", ms.At(i).Description()) + assert.Equal(t, "{cpu}", ms.At(i).Unit()) + dp := ms.At(i).Gauge().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) + assert.Equal(t, float64(1), dp.DoubleValue()) case "k8s.node.cpu.utilization": assert.False(t, validatedMetrics["k8s.node.cpu.utilization"], "Found a duplicate in the metrics slice: k8s.node.cpu.utilization") validatedMetrics["k8s.node.cpu.utilization"] = true @@ -683,7 +728,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["k8s.pod.cpu.time"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Pod CPU time", ms.At(i).Description()) + assert.Equal(t, "Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation", ms.At(i).Description()) assert.Equal(t, "s", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -692,6 +737,18 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, ts, dp.Timestamp()) assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) assert.Equal(t, float64(1), dp.DoubleValue()) + case "k8s.pod.cpu.usage": + assert.False(t, validatedMetrics["k8s.pod.cpu.usage"], "Found a duplicate in the metrics slice: k8s.pod.cpu.usage") + validatedMetrics["k8s.pod.cpu.usage"] = true + assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) + assert.Equal(t, "Total CPU usage (sum of all cores per second) averaged over the sample window", ms.At(i).Description()) + assert.Equal(t, "{cpu}", ms.At(i).Unit()) + dp := ms.At(i).Gauge().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) + assert.Equal(t, float64(1), dp.DoubleValue()) case "k8s.pod.cpu.utilization": assert.False(t, validatedMetrics["k8s.pod.cpu.utilization"], "Found a duplicate in the metrics slice: k8s.pod.cpu.utilization") validatedMetrics["k8s.pod.cpu.utilization"] = true diff --git a/receiver/kubeletstatsreceiver/internal/metadata/metrics.go b/receiver/kubeletstatsreceiver/internal/metadata/metrics.go index 7aef32500de8..38b80f9d9f2c 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/metrics.go +++ b/receiver/kubeletstatsreceiver/internal/metadata/metrics.go @@ -20,6 +20,7 @@ type MetricsBuilders struct { type CPUMetrics struct { Time RecordDoubleDataPointFunc + Usage RecordDoubleDataPointFunc Utilization RecordDoubleDataPointFunc LimitUtilization RecordDoubleDataPointFunc RequestUtilization RecordDoubleDataPointFunc @@ -27,11 +28,13 @@ type CPUMetrics struct { var NodeCPUMetrics = CPUMetrics{ Time: (*MetricsBuilder).RecordK8sNodeCPUTimeDataPoint, + Usage: (*MetricsBuilder).RecordK8sNodeCPUUsageDataPoint, Utilization: (*MetricsBuilder).RecordK8sNodeCPUUtilizationDataPoint, } var PodCPUMetrics = CPUMetrics{ Time: (*MetricsBuilder).RecordK8sPodCPUTimeDataPoint, + Usage: (*MetricsBuilder).RecordK8sPodCPUUsageDataPoint, Utilization: (*MetricsBuilder).RecordK8sPodCPUUtilizationDataPoint, LimitUtilization: (*MetricsBuilder).RecordK8sPodCPULimitUtilizationDataPoint, RequestUtilization: (*MetricsBuilder).RecordK8sPodCPURequestUtilizationDataPoint, @@ -39,6 +42,7 @@ var PodCPUMetrics = CPUMetrics{ var ContainerCPUMetrics = CPUMetrics{ Time: (*MetricsBuilder).RecordContainerCPUTimeDataPoint, + Usage: (*MetricsBuilder).RecordContainerCPUUsageDataPoint, Utilization: (*MetricsBuilder).RecordContainerCPUUtilizationDataPoint, LimitUtilization: (*MetricsBuilder).RecordK8sContainerCPULimitUtilizationDataPoint, RequestUtilization: (*MetricsBuilder).RecordK8sContainerCPURequestUtilizationDataPoint, diff --git a/receiver/kubeletstatsreceiver/internal/metadata/testdata/config.yaml b/receiver/kubeletstatsreceiver/internal/metadata/testdata/config.yaml index c22b9fe2daf8..670fea221c4d 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/testdata/config.yaml +++ b/receiver/kubeletstatsreceiver/internal/metadata/testdata/config.yaml @@ -3,6 +3,8 @@ all_set: metrics: container.cpu.time: enabled: true + container.cpu.usage: + enabled: true container.cpu.utilization: enabled: true container.filesystem.available: @@ -35,6 +37,8 @@ all_set: enabled: true k8s.node.cpu.time: enabled: true + k8s.node.cpu.usage: + enabled: true k8s.node.cpu.utilization: enabled: true k8s.node.filesystem.available: @@ -63,6 +67,8 @@ all_set: enabled: true k8s.pod.cpu.time: enabled: true + k8s.pod.cpu.usage: + enabled: true k8s.pod.cpu.utilization: enabled: true k8s.pod.cpu_limit_utilization: @@ -142,6 +148,8 @@ none_set: metrics: container.cpu.time: enabled: false + container.cpu.usage: + enabled: false container.cpu.utilization: enabled: false container.filesystem.available: @@ -174,6 +182,8 @@ none_set: enabled: false k8s.node.cpu.time: enabled: false + k8s.node.cpu.usage: + enabled: false k8s.node.cpu.utilization: enabled: false k8s.node.filesystem.available: @@ -202,6 +212,8 @@ none_set: enabled: false k8s.pod.cpu.time: enabled: false + k8s.pod.cpu.usage: + enabled: false k8s.pod.cpu.utilization: enabled: false k8s.pod.cpu_limit_utilization: diff --git a/receiver/kubeletstatsreceiver/metadata.yaml b/receiver/kubeletstatsreceiver/metadata.yaml index 7216f70d8224..1fb375175825 100644 --- a/receiver/kubeletstatsreceiver/metadata.yaml +++ b/receiver/kubeletstatsreceiver/metadata.yaml @@ -81,16 +81,25 @@ attributes: enum: [receive, transmit] metrics: + k8s.node.cpu.usage: + enabled: false + description: "Total CPU usage (sum of all cores per second) averaged over the sample window" + unit: "{cpu}" + gauge: + value_type: double + attributes: [] k8s.node.cpu.utilization: enabled: true description: "Node CPU utilization" + warnings: + if_enabled: "WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead." unit: 1 gauge: value_type: double attributes: [] k8s.node.cpu.time: enabled: true - description: "Node CPU time" + description: "Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation" unit: s sum: value_type: double @@ -187,16 +196,25 @@ metrics: monotonic: true aggregation_temporality: cumulative attributes: [] + k8s.pod.cpu.usage: + enabled: false + description: "Total CPU usage (sum of all cores per second) averaged over the sample window" + unit: "{cpu}" + gauge: + value_type: double + attributes: [ ] k8s.pod.cpu.utilization: enabled: true description: "Pod CPU utilization" + warnings: + if_enabled: "This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead." unit: 1 gauge: value_type: double attributes: [ ] k8s.pod.cpu.time: enabled: true - description: "Pod CPU time" + description: "Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation" unit: s sum: value_type: double @@ -321,16 +339,25 @@ metrics: monotonic: true aggregation_temporality: cumulative attributes: [] + container.cpu.usage: + enabled: false + description: "Total CPU usage (sum of all cores per second) averaged over the sample window" + unit: "{cpu}" + gauge: + value_type: double + attributes: [ ] container.cpu.utilization: enabled: true description: "Container CPU utilization" + warnings: + if_enabled: "WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead." unit: 1 gauge: value_type: double attributes: [ ] container.cpu.time: enabled: true - description: "Container CPU time" + description: "Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation" unit: s sum: value_type: double diff --git a/receiver/kubeletstatsreceiver/testdata/e2e/expected.yaml b/receiver/kubeletstatsreceiver/testdata/e2e/expected.yaml index f717b48e251d..1bc2dab1bd01 100644 --- a/receiver/kubeletstatsreceiver/testdata/e2e/expected.yaml +++ b/receiver/kubeletstatsreceiver/testdata/e2e/expected.yaml @@ -10,7 +10,7 @@ resourceMetrics: version: latest metrics: - name: k8s.node.cpu.time - description: Node CPU time + description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation unit: s sum: dataPoints: diff --git a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_expected.yaml b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_expected.yaml index 7f9704a8d22e..0188167b1360 100644 --- a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_expected.yaml +++ b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_expected.yaml @@ -6,7 +6,7 @@ resourceMetrics: stringValue: minikube scopeMetrics: - metrics: - - description: Node CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.node.cpu.time sum: aggregationTemporality: 2 @@ -166,7 +166,7 @@ resourceMetrics: stringValue: 42ad382b-ed0b-446d-9aab-3fdce8b4f9e2 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -326,7 +326,7 @@ resourceMetrics: stringValue: eb632b33-62c6-4a80-9575-a97ab363ad7f scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -486,7 +486,7 @@ resourceMetrics: stringValue: 0adffe8e-9849-4e05-b4cd-92d2d1e1f1c3 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -646,7 +646,7 @@ resourceMetrics: stringValue: 5a5fbd34cfb43ee7bee976798370c910 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -806,7 +806,7 @@ resourceMetrics: stringValue: 3bef16d65fa74d46458df57d8f6f59af scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -966,7 +966,7 @@ resourceMetrics: stringValue: 3016593d20758bbfe68aba26604a8e3d scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1126,7 +1126,7 @@ resourceMetrics: stringValue: 0a6d6b05-0e8d-4920-8a38-926a33164d45 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1286,7 +1286,7 @@ resourceMetrics: stringValue: 5795d0c442cb997ff93c49feeb9f6386 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1446,7 +1446,7 @@ resourceMetrics: stringValue: 14bf95e0-9451-4192-b111-807b03163670 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1609,7 +1609,7 @@ resourceMetrics: stringValue: eb632b33-62c6-4a80-9575-a97ab363ad7f scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -1718,7 +1718,7 @@ resourceMetrics: stringValue: 0adffe8e-9849-4e05-b4cd-92d2d1e1f1c3 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -1827,7 +1827,7 @@ resourceMetrics: stringValue: 5a5fbd34cfb43ee7bee976798370c910 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -1936,7 +1936,7 @@ resourceMetrics: stringValue: 3bef16d65fa74d46458df57d8f6f59af scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2045,7 +2045,7 @@ resourceMetrics: stringValue: 3016593d20758bbfe68aba26604a8e3d scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2154,7 +2154,7 @@ resourceMetrics: stringValue: 0a6d6b05-0e8d-4920-8a38-926a33164d45 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2263,7 +2263,7 @@ resourceMetrics: stringValue: 5795d0c442cb997ff93c49feeb9f6386 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2372,7 +2372,7 @@ resourceMetrics: stringValue: 42ad382b-ed0b-446d-9aab-3fdce8b4f9e2 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2481,7 +2481,7 @@ resourceMetrics: stringValue: 14bf95e0-9451-4192-b111-807b03163670 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 diff --git a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metadata_Container_Metadata_expected.yaml b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metadata_Container_Metadata_expected.yaml index dabd51f64e25..f2ed413292e7 100644 --- a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metadata_Container_Metadata_expected.yaml +++ b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metadata_Container_Metadata_expected.yaml @@ -18,7 +18,7 @@ resourceMetrics: stringValue: 5795d0c442cb997ff93c49feeb9f6386 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -130,7 +130,7 @@ resourceMetrics: stringValue: 0a6d6b05-0e8d-4920-8a38-926a33164d45 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -242,7 +242,7 @@ resourceMetrics: stringValue: eb632b33-62c6-4a80-9575-a97ab363ad7f scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -354,7 +354,7 @@ resourceMetrics: stringValue: 3bef16d65fa74d46458df57d8f6f59af scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -466,7 +466,7 @@ resourceMetrics: stringValue: 5a5fbd34cfb43ee7bee976798370c910 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -578,7 +578,7 @@ resourceMetrics: stringValue: 14bf95e0-9451-4192-b111-807b03163670 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -690,7 +690,7 @@ resourceMetrics: stringValue: 0adffe8e-9849-4e05-b4cd-92d2d1e1f1c3 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -802,7 +802,7 @@ resourceMetrics: stringValue: 3016593d20758bbfe68aba26604a8e3d scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -914,7 +914,7 @@ resourceMetrics: stringValue: 42ad382b-ed0b-446d-9aab-3fdce8b4f9e2 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 diff --git a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_all_groups_expected.yaml b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_all_groups_expected.yaml index da410967cd78..89960272580b 100644 --- a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_all_groups_expected.yaml +++ b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_all_groups_expected.yaml @@ -6,7 +6,7 @@ resourceMetrics: stringValue: minikube scopeMetrics: - metrics: - - description: Node CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.node.cpu.time sum: aggregationTemporality: 2 @@ -166,7 +166,7 @@ resourceMetrics: stringValue: 42ad382b-ed0b-446d-9aab-3fdce8b4f9e2 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -326,7 +326,7 @@ resourceMetrics: stringValue: eb632b33-62c6-4a80-9575-a97ab363ad7f scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -486,7 +486,7 @@ resourceMetrics: stringValue: 0adffe8e-9849-4e05-b4cd-92d2d1e1f1c3 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -646,7 +646,7 @@ resourceMetrics: stringValue: 5a5fbd34cfb43ee7bee976798370c910 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -806,7 +806,7 @@ resourceMetrics: stringValue: 3bef16d65fa74d46458df57d8f6f59af scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -966,7 +966,7 @@ resourceMetrics: stringValue: 3016593d20758bbfe68aba26604a8e3d scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1126,7 +1126,7 @@ resourceMetrics: stringValue: 0a6d6b05-0e8d-4920-8a38-926a33164d45 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1286,7 +1286,7 @@ resourceMetrics: stringValue: 5795d0c442cb997ff93c49feeb9f6386 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1446,7 +1446,7 @@ resourceMetrics: stringValue: 14bf95e0-9451-4192-b111-807b03163670 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -2084,7 +2084,7 @@ resourceMetrics: stringValue: 5795d0c442cb997ff93c49feeb9f6386 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2196,7 +2196,7 @@ resourceMetrics: stringValue: 0a6d6b05-0e8d-4920-8a38-926a33164d45 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2308,7 +2308,7 @@ resourceMetrics: stringValue: eb632b33-62c6-4a80-9575-a97ab363ad7f scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2420,7 +2420,7 @@ resourceMetrics: stringValue: 3bef16d65fa74d46458df57d8f6f59af scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2532,7 +2532,7 @@ resourceMetrics: stringValue: 5a5fbd34cfb43ee7bee976798370c910 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2644,7 +2644,7 @@ resourceMetrics: stringValue: 14bf95e0-9451-4192-b111-807b03163670 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2756,7 +2756,7 @@ resourceMetrics: stringValue: 0adffe8e-9849-4e05-b4cd-92d2d1e1f1c3 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2868,7 +2868,7 @@ resourceMetrics: stringValue: 3016593d20758bbfe68aba26604a8e3d scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -2980,7 +2980,7 @@ resourceMetrics: stringValue: 42ad382b-ed0b-446d-9aab-3fdce8b4f9e2 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 diff --git a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_container_group_expected.yaml b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_container_group_expected.yaml index dabd51f64e25..f2ed413292e7 100644 --- a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_container_group_expected.yaml +++ b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_container_group_expected.yaml @@ -18,7 +18,7 @@ resourceMetrics: stringValue: 5795d0c442cb997ff93c49feeb9f6386 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -130,7 +130,7 @@ resourceMetrics: stringValue: 0a6d6b05-0e8d-4920-8a38-926a33164d45 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -242,7 +242,7 @@ resourceMetrics: stringValue: eb632b33-62c6-4a80-9575-a97ab363ad7f scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -354,7 +354,7 @@ resourceMetrics: stringValue: 3bef16d65fa74d46458df57d8f6f59af scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -466,7 +466,7 @@ resourceMetrics: stringValue: 5a5fbd34cfb43ee7bee976798370c910 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -578,7 +578,7 @@ resourceMetrics: stringValue: 14bf95e0-9451-4192-b111-807b03163670 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -690,7 +690,7 @@ resourceMetrics: stringValue: 0adffe8e-9849-4e05-b4cd-92d2d1e1f1c3 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -802,7 +802,7 @@ resourceMetrics: stringValue: 3016593d20758bbfe68aba26604a8e3d scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 @@ -914,7 +914,7 @@ resourceMetrics: stringValue: 42ad382b-ed0b-446d-9aab-3fdce8b4f9e2 scopeMetrics: - metrics: - - description: Container CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: container.cpu.time sum: aggregationTemporality: 2 diff --git a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_node_group_expected.yaml b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_node_group_expected.yaml index 3b72325e4d27..e263f6a7404b 100644 --- a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_node_group_expected.yaml +++ b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_node_group_expected.yaml @@ -6,7 +6,7 @@ resourceMetrics: stringValue: minikube scopeMetrics: - metrics: - - description: Node CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.node.cpu.time sum: aggregationTemporality: 2 diff --git a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_pod_group_expected.yaml b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_pod_group_expected.yaml index 3c61724a19b1..4886e24e7123 100644 --- a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_pod_group_expected.yaml +++ b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_only_pod_group_expected.yaml @@ -12,7 +12,7 @@ resourceMetrics: stringValue: 42ad382b-ed0b-446d-9aab-3fdce8b4f9e2 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -172,7 +172,7 @@ resourceMetrics: stringValue: eb632b33-62c6-4a80-9575-a97ab363ad7f scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -332,7 +332,7 @@ resourceMetrics: stringValue: 0adffe8e-9849-4e05-b4cd-92d2d1e1f1c3 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -492,7 +492,7 @@ resourceMetrics: stringValue: 5a5fbd34cfb43ee7bee976798370c910 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -652,7 +652,7 @@ resourceMetrics: stringValue: 3bef16d65fa74d46458df57d8f6f59af scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -812,7 +812,7 @@ resourceMetrics: stringValue: 3016593d20758bbfe68aba26604a8e3d scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -972,7 +972,7 @@ resourceMetrics: stringValue: 0a6d6b05-0e8d-4920-8a38-926a33164d45 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1132,7 +1132,7 @@ resourceMetrics: stringValue: 5795d0c442cb997ff93c49feeb9f6386 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1292,7 +1292,7 @@ resourceMetrics: stringValue: 14bf95e0-9451-4192-b111-807b03163670 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 diff --git a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_pod_and_node_groups_expected.yaml b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_pod_and_node_groups_expected.yaml index a7936daac1ed..56422e8b848d 100644 --- a/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_pod_and_node_groups_expected.yaml +++ b/receiver/kubeletstatsreceiver/testdata/scraper/test_scraper_with_metric_groups_pod_and_node_groups_expected.yaml @@ -6,7 +6,7 @@ resourceMetrics: stringValue: minikube scopeMetrics: - metrics: - - description: Node CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.node.cpu.time sum: aggregationTemporality: 2 @@ -166,7 +166,7 @@ resourceMetrics: stringValue: 42ad382b-ed0b-446d-9aab-3fdce8b4f9e2 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -326,7 +326,7 @@ resourceMetrics: stringValue: eb632b33-62c6-4a80-9575-a97ab363ad7f scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -486,7 +486,7 @@ resourceMetrics: stringValue: 0adffe8e-9849-4e05-b4cd-92d2d1e1f1c3 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -646,7 +646,7 @@ resourceMetrics: stringValue: 5a5fbd34cfb43ee7bee976798370c910 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -806,7 +806,7 @@ resourceMetrics: stringValue: 3bef16d65fa74d46458df57d8f6f59af scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -966,7 +966,7 @@ resourceMetrics: stringValue: 3016593d20758bbfe68aba26604a8e3d scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1126,7 +1126,7 @@ resourceMetrics: stringValue: 0a6d6b05-0e8d-4920-8a38-926a33164d45 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1286,7 +1286,7 @@ resourceMetrics: stringValue: 5795d0c442cb997ff93c49feeb9f6386 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2 @@ -1446,7 +1446,7 @@ resourceMetrics: stringValue: 14bf95e0-9451-4192-b111-807b03163670 scopeMetrics: - metrics: - - description: Pod CPU time + - description: Total cumulative CPU time (sum of all cores) spent by the container/pod/node since its creation name: k8s.pod.cpu.time sum: aggregationTemporality: 2