diff --git a/.chloggen/receiver_dockerstatsreceiver_add-missing-metrics-for-cgroups-v2.yaml b/.chloggen/receiver_dockerstatsreceiver_add-missing-metrics-for-cgroups-v2.yaml new file mode 100755 index 0000000000000..cebe0eb568451 --- /dev/null +++ b/.chloggen/receiver_dockerstatsreceiver_add-missing-metrics-for-cgroups-v2.yaml @@ -0,0 +1,20 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: dockerstatsreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add non populated metrics `container.memory.anon` and `container.memory.file` that are only available when the host uses cgroups v2. + +# One or more tracking issues related to the change +issues: [ 21097 ] + +# (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: | + Metric `container.memory.file` was added to fulfil the lack of `container.memory.total_cache` metric in case that the + cgroup version mounted in the host is v2 instead of v1. + + Now there is documentation of which metrics are available depending cgroups version being used on the host. diff --git a/receiver/dockerstatsreceiver/documentation.md b/receiver/dockerstatsreceiver/documentation.md index 3927a1ef54c59..bd489a33eec1a 100644 --- a/receiver/dockerstatsreceiver/documentation.md +++ b/receiver/dockerstatsreceiver/documentation.md @@ -16,7 +16,7 @@ metrics: Number of bytes transferred to/from the disk by the group and descendant groups. -[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). +More docs for [cgroups v1](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt) and [cgroups v2](https://www.kernel.org/doc/Documentation/cgroup-v2.txt) | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -62,6 +62,16 @@ Time spent by tasks of the cgroup in user mode (Linux). Time spent by all conta | ---- | ----------- | ---------- | ----------------------- | --------- | | ns | Sum | Int | Cumulative | true | +### container.memory.file + +Amount of memory used to cache filesystem data, including tmpfs and shared memory (Only available with cgroups v2). + +[More docs](https://www.kernel.org/doc/Documentation/cgroup-v2.txt) + +| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | +| ---- | ----------- | ---------- | ----------------------- | --------- | +| By | Sum | Int | Cumulative | false | + ### container.memory.percent Percentage of memory used. @@ -72,7 +82,7 @@ Percentage of memory used. ### container.memory.total_cache -Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs. +Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -162,7 +172,7 @@ metrics: ### container.blockio.io_merged_recursive -Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups. +Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). @@ -180,7 +190,7 @@ Number of bios/requests merged into requests belonging to this cgroup and its de ### container.blockio.io_queued_recursive -Number of requests queued up for this cgroup and its descendant cgroups. +Number of requests queued up for this cgroup and its descendant cgroups (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). @@ -198,7 +208,7 @@ Number of requests queued up for this cgroup and its descendant cgroups. ### container.blockio.io_service_time_recursive -Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups. +Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). @@ -216,7 +226,7 @@ Total amount of time in nanoseconds between request dispatch and request complet ### container.blockio.io_serviced_recursive -Number of IOs (bio) issued to the disk by the group and descendant groups. +Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). @@ -234,7 +244,7 @@ Number of IOs (bio) issued to the disk by the group and descendant groups. ### container.blockio.io_time_recursive -Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds. +Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). @@ -252,7 +262,7 @@ Disk time allocated to cgroup (and descendant cgroups) per device in millisecond ### container.blockio.io_wait_time_recursive -Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service. +Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). @@ -270,7 +280,7 @@ Total amount of time the IOs for this cgroup (and descendant cgroups) spent wait ### container.blockio.sectors_recursive -Number of sectors transferred to/from disk by the group and descendant groups. +Number of sectors transferred to/from disk by the group and descendant groups (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). @@ -312,7 +322,7 @@ Aggregate time the container was throttled. ### container.cpu.usage.percpu -Per-core CPU usage by the container. +Per-core CPU usage by the container (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -360,9 +370,19 @@ Cache memory that has been identified as active by the kernel. | ---- | ----------- | ---------- | ----------------------- | --------- | | By | Sum | Int | Cumulative | false | +### container.memory.anon + +Amount of memory used in anonymous mappings such as brk(), sbrk(), and mmap(MAP_ANONYMOUS) (Only available with cgroups v2). + +[More docs](https://www.kernel.org/doc/Documentation/cgroup-v2.txt) + +| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | +| ---- | ----------- | ---------- | ----------------------- | --------- | +| By | Sum | Int | Cumulative | false | + ### container.memory.cache -The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device. +The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -370,7 +390,7 @@ The amount of memory used by the processes of this control group that can be ass ### container.memory.dirty -Bytes that are waiting to get written back to the disk, from this cgroup. +Bytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -378,7 +398,7 @@ Bytes that are waiting to get written back to the disk, from this cgroup. ### container.memory.hierarchical_memory_limit -The maximum amount of physical memory that can be used by the processes of this control group. +The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -386,7 +406,7 @@ The maximum amount of physical memory that can be used by the processes of this ### container.memory.hierarchical_memsw_limit -The maximum amount of RAM + swap that can be used by the processes of this control group. +The maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -412,7 +432,7 @@ Cache memory that has been identified as inactive by the kernel. ### container.memory.mapped_file -Indicates the amount of memory mapped by the processes in the control group. +Indicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -436,7 +456,7 @@ Indicate the number of times that a process of the cgroup triggered a major faul ### container.memory.pgpgin -Number of pages read from disk by the cgroup. +Number of pages read from disk by the cgroup (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt). @@ -446,7 +466,7 @@ Number of pages read from disk by the cgroup. ### container.memory.pgpgout -Number of pages written to disk by the cgroup. +Number of pages written to disk by the cgroup (Only available with cgroups v1). [More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt). @@ -456,7 +476,7 @@ Number of pages written to disk by the cgroup. ### container.memory.rss -The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. +The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -464,7 +484,7 @@ The amount of memory that doesn’t correspond to anything on disk: stacks, heap ### container.memory.rss_huge -Number of bytes of anonymous transparent hugepages in this cgroup. +Number of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -472,7 +492,7 @@ Number of bytes of anonymous transparent hugepages in this cgroup. ### container.memory.total_active_anon -The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups. +The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -480,7 +500,7 @@ The amount of anonymous memory that has been identified as active by the kernel. ### container.memory.total_active_file -Cache memory that has been identified as active by the kernel. Includes descendant cgroups. +Cache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). [More docs](https://docs.docker.com/config/containers/runmetrics/). @@ -490,7 +510,7 @@ Cache memory that has been identified as active by the kernel. Includes descenda ### container.memory.total_dirty -Bytes that are waiting to get written back to the disk, from this cgroup and descendants. +Bytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -498,7 +518,7 @@ Bytes that are waiting to get written back to the disk, from this cgroup and des ### container.memory.total_inactive_anon -The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups. +The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -506,7 +526,7 @@ The amount of anonymous memory that has been identified as inactive by the kerne ### container.memory.total_inactive_file -Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups. +Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). [More docs](https://docs.docker.com/config/containers/runmetrics/). @@ -516,7 +536,7 @@ Cache memory that has been identified as inactive by the kernel. Includes descen ### container.memory.total_mapped_file -Indicates the amount of memory mapped by the processes in the control group and descendant groups. +Indicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -524,7 +544,7 @@ Indicates the amount of memory mapped by the processes in the control group and ### container.memory.total_pgfault -Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault. +Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -532,7 +552,7 @@ Indicate the number of times that a process of the cgroup (or descendant cgroups ### container.memory.total_pgmajfault -Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault. +Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -540,7 +560,7 @@ Indicate the number of times that a process of the cgroup (or descendant cgroups ### container.memory.total_pgpgin -Number of pages read from disk by the cgroup and descendant groups. +Number of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -548,7 +568,7 @@ Number of pages read from disk by the cgroup and descendant groups. ### container.memory.total_pgpgout -Number of pages written to disk by the cgroup and descendant groups. +Number of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -556,7 +576,7 @@ Number of pages written to disk by the cgroup and descendant groups. ### container.memory.total_rss -The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups. +The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -564,7 +584,7 @@ The amount of memory that doesn’t correspond to anything on disk: stacks, heap ### container.memory.total_rss_huge -Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups. +Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -572,7 +592,7 @@ Number of bytes of anonymous transparent hugepages in this cgroup and descendant ### container.memory.total_unevictable -The amount of memory that cannot be reclaimed. Includes descendant cgroups. +The amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -580,7 +600,7 @@ The amount of memory that cannot be reclaimed. Includes descendant cgroups. ### container.memory.total_writeback -Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants. +Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -604,7 +624,7 @@ Maximum memory usage. ### container.memory.writeback -Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup. +Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1). | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | diff --git a/receiver/dockerstatsreceiver/internal/metadata/generated_config.go b/receiver/dockerstatsreceiver/internal/metadata/generated_config.go index 65ad7e349a2f9..fd48ec3beb9e8 100644 --- a/receiver/dockerstatsreceiver/internal/metadata/generated_config.go +++ b/receiver/dockerstatsreceiver/internal/metadata/generated_config.go @@ -45,8 +45,10 @@ type MetricsConfig struct { ContainerCPUUtilization MetricConfig `mapstructure:"container.cpu.utilization"` ContainerMemoryActiveAnon MetricConfig `mapstructure:"container.memory.active_anon"` ContainerMemoryActiveFile MetricConfig `mapstructure:"container.memory.active_file"` + ContainerMemoryAnon MetricConfig `mapstructure:"container.memory.anon"` ContainerMemoryCache MetricConfig `mapstructure:"container.memory.cache"` ContainerMemoryDirty MetricConfig `mapstructure:"container.memory.dirty"` + ContainerMemoryFile MetricConfig `mapstructure:"container.memory.file"` ContainerMemoryHierarchicalMemoryLimit MetricConfig `mapstructure:"container.memory.hierarchical_memory_limit"` ContainerMemoryHierarchicalMemswLimit MetricConfig `mapstructure:"container.memory.hierarchical_memsw_limit"` ContainerMemoryInactiveAnon MetricConfig `mapstructure:"container.memory.inactive_anon"` @@ -154,12 +156,18 @@ func DefaultMetricsConfig() MetricsConfig { ContainerMemoryActiveFile: MetricConfig{ Enabled: false, }, + ContainerMemoryAnon: MetricConfig{ + Enabled: false, + }, ContainerMemoryCache: MetricConfig{ Enabled: false, }, ContainerMemoryDirty: MetricConfig{ Enabled: false, }, + ContainerMemoryFile: MetricConfig{ + Enabled: true, + }, ContainerMemoryHierarchicalMemoryLimit: MetricConfig{ Enabled: false, }, diff --git a/receiver/dockerstatsreceiver/internal/metadata/generated_config_test.go b/receiver/dockerstatsreceiver/internal/metadata/generated_config_test.go index fdbd7970c8550..c1a93fea3262d 100644 --- a/receiver/dockerstatsreceiver/internal/metadata/generated_config_test.go +++ b/receiver/dockerstatsreceiver/internal/metadata/generated_config_test.go @@ -46,8 +46,10 @@ func TestMetricsBuilderConfig(t *testing.T) { ContainerCPUUtilization: MetricConfig{Enabled: true}, ContainerMemoryActiveAnon: MetricConfig{Enabled: true}, ContainerMemoryActiveFile: MetricConfig{Enabled: true}, + ContainerMemoryAnon: MetricConfig{Enabled: true}, ContainerMemoryCache: MetricConfig{Enabled: true}, ContainerMemoryDirty: MetricConfig{Enabled: true}, + ContainerMemoryFile: MetricConfig{Enabled: true}, ContainerMemoryHierarchicalMemoryLimit: MetricConfig{Enabled: true}, ContainerMemoryHierarchicalMemswLimit: MetricConfig{Enabled: true}, ContainerMemoryInactiveAnon: MetricConfig{Enabled: true}, @@ -125,8 +127,10 @@ func TestMetricsBuilderConfig(t *testing.T) { ContainerCPUUtilization: MetricConfig{Enabled: false}, ContainerMemoryActiveAnon: MetricConfig{Enabled: false}, ContainerMemoryActiveFile: MetricConfig{Enabled: false}, + ContainerMemoryAnon: MetricConfig{Enabled: false}, ContainerMemoryCache: MetricConfig{Enabled: false}, ContainerMemoryDirty: MetricConfig{Enabled: false}, + ContainerMemoryFile: MetricConfig{Enabled: false}, ContainerMemoryHierarchicalMemoryLimit: MetricConfig{Enabled: false}, ContainerMemoryHierarchicalMemswLimit: MetricConfig{Enabled: false}, ContainerMemoryInactiveAnon: MetricConfig{Enabled: false}, diff --git a/receiver/dockerstatsreceiver/internal/metadata/generated_metrics.go b/receiver/dockerstatsreceiver/internal/metadata/generated_metrics.go index 8931a9b15abb2..ebdc28ae6c773 100644 --- a/receiver/dockerstatsreceiver/internal/metadata/generated_metrics.go +++ b/receiver/dockerstatsreceiver/internal/metadata/generated_metrics.go @@ -21,7 +21,7 @@ type metricContainerBlockioIoMergedRecursive struct { // init fills container.blockio.io_merged_recursive metric with initial data. func (m *metricContainerBlockioIoMergedRecursive) init() { m.data.SetName("container.blockio.io_merged_recursive") - m.data.SetDescription("Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups.") + m.data.SetDescription("Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("{operations}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -76,7 +76,7 @@ type metricContainerBlockioIoQueuedRecursive struct { // init fills container.blockio.io_queued_recursive metric with initial data. func (m *metricContainerBlockioIoQueuedRecursive) init() { m.data.SetName("container.blockio.io_queued_recursive") - m.data.SetDescription("Number of requests queued up for this cgroup and its descendant cgroups.") + m.data.SetDescription("Number of requests queued up for this cgroup and its descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("{operations}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -186,7 +186,7 @@ type metricContainerBlockioIoServiceTimeRecursive struct { // init fills container.blockio.io_service_time_recursive metric with initial data. func (m *metricContainerBlockioIoServiceTimeRecursive) init() { m.data.SetName("container.blockio.io_service_time_recursive") - m.data.SetDescription("Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups.") + m.data.SetDescription("Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("ns") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -241,7 +241,7 @@ type metricContainerBlockioIoServicedRecursive struct { // init fills container.blockio.io_serviced_recursive metric with initial data. func (m *metricContainerBlockioIoServicedRecursive) init() { m.data.SetName("container.blockio.io_serviced_recursive") - m.data.SetDescription("Number of IOs (bio) issued to the disk by the group and descendant groups.") + m.data.SetDescription("Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1).") m.data.SetUnit("{operations}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -296,7 +296,7 @@ type metricContainerBlockioIoTimeRecursive struct { // init fills container.blockio.io_time_recursive metric with initial data. func (m *metricContainerBlockioIoTimeRecursive) init() { m.data.SetName("container.blockio.io_time_recursive") - m.data.SetDescription("Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds.") + m.data.SetDescription("Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds (Only available with cgroups v1).") m.data.SetUnit("ms") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -351,7 +351,7 @@ type metricContainerBlockioIoWaitTimeRecursive struct { // init fills container.blockio.io_wait_time_recursive metric with initial data. func (m *metricContainerBlockioIoWaitTimeRecursive) init() { m.data.SetName("container.blockio.io_wait_time_recursive") - m.data.SetDescription("Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service.") + m.data.SetDescription("Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service (Only available with cgroups v1).") m.data.SetUnit("ns") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -406,7 +406,7 @@ type metricContainerBlockioSectorsRecursive struct { // init fills container.blockio.sectors_recursive metric with initial data. func (m *metricContainerBlockioSectorsRecursive) init() { m.data.SetName("container.blockio.sectors_recursive") - m.data.SetDescription("Number of sectors transferred to/from disk by the group and descendant groups.") + m.data.SetDescription("Number of sectors transferred to/from disk by the group and descendant groups (Only available with cgroups v1).") m.data.SetUnit("{sectors}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -714,7 +714,7 @@ type metricContainerCPUUsagePercpu struct { // init fills container.cpu.usage.percpu metric with initial data. func (m *metricContainerCPUUsagePercpu) init() { m.data.SetName("container.cpu.usage.percpu") - m.data.SetDescription("Per-core CPU usage by the container.") + m.data.SetDescription("Per-core CPU usage by the container (Only available with cgroups v1).") m.data.SetUnit("ns") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -1062,6 +1062,57 @@ func newMetricContainerMemoryActiveFile(cfg MetricConfig) metricContainerMemoryA return m } +type metricContainerMemoryAnon 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.memory.anon metric with initial data. +func (m *metricContainerMemoryAnon) init() { + m.data.SetName("container.memory.anon") + m.data.SetDescription("Amount of memory used in anonymous mappings such as brk(), sbrk(), and mmap(MAP_ANONYMOUS) (Only available with cgroups v2).") + m.data.SetUnit("By") + m.data.SetEmptySum() + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) +} + +func (m *metricContainerMemoryAnon) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.config.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntValue(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricContainerMemoryAnon) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricContainerMemoryAnon) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricContainerMemoryAnon(cfg MetricConfig) metricContainerMemoryAnon { + m := metricContainerMemoryAnon{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + type metricContainerMemoryCache struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. @@ -1071,7 +1122,7 @@ type metricContainerMemoryCache struct { // init fills container.memory.cache metric with initial data. func (m *metricContainerMemoryCache) init() { m.data.SetName("container.memory.cache") - m.data.SetDescription("The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device.") + m.data.SetDescription("The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1122,7 +1173,7 @@ type metricContainerMemoryDirty struct { // init fills container.memory.dirty metric with initial data. func (m *metricContainerMemoryDirty) init() { m.data.SetName("container.memory.dirty") - m.data.SetDescription("Bytes that are waiting to get written back to the disk, from this cgroup.") + m.data.SetDescription("Bytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1164,6 +1215,57 @@ func newMetricContainerMemoryDirty(cfg MetricConfig) metricContainerMemoryDirty return m } +type metricContainerMemoryFile 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.memory.file metric with initial data. +func (m *metricContainerMemoryFile) init() { + m.data.SetName("container.memory.file") + m.data.SetDescription("Amount of memory used to cache filesystem data, including tmpfs and shared memory (Only available with cgroups v2).") + m.data.SetUnit("By") + m.data.SetEmptySum() + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) +} + +func (m *metricContainerMemoryFile) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.config.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntValue(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricContainerMemoryFile) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricContainerMemoryFile) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricContainerMemoryFile(cfg MetricConfig) metricContainerMemoryFile { + m := metricContainerMemoryFile{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + type metricContainerMemoryHierarchicalMemoryLimit struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. @@ -1173,7 +1275,7 @@ type metricContainerMemoryHierarchicalMemoryLimit struct { // init fills container.memory.hierarchical_memory_limit metric with initial data. func (m *metricContainerMemoryHierarchicalMemoryLimit) init() { m.data.SetName("container.memory.hierarchical_memory_limit") - m.data.SetDescription("The maximum amount of physical memory that can be used by the processes of this control group.") + m.data.SetDescription("The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1224,7 +1326,7 @@ type metricContainerMemoryHierarchicalMemswLimit struct { // init fills container.memory.hierarchical_memsw_limit metric with initial data. func (m *metricContainerMemoryHierarchicalMemswLimit) init() { m.data.SetName("container.memory.hierarchical_memsw_limit") - m.data.SetDescription("The maximum amount of RAM + swap that can be used by the processes of this control group.") + m.data.SetDescription("The maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1377,7 +1479,7 @@ type metricContainerMemoryMappedFile struct { // init fills container.memory.mapped_file metric with initial data. func (m *metricContainerMemoryMappedFile) init() { m.data.SetName("container.memory.mapped_file") - m.data.SetDescription("Indicates the amount of memory mapped by the processes in the control group.") + m.data.SetDescription("Indicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1579,7 +1681,7 @@ type metricContainerMemoryPgpgin struct { // init fills container.memory.pgpgin metric with initial data. func (m *metricContainerMemoryPgpgin) init() { m.data.SetName("container.memory.pgpgin") - m.data.SetDescription("Number of pages read from disk by the cgroup.") + m.data.SetDescription("Number of pages read from disk by the cgroup (Only available with cgroups v1).") m.data.SetUnit("{operations}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -1630,7 +1732,7 @@ type metricContainerMemoryPgpgout struct { // init fills container.memory.pgpgout metric with initial data. func (m *metricContainerMemoryPgpgout) init() { m.data.SetName("container.memory.pgpgout") - m.data.SetDescription("Number of pages written to disk by the cgroup.") + m.data.SetDescription("Number of pages written to disk by the cgroup (Only available with cgroups v1).") m.data.SetUnit("{operations}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -1681,7 +1783,7 @@ type metricContainerMemoryRss struct { // init fills container.memory.rss metric with initial data. func (m *metricContainerMemoryRss) init() { m.data.SetName("container.memory.rss") - m.data.SetDescription("The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps.") + m.data.SetDescription("The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1732,7 +1834,7 @@ type metricContainerMemoryRssHuge struct { // init fills container.memory.rss_huge metric with initial data. func (m *metricContainerMemoryRssHuge) init() { m.data.SetName("container.memory.rss_huge") - m.data.SetDescription("Number of bytes of anonymous transparent hugepages in this cgroup.") + m.data.SetDescription("Number of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1783,7 +1885,7 @@ type metricContainerMemoryTotalActiveAnon struct { // init fills container.memory.total_active_anon metric with initial data. func (m *metricContainerMemoryTotalActiveAnon) init() { m.data.SetName("container.memory.total_active_anon") - m.data.SetDescription("The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups.") + m.data.SetDescription("The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1834,7 +1936,7 @@ type metricContainerMemoryTotalActiveFile struct { // init fills container.memory.total_active_file metric with initial data. func (m *metricContainerMemoryTotalActiveFile) init() { m.data.SetName("container.memory.total_active_file") - m.data.SetDescription("Cache memory that has been identified as active by the kernel. Includes descendant cgroups.") + m.data.SetDescription("Cache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1885,7 +1987,7 @@ type metricContainerMemoryTotalCache struct { // init fills container.memory.total_cache metric with initial data. func (m *metricContainerMemoryTotalCache) init() { m.data.SetName("container.memory.total_cache") - m.data.SetDescription("Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs.") + m.data.SetDescription("Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1936,7 +2038,7 @@ type metricContainerMemoryTotalDirty struct { // init fills container.memory.total_dirty metric with initial data. func (m *metricContainerMemoryTotalDirty) init() { m.data.SetName("container.memory.total_dirty") - m.data.SetDescription("Bytes that are waiting to get written back to the disk, from this cgroup and descendants.") + m.data.SetDescription("Bytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1987,7 +2089,7 @@ type metricContainerMemoryTotalInactiveAnon struct { // init fills container.memory.total_inactive_anon metric with initial data. func (m *metricContainerMemoryTotalInactiveAnon) init() { m.data.SetName("container.memory.total_inactive_anon") - m.data.SetDescription("The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups.") + m.data.SetDescription("The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -2038,7 +2140,7 @@ type metricContainerMemoryTotalInactiveFile struct { // init fills container.memory.total_inactive_file metric with initial data. func (m *metricContainerMemoryTotalInactiveFile) init() { m.data.SetName("container.memory.total_inactive_file") - m.data.SetDescription("Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups.") + m.data.SetDescription("Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -2089,7 +2191,7 @@ type metricContainerMemoryTotalMappedFile struct { // init fills container.memory.total_mapped_file metric with initial data. func (m *metricContainerMemoryTotalMappedFile) init() { m.data.SetName("container.memory.total_mapped_file") - m.data.SetDescription("Indicates the amount of memory mapped by the processes in the control group and descendant groups.") + m.data.SetDescription("Indicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -2140,7 +2242,7 @@ type metricContainerMemoryTotalPgfault struct { // init fills container.memory.total_pgfault metric with initial data. func (m *metricContainerMemoryTotalPgfault) init() { m.data.SetName("container.memory.total_pgfault") - m.data.SetDescription("Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault.") + m.data.SetDescription("Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1).") m.data.SetUnit("{faults}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -2191,7 +2293,7 @@ type metricContainerMemoryTotalPgmajfault struct { // init fills container.memory.total_pgmajfault metric with initial data. func (m *metricContainerMemoryTotalPgmajfault) init() { m.data.SetName("container.memory.total_pgmajfault") - m.data.SetDescription("Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault.") + m.data.SetDescription("Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1).") m.data.SetUnit("{faults}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -2242,7 +2344,7 @@ type metricContainerMemoryTotalPgpgin struct { // init fills container.memory.total_pgpgin metric with initial data. func (m *metricContainerMemoryTotalPgpgin) init() { m.data.SetName("container.memory.total_pgpgin") - m.data.SetDescription("Number of pages read from disk by the cgroup and descendant groups.") + m.data.SetDescription("Number of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1).") m.data.SetUnit("{operations}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -2293,7 +2395,7 @@ type metricContainerMemoryTotalPgpgout struct { // init fills container.memory.total_pgpgout metric with initial data. func (m *metricContainerMemoryTotalPgpgout) init() { m.data.SetName("container.memory.total_pgpgout") - m.data.SetDescription("Number of pages written to disk by the cgroup and descendant groups.") + m.data.SetDescription("Number of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1).") m.data.SetUnit("{operations}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -2344,7 +2446,7 @@ type metricContainerMemoryTotalRss struct { // init fills container.memory.total_rss metric with initial data. func (m *metricContainerMemoryTotalRss) init() { m.data.SetName("container.memory.total_rss") - m.data.SetDescription("The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups.") + m.data.SetDescription("The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -2395,7 +2497,7 @@ type metricContainerMemoryTotalRssHuge struct { // init fills container.memory.total_rss_huge metric with initial data. func (m *metricContainerMemoryTotalRssHuge) init() { m.data.SetName("container.memory.total_rss_huge") - m.data.SetDescription("Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups.") + m.data.SetDescription("Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -2446,7 +2548,7 @@ type metricContainerMemoryTotalUnevictable struct { // init fills container.memory.total_unevictable metric with initial data. func (m *metricContainerMemoryTotalUnevictable) init() { m.data.SetName("container.memory.total_unevictable") - m.data.SetDescription("The amount of memory that cannot be reclaimed. Includes descendant cgroups.") + m.data.SetDescription("The amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -2497,7 +2599,7 @@ type metricContainerMemoryTotalWriteback struct { // init fills container.memory.total_writeback metric with initial data. func (m *metricContainerMemoryTotalWriteback) init() { m.data.SetName("container.memory.total_writeback") - m.data.SetDescription("Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants.") + m.data.SetDescription("Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -2752,7 +2854,7 @@ type metricContainerMemoryWriteback struct { // init fills container.memory.writeback metric with initial data. func (m *metricContainerMemoryWriteback) init() { m.data.SetName("container.memory.writeback") - m.data.SetDescription("Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup.") + m.data.SetDescription("Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1).") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -3398,8 +3500,10 @@ type MetricsBuilder struct { metricContainerCPUUtilization metricContainerCPUUtilization metricContainerMemoryActiveAnon metricContainerMemoryActiveAnon metricContainerMemoryActiveFile metricContainerMemoryActiveFile + metricContainerMemoryAnon metricContainerMemoryAnon metricContainerMemoryCache metricContainerMemoryCache metricContainerMemoryDirty metricContainerMemoryDirty + metricContainerMemoryFile metricContainerMemoryFile metricContainerMemoryHierarchicalMemoryLimit metricContainerMemoryHierarchicalMemoryLimit metricContainerMemoryHierarchicalMemswLimit metricContainerMemoryHierarchicalMemswLimit metricContainerMemoryInactiveAnon metricContainerMemoryInactiveAnon @@ -3487,8 +3591,10 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSetting metricContainerCPUUtilization: newMetricContainerCPUUtilization(mbc.Metrics.ContainerCPUUtilization), metricContainerMemoryActiveAnon: newMetricContainerMemoryActiveAnon(mbc.Metrics.ContainerMemoryActiveAnon), metricContainerMemoryActiveFile: newMetricContainerMemoryActiveFile(mbc.Metrics.ContainerMemoryActiveFile), + metricContainerMemoryAnon: newMetricContainerMemoryAnon(mbc.Metrics.ContainerMemoryAnon), metricContainerMemoryCache: newMetricContainerMemoryCache(mbc.Metrics.ContainerMemoryCache), metricContainerMemoryDirty: newMetricContainerMemoryDirty(mbc.Metrics.ContainerMemoryDirty), + metricContainerMemoryFile: newMetricContainerMemoryFile(mbc.Metrics.ContainerMemoryFile), metricContainerMemoryHierarchicalMemoryLimit: newMetricContainerMemoryHierarchicalMemoryLimit(mbc.Metrics.ContainerMemoryHierarchicalMemoryLimit), metricContainerMemoryHierarchicalMemswLimit: newMetricContainerMemoryHierarchicalMemswLimit(mbc.Metrics.ContainerMemoryHierarchicalMemswLimit), metricContainerMemoryInactiveAnon: newMetricContainerMemoryInactiveAnon(mbc.Metrics.ContainerMemoryInactiveAnon), @@ -3650,8 +3756,10 @@ func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { mb.metricContainerCPUUtilization.emit(ils.Metrics()) mb.metricContainerMemoryActiveAnon.emit(ils.Metrics()) mb.metricContainerMemoryActiveFile.emit(ils.Metrics()) + mb.metricContainerMemoryAnon.emit(ils.Metrics()) mb.metricContainerMemoryCache.emit(ils.Metrics()) mb.metricContainerMemoryDirty.emit(ils.Metrics()) + mb.metricContainerMemoryFile.emit(ils.Metrics()) mb.metricContainerMemoryHierarchicalMemoryLimit.emit(ils.Metrics()) mb.metricContainerMemoryHierarchicalMemswLimit.emit(ils.Metrics()) mb.metricContainerMemoryInactiveAnon.emit(ils.Metrics()) @@ -3815,6 +3923,11 @@ func (mb *MetricsBuilder) RecordContainerMemoryActiveFileDataPoint(ts pcommon.Ti mb.metricContainerMemoryActiveFile.recordDataPoint(mb.startTime, ts, val) } +// RecordContainerMemoryAnonDataPoint adds a data point to container.memory.anon metric. +func (mb *MetricsBuilder) RecordContainerMemoryAnonDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricContainerMemoryAnon.recordDataPoint(mb.startTime, ts, val) +} + // RecordContainerMemoryCacheDataPoint adds a data point to container.memory.cache metric. func (mb *MetricsBuilder) RecordContainerMemoryCacheDataPoint(ts pcommon.Timestamp, val int64) { mb.metricContainerMemoryCache.recordDataPoint(mb.startTime, ts, val) @@ -3825,6 +3938,11 @@ func (mb *MetricsBuilder) RecordContainerMemoryDirtyDataPoint(ts pcommon.Timesta mb.metricContainerMemoryDirty.recordDataPoint(mb.startTime, ts, val) } +// RecordContainerMemoryFileDataPoint adds a data point to container.memory.file metric. +func (mb *MetricsBuilder) RecordContainerMemoryFileDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricContainerMemoryFile.recordDataPoint(mb.startTime, ts, val) +} + // RecordContainerMemoryHierarchicalMemoryLimitDataPoint adds a data point to container.memory.hierarchical_memory_limit metric. func (mb *MetricsBuilder) RecordContainerMemoryHierarchicalMemoryLimitDataPoint(ts pcommon.Timestamp, val int64) { mb.metricContainerMemoryHierarchicalMemoryLimit.recordDataPoint(mb.startTime, ts, val) diff --git a/receiver/dockerstatsreceiver/internal/metadata/generated_metrics_test.go b/receiver/dockerstatsreceiver/internal/metadata/generated_metrics_test.go index cdff66efb67de..b0315b785536a 100644 --- a/receiver/dockerstatsreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/dockerstatsreceiver/internal/metadata/generated_metrics_test.go @@ -127,12 +127,19 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordContainerMemoryActiveFileDataPoint(ts, 1) + allMetricsCount++ + mb.RecordContainerMemoryAnonDataPoint(ts, 1) + allMetricsCount++ mb.RecordContainerMemoryCacheDataPoint(ts, 1) allMetricsCount++ mb.RecordContainerMemoryDirtyDataPoint(ts, 1) + defaultMetricsCount++ + allMetricsCount++ + mb.RecordContainerMemoryFileDataPoint(ts, 1) + allMetricsCount++ mb.RecordContainerMemoryHierarchicalMemoryLimitDataPoint(ts, 1) @@ -335,7 +342,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.blockio.io_merged_recursive"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{operations}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -358,7 +365,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.blockio.io_queued_recursive"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of requests queued up for this cgroup and its descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "Number of requests queued up for this cgroup and its descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{operations}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -404,7 +411,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.blockio.io_service_time_recursive"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "ns", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -427,7 +434,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.blockio.io_serviced_recursive"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of IOs (bio) issued to the disk by the group and descendant groups.", ms.At(i).Description()) + assert.Equal(t, "Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{operations}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -450,7 +457,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.blockio.io_time_recursive"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds.", ms.At(i).Description()) + assert.Equal(t, "Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "ms", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -473,7 +480,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.blockio.io_wait_time_recursive"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service.", ms.At(i).Description()) + assert.Equal(t, "Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "ns", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -496,7 +503,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.blockio.sectors_recursive"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of sectors transferred to/from disk by the group and descendant groups.", ms.At(i).Description()) + assert.Equal(t, "Number of sectors transferred to/from disk by the group and descendant groups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{sectors}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -587,7 +594,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.cpu.usage.percpu"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Per-core CPU usage by the container.", ms.At(i).Description()) + assert.Equal(t, "Per-core CPU usage by the container (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "ns", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -681,12 +688,26 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, ts, dp.Timestamp()) assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) assert.Equal(t, int64(1), dp.IntValue()) + case "container.memory.anon": + assert.False(t, validatedMetrics["container.memory.anon"], "Found a duplicate in the metrics slice: container.memory.anon") + validatedMetrics["container.memory.anon"] = true + assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) + assert.Equal(t, "Amount of memory used in anonymous mappings such as brk(), sbrk(), and mmap(MAP_ANONYMOUS) (Only available with cgroups v2).", ms.At(i).Description()) + assert.Equal(t, "By", ms.At(i).Unit()) + assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) + assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) + dp := ms.At(i).Sum().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) + assert.Equal(t, int64(1), dp.IntValue()) case "container.memory.cache": assert.False(t, validatedMetrics["container.memory.cache"], "Found a duplicate in the metrics slice: container.memory.cache") validatedMetrics["container.memory.cache"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device.", ms.At(i).Description()) + assert.Equal(t, "The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -700,7 +721,21 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.dirty"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Bytes that are waiting to get written back to the disk, from this cgroup.", ms.At(i).Description()) + assert.Equal(t, "Bytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1).", ms.At(i).Description()) + assert.Equal(t, "By", ms.At(i).Unit()) + assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) + assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) + dp := ms.At(i).Sum().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) + assert.Equal(t, int64(1), dp.IntValue()) + case "container.memory.file": + assert.False(t, validatedMetrics["container.memory.file"], "Found a duplicate in the metrics slice: container.memory.file") + validatedMetrics["container.memory.file"] = true + assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) + assert.Equal(t, "Amount of memory used to cache filesystem data, including tmpfs and shared memory (Only available with cgroups v2).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -714,7 +749,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.hierarchical_memory_limit"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The maximum amount of physical memory that can be used by the processes of this control group.", ms.At(i).Description()) + assert.Equal(t, "The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -728,7 +763,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.hierarchical_memsw_limit"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The maximum amount of RAM + swap that can be used by the processes of this control group.", ms.At(i).Description()) + assert.Equal(t, "The maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -770,7 +805,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.mapped_file"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Indicates the amount of memory mapped by the processes in the control group.", ms.At(i).Description()) + assert.Equal(t, "Indicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -824,7 +859,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.pgpgin"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of pages read from disk by the cgroup.", ms.At(i).Description()) + assert.Equal(t, "Number of pages read from disk by the cgroup (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{operations}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -838,7 +873,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.pgpgout"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of pages written to disk by the cgroup.", ms.At(i).Description()) + assert.Equal(t, "Number of pages written to disk by the cgroup (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{operations}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -852,7 +887,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.rss"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps.", ms.At(i).Description()) + assert.Equal(t, "The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -866,7 +901,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.rss_huge"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of bytes of anonymous transparent hugepages in this cgroup.", ms.At(i).Description()) + assert.Equal(t, "Number of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -880,7 +915,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_active_anon"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -894,7 +929,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_active_file"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Cache memory that has been identified as active by the kernel. Includes descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "Cache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -908,7 +943,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_cache"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs.", ms.At(i).Description()) + assert.Equal(t, "Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -922,7 +957,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_dirty"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Bytes that are waiting to get written back to the disk, from this cgroup and descendants.", ms.At(i).Description()) + assert.Equal(t, "Bytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -936,7 +971,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_inactive_anon"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -950,7 +985,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_inactive_file"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -964,7 +999,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_mapped_file"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Indicates the amount of memory mapped by the processes in the control group and descendant groups.", ms.At(i).Description()) + assert.Equal(t, "Indicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -978,7 +1013,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_pgfault"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault.", ms.At(i).Description()) + assert.Equal(t, "Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{faults}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -992,7 +1027,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_pgmajfault"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault.", ms.At(i).Description()) + assert.Equal(t, "Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{faults}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -1006,7 +1041,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_pgpgin"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of pages read from disk by the cgroup and descendant groups.", ms.At(i).Description()) + assert.Equal(t, "Number of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{operations}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -1020,7 +1055,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_pgpgout"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of pages written to disk by the cgroup and descendant groups.", ms.At(i).Description()) + assert.Equal(t, "Number of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "{operations}", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -1034,7 +1069,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_rss"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -1048,7 +1083,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_rss_huge"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -1062,7 +1097,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_unevictable"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The amount of memory that cannot be reclaimed. Includes descendant cgroups.", ms.At(i).Description()) + assert.Equal(t, "The amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -1076,7 +1111,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.total_writeback"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants.", ms.At(i).Description()) + assert.Equal(t, "Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -1146,7 +1181,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["container.memory.writeback"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup.", ms.At(i).Description()) + assert.Equal(t, "Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1).", ms.At(i).Description()) assert.Equal(t, "By", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) diff --git a/receiver/dockerstatsreceiver/internal/metadata/testdata/config.yaml b/receiver/dockerstatsreceiver/internal/metadata/testdata/config.yaml index a75550ddcc0e8..a84a3c4fe10b4 100644 --- a/receiver/dockerstatsreceiver/internal/metadata/testdata/config.yaml +++ b/receiver/dockerstatsreceiver/internal/metadata/testdata/config.yaml @@ -41,10 +41,14 @@ all_set: enabled: true container.memory.active_file: enabled: true + container.memory.anon: + enabled: true container.memory.cache: enabled: true container.memory.dirty: enabled: true + container.memory.file: + enabled: true container.memory.hierarchical_memory_limit: enabled: true container.memory.hierarchical_memsw_limit: @@ -184,10 +188,14 @@ none_set: enabled: false container.memory.active_file: enabled: false + container.memory.anon: + enabled: false container.memory.cache: enabled: false container.memory.dirty: enabled: false + container.memory.file: + enabled: false container.memory.hierarchical_memory_limit: enabled: false container.memory.hierarchical_memsw_limit: diff --git a/receiver/dockerstatsreceiver/metadata.yaml b/receiver/dockerstatsreceiver/metadata.yaml index 4794db63672a3..b5377b34ea8d8 100644 --- a/receiver/dockerstatsreceiver/metadata.yaml +++ b/receiver/dockerstatsreceiver/metadata.yaml @@ -89,7 +89,7 @@ metrics: aggregation: cumulative container.cpu.usage.percpu: enabled: false - description: "Per-core CPU usage by the container." + description: "Per-core CPU usage by the container (Only available with cgroups v1)." unit: ns sum: value_type: int @@ -172,7 +172,7 @@ metrics: value_type: double container.memory.cache: enabled: false - description: "The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device." + description: "The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1)." unit: By sum: value_type: int @@ -180,7 +180,7 @@ metrics: monotonic: false container.memory.rss: enabled: false - description: "The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps." + description: "The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1)." unit: By sum: value_type: int @@ -188,7 +188,7 @@ metrics: monotonic: false container.memory.rss_huge: enabled: false - description: "Number of bytes of anonymous transparent hugepages in this cgroup." + description: "Number of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1)." unit: By sum: value_type: int @@ -196,7 +196,7 @@ metrics: monotonic: false container.memory.dirty: enabled: false - description: "Bytes that are waiting to get written back to the disk, from this cgroup." + description: "Bytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1)." unit: By sum: value_type: int @@ -204,7 +204,7 @@ metrics: monotonic: false container.memory.writeback: enabled: false - description: "Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup." + description: "Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1)." unit: By sum: value_type: int @@ -212,7 +212,7 @@ metrics: monotonic: false container.memory.mapped_file: enabled: false - description: "Indicates the amount of memory mapped by the processes in the control group." + description: "Indicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1)." unit: By sum: value_type: int @@ -220,7 +220,7 @@ metrics: monotonic: false container.memory.pgpgin: enabled: false - description: "Number of pages read from disk by the cgroup." + description: "Number of pages read from disk by the cgroup (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt)." unit: "{operations}" sum: @@ -229,7 +229,7 @@ metrics: monotonic: true container.memory.pgpgout: enabled: false - description: "Number of pages written to disk by the cgroup." + description: "Number of pages written to disk by the cgroup (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt)." unit: "{operations}" sum: @@ -296,7 +296,7 @@ metrics: monotonic: false container.memory.hierarchical_memory_limit: enabled: false - description: "The maximum amount of physical memory that can be used by the processes of this control group." + description: "The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1)." unit: By sum: value_type: int @@ -304,7 +304,7 @@ metrics: monotonic: false container.memory.hierarchical_memsw_limit: enabled: false - description: "The maximum amount of RAM + swap that can be used by the processes of this control group." + description: "The maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1)." unit: By sum: value_type: int @@ -312,7 +312,7 @@ metrics: monotonic: false container.memory.total_cache: enabled: true - description: "Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs." + description: "Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1)." unit: By sum: value_type: int @@ -320,7 +320,7 @@ metrics: monotonic: false container.memory.total_rss: enabled: false - description: "The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups." + description: "The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1)." unit: By sum: value_type: int @@ -328,7 +328,7 @@ metrics: monotonic: false container.memory.total_rss_huge: enabled: false - description: "Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups." + description: "Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1)." unit: By sum: value_type: int @@ -336,7 +336,7 @@ metrics: monotonic: false container.memory.total_dirty: enabled: false - description: "Bytes that are waiting to get written back to the disk, from this cgroup and descendants." + description: "Bytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1)." unit: By sum: value_type: int @@ -344,7 +344,7 @@ metrics: monotonic: false container.memory.total_writeback: enabled: false - description: "Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants." + description: "Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1)." unit: By sum: value_type: int @@ -352,7 +352,7 @@ metrics: monotonic: false container.memory.total_mapped_file: enabled: false - description: "Indicates the amount of memory mapped by the processes in the control group and descendant groups." + description: "Indicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1)." unit: By sum: value_type: int @@ -360,7 +360,7 @@ metrics: monotonic: false container.memory.total_pgpgin: enabled: false - description: "Number of pages read from disk by the cgroup and descendant groups." + description: "Number of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1)." unit: "{operations}" sum: value_type: int @@ -368,7 +368,7 @@ metrics: monotonic: true container.memory.total_pgpgout: enabled: false - description: "Number of pages written to disk by the cgroup and descendant groups." + description: "Number of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1)." unit: "{operations}" sum: value_type: int @@ -376,7 +376,7 @@ metrics: monotonic: true container.memory.total_pgfault: enabled: false - description: "Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault." + description: "Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1)." unit: "{faults}" sum: value_type: int @@ -384,7 +384,7 @@ metrics: monotonic: true container.memory.total_pgmajfault: enabled: false - description: "Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault." + description: "Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1)." unit: "{faults}" sum: value_type: int @@ -392,7 +392,7 @@ metrics: monotonic: true container.memory.total_inactive_anon: enabled: false - description: "The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups." + description: "The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1)." unit: By sum: value_type: int @@ -400,7 +400,7 @@ metrics: monotonic: false container.memory.total_active_anon: enabled: false - description: "The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups." + description: "The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1)." unit: By sum: value_type: int @@ -408,7 +408,7 @@ metrics: monotonic: false container.memory.total_inactive_file: enabled: false - description: "Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups." + description: "Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1)." extended_documentation: "[More docs](https://docs.docker.com/config/containers/runmetrics/)." unit: By sum: @@ -417,7 +417,7 @@ metrics: monotonic: false container.memory.total_active_file: enabled: false - description: "Cache memory that has been identified as active by the kernel. Includes descendant cgroups." + description: "Cache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1)." extended_documentation: "[More docs](https://docs.docker.com/config/containers/runmetrics/)." unit: By sum: @@ -426,7 +426,25 @@ metrics: monotonic: false container.memory.total_unevictable: enabled: false - description: "The amount of memory that cannot be reclaimed. Includes descendant cgroups." + description: "The amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1)." + unit: By + sum: + value_type: int + aggregation: cumulative + monotonic: false + container.memory.anon: + enabled: false + description: "Amount of memory used in anonymous mappings such as brk(), sbrk(), and mmap(MAP_ANONYMOUS) (Only available with cgroups v2)." + extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v2.txt)" + unit: By + sum: + value_type: int + aggregation: cumulative + monotonic: false + container.memory.file: + enabled: true + description: "Amount of memory used to cache filesystem data, including tmpfs and shared memory (Only available with cgroups v2)." + extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v2.txt)" unit: By sum: value_type: int @@ -434,10 +452,10 @@ metrics: monotonic: false - # BlockIO + # BlockIO (cgroup v1) and IO (cgroup v2) controllers container.blockio.io_merged_recursive: enabled: false - description: "Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups." + description: "Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)." unit: "{operations}" sum: @@ -448,10 +466,9 @@ metrics: - device_major - device_minor - operation - container.blockio.io_queued_recursive: enabled: false - description: "Number of requests queued up for this cgroup and its descendant cgroups." + description: "Number of requests queued up for this cgroup and its descendant cgroups (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)." unit: "{operations}" sum: @@ -462,11 +479,13 @@ metrics: - device_major - device_minor - operation - container.blockio.io_service_bytes_recursive: enabled: true description: "Number of bytes transferred to/from the disk by the group and descendant groups." - extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)." + extended_documentation: >- + More docs + for [cgroups v1](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt) + and [cgroups v2](https://www.kernel.org/doc/Documentation/cgroup-v2.txt) unit: By sum: value_type: int @@ -476,10 +495,9 @@ metrics: - device_major - device_minor - operation - container.blockio.io_service_time_recursive: enabled: false - description: "Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups." + description: "Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)." unit: ns sum: @@ -490,10 +508,9 @@ metrics: - device_major - device_minor - operation - container.blockio.io_serviced_recursive: enabled: false - description: "Number of IOs (bio) issued to the disk by the group and descendant groups." + description: "Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)." unit: "{operations}" sum: @@ -504,10 +521,9 @@ metrics: - device_major - device_minor - operation - container.blockio.io_time_recursive: enabled: false - description: "Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds." + description: "Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)." unit: ms sum: @@ -518,10 +534,9 @@ metrics: - device_major - device_minor - operation - container.blockio.io_wait_time_recursive: enabled: false - description: "Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service." + description: "Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)." unit: ns sum: @@ -532,10 +547,9 @@ metrics: - device_major - device_minor - operation - container.blockio.sectors_recursive: enabled: false - description: "Number of sectors transferred to/from disk by the group and descendant groups." + description: "Number of sectors transferred to/from disk by the group and descendant groups (Only available with cgroups v1)." extended_documentation: "[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)." unit: "{sectors}" sum: diff --git a/receiver/dockerstatsreceiver/receiver.go b/receiver/dockerstatsreceiver/receiver.go index b0f941fc0252d..93cbfba764b31 100644 --- a/receiver/dockerstatsreceiver/receiver.go +++ b/receiver/dockerstatsreceiver/receiver.go @@ -198,6 +198,8 @@ func (r *receiver) recordMemoryMetrics(now pcommon.Timestamp, memoryStats *dtype "total_unevictable": r.mb.RecordContainerMemoryTotalUnevictableDataPoint, "hierarchical_memory_limit": r.mb.RecordContainerMemoryHierarchicalMemoryLimitDataPoint, "hierarchical_memsw_limit": r.mb.RecordContainerMemoryHierarchicalMemswLimitDataPoint, + "anon": r.mb.RecordContainerMemoryAnonDataPoint, + "file": r.mb.RecordContainerMemoryFileDataPoint, } for name, val := range memoryStats.Stats { diff --git a/receiver/dockerstatsreceiver/receiver_test.go b/receiver/dockerstatsreceiver/receiver_test.go index b28a079f2d283..6bf6285e2bdd2 100644 --- a/receiver/dockerstatsreceiver/receiver_test.go +++ b/receiver/dockerstatsreceiver/receiver_test.go @@ -99,6 +99,8 @@ var ( ContainerPidsCount: metricEnabled, ContainerPidsLimit: metricEnabled, ContainerUptime: metricEnabled, + ContainerMemoryAnon: metricEnabled, + ContainerMemoryFile: metricEnabled, } ) diff --git a/receiver/dockerstatsreceiver/testdata/mock/cgroups_v2/expected_metrics.yaml b/receiver/dockerstatsreceiver/testdata/mock/cgroups_v2/expected_metrics.yaml index cdd603cc1aac7..a6c8348aa043c 100644 --- a/receiver/dockerstatsreceiver/testdata/mock/cgroups_v2/expected_metrics.yaml +++ b/receiver/dockerstatsreceiver/testdata/mock/cgroups_v2/expected_metrics.yaml @@ -35,8 +35,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" - asInt: "0" attributes: - key: device_major @@ -48,16 +48,16 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: By - description: 'Deprecated: use `container.cpu.utilization` metric instead. Percent of CPU used by the container.' gauge: dataPoints: - asDouble: 0.041326615629205886 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" name: container.cpu.percent unit: "1" - description: Number of periods with throttling active. @@ -66,8 +66,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{periods}' - description: Number of periods when the container hits its throttling limit. @@ -76,8 +76,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{periods}' - description: Aggregate time the container was throttled. @@ -86,8 +86,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in kernel mode (Linux). Time spent by all container processes in kernel mode (Windows). @@ -96,8 +96,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "970974000" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: ns - description: System CPU usage, as reported by docker. @@ -106,8 +106,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4836970000000" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: ns - description: Total CPU time consumed. @@ -116,8 +116,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "999478000" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in user mode (Linux). Time spent by all container processes in user mode (Windows). @@ -126,8 +126,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "28503000" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: ns - description: The amount of anonymous memory that has been identified as active by the kernel. @@ -136,8 +136,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4096" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: By - description: Cache memory that has been identified as active by the kernel. name: container.memory.active_file @@ -145,8 +145,26 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" + unit: By + - description: Amount of memory used in anonymous mappings such as brk(), sbrk(), and mmap(MAP_ANONYMOUS) (Only available with cgroups v2). + name: container.memory.anon + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "61440" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" + unit: By + - description: Amount of memory used to cache filesystem data, including tmpfs and shared memory (Only available with cgroups v2). + name: container.memory.file + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "233848832" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: By - description: The amount of anonymous memory that has been identified as inactive by the kernel. name: container.memory.inactive_anon @@ -154,8 +172,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "233906176" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: By - description: Cache memory that has been identified as inactive by the kernel. name: container.memory.inactive_file @@ -163,15 +181,15 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: By - description: Percentage of memory used. gauge: dataPoints: - asDouble: 87.41302490234375 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" name: container.memory.percent unit: "1" - description: Indicate the number of times that a process of the cgroup triggered a page fault. @@ -180,8 +198,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "9458" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{faults}' - description: Indicate the number of times that a process of the cgroup triggered a major fault. @@ -190,8 +208,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{faults}' - description: The amount of memory that cannot be reclaimed. @@ -200,8 +218,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: By - description: Memory limit of the container. name: container.memory.usage.limit @@ -209,8 +227,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "268435456" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: By - description: Maximum memory usage. name: container.memory.usage.max @@ -218,8 +236,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: By - description: Memory usage of the container. This excludes the cache. name: container.memory.usage.total @@ -227,8 +245,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "234647552" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: By - description: Bytes received by the container. name: container.network.io.usage.rx_bytes @@ -240,8 +258,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: By - description: Incoming packets dropped. @@ -254,8 +272,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{packets}' - description: Received errors. @@ -268,8 +286,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{errors}' - description: Packets received. @@ -282,8 +300,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{packets}' - description: Bytes sent. @@ -296,8 +314,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: By - description: Outgoing packets dropped. @@ -310,8 +328,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{packets}' - description: Sent errors. @@ -324,8 +342,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{errors}' - description: Packets sent. @@ -338,8 +356,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" isMonotonic: true unit: '{packets}' - description: Number of pids in the container's cgroup. @@ -348,8 +366,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: '{pids}' - description: Maximum number of pids in the container's cgroup. name: container.pids.limit @@ -357,16 +375,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4694" - startTimeUnixNano: "1682426015940992000" - timeUnixNano: "1682426015943175000" + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" unit: '{pids}' - description: Time elapsed since container start time. - name: container.uptime gauge: dataPoints: - - asDouble: 0.0002888012543185477 - timeUnixNano: "1657771705535206000" - unit: 's' + - asDouble: 4.233354158179942e+06 + startTimeUnixNano: "1686652517912798000" + timeUnixNano: "1686652517916756000" + name: container.uptime + unit: s scope: name: otelcol/dockerstatsreceiver version: latest diff --git a/receiver/dockerstatsreceiver/testdata/mock/no_pids_stats/expected_metrics.yaml b/receiver/dockerstatsreceiver/testdata/mock/no_pids_stats/expected_metrics.yaml index 348212195c86f..c4d1a2d2eae49 100644 --- a/receiver/dockerstatsreceiver/testdata/mock/no_pids_stats/expected_metrics.yaml +++ b/receiver/dockerstatsreceiver/testdata/mock/no_pids_stats/expected_metrics.yaml @@ -41,8 +41,8 @@ resourceMetrics: - key: operation value: stringValue: async - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "0" attributes: - key: device_major @@ -54,8 +54,8 @@ resourceMetrics: - key: operation value: stringValue: discard - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "2502656" attributes: - key: device_major @@ -67,8 +67,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "2502656" attributes: - key: device_major @@ -80,8 +80,8 @@ resourceMetrics: - key: operation value: stringValue: sync - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "2502656" attributes: - key: device_major @@ -93,8 +93,8 @@ resourceMetrics: - key: operation value: stringValue: total - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "0" attributes: - key: device_major @@ -106,11 +106,11 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: By - - description: Number of IOs (bio) issued to the disk by the group and descendant groups. + - description: Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1). name: container.blockio.io_serviced_recursive sum: aggregationTemporality: 2 @@ -126,8 +126,8 @@ resourceMetrics: - key: operation value: stringValue: async - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "0" attributes: - key: device_major @@ -139,8 +139,8 @@ resourceMetrics: - key: operation value: stringValue: discard - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "99" attributes: - key: device_major @@ -152,8 +152,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "99" attributes: - key: device_major @@ -165,8 +165,8 @@ resourceMetrics: - key: operation value: stringValue: sync - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "99" attributes: - key: device_major @@ -178,8 +178,8 @@ resourceMetrics: - key: operation value: stringValue: total - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "0" attributes: - key: device_major @@ -191,16 +191,16 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{operations}' - description: 'Deprecated: use `container.cpu.utilization` metric instead. Percent of CPU used by the container.' gauge: dataPoints: - asDouble: 0.0002888012543185477 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" name: container.cpu.percent unit: "1" - description: Number of periods with throttling active. @@ -209,8 +209,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{periods}' - description: Number of periods when the container hits its throttling limit. @@ -219,8 +219,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{periods}' - description: Aggregate time the container was throttled. @@ -229,8 +229,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in kernel mode (Linux). Time spent by all container processes in kernel mode (Windows). @@ -239,11 +239,11 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10000000" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: ns - - description: Per-core CPU usage by the container. + - description: Per-core CPU usage by the container (Only available with cgroups v1). name: container.cpu.usage.percpu sum: aggregationTemporality: 2 @@ -253,57 +253,57 @@ resourceMetrics: - key: core value: stringValue: cpu0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "0" attributes: - key: core value: stringValue: cpu1 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "262690" attributes: - key: core value: stringValue: cpu2 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "762532" attributes: - key: core value: stringValue: cpu3 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "78532" attributes: - key: core value: stringValue: cpu4 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "28108575" attributes: - key: core value: stringValue: cpu5 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "8800811" attributes: - key: core value: stringValue: cpu6 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" - asInt: "4191833" attributes: - key: core value: stringValue: cpu7 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: ns - description: System CPU usage, as reported by docker. @@ -312,8 +312,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "120830550000000" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: ns - description: Total CPU time consumed. @@ -322,8 +322,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "43620018" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in user mode (Linux). Time spent by all container processes in user mode (Windows). @@ -332,8 +332,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10000000" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: ns - description: The amount of anonymous memory that has been identified as active by the kernel. @@ -342,8 +342,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: Cache memory that has been identified as active by the kernel. name: container.memory.active_file @@ -351,44 +351,44 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "270336" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device. + - description: The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1). name: container.memory.cache sum: aggregationTemporality: 2 dataPoints: - asInt: "2433024" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Bytes that are waiting to get written back to the disk, from this cgroup. + - description: Bytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1). name: container.memory.dirty sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: The maximum amount of physical memory that can be used by the processes of this control group. + - description: The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1). name: container.memory.hierarchical_memory_limit sum: aggregationTemporality: 2 dataPoints: - asInt: "9223372036854772000" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: The maximum amount of RAM + swap that can be used by the processes of this control group. + - description: The maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1). name: container.memory.hierarchical_memsw_limit sum: aggregationTemporality: 2 dataPoints: - asInt: "9223372036854772000" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: The amount of anonymous memory that has been identified as inactive by the kernel. name: container.memory.inactive_anon @@ -396,8 +396,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: Cache memory that has been identified as inactive by the kernel. name: container.memory.inactive_file @@ -405,24 +405,24 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2162688" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Indicates the amount of memory mapped by the processes in the control group. + - description: Indicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1). name: container.memory.mapped_file sum: aggregationTemporality: 2 dataPoints: - asInt: "1486848" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: Percentage of memory used. gauge: dataPoints: - asDouble: 0.006938014912420301 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" name: container.memory.percent unit: "1" - description: Indicate the number of times that a process of the cgroup triggered a page fault. @@ -431,8 +431,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "990" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{faults}' - description: Indicate the number of times that a process of the cgroup triggered a major fault. @@ -441,186 +441,186 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{faults}' - - description: Number of pages read from disk by the cgroup. + - description: Number of pages read from disk by the cgroup (Only available with cgroups v1). name: container.memory.pgpgin sum: aggregationTemporality: 2 dataPoints: - asInt: "1287" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{operations}' - - description: Number of pages written to disk by the cgroup. + - description: Number of pages written to disk by the cgroup (Only available with cgroups v1). name: container.memory.pgpgout sum: aggregationTemporality: 2 dataPoints: - asInt: "667" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{operations}' - - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps.' + - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1).' name: container.memory.rss sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Number of bytes of anonymous transparent hugepages in this cgroup. + - description: Number of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1). name: container.memory.rss_huge sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups. + - description: The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_active_anon sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Cache memory that has been identified as active by the kernel. Includes descendant cgroups. + - description: Cache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_active_file sum: aggregationTemporality: 2 dataPoints: - asInt: "270336" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs. + - description: Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1). name: container.memory.total_cache sum: aggregationTemporality: 2 dataPoints: - asInt: "2433024" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Bytes that are waiting to get written back to the disk, from this cgroup and descendants. + - description: Bytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1). name: container.memory.total_dirty sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups. + - description: The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_inactive_anon sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups. + - description: Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_inactive_file sum: aggregationTemporality: 2 dataPoints: - asInt: "2162688" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Indicates the amount of memory mapped by the processes in the control group and descendant groups. + - description: Indicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1). name: container.memory.total_mapped_file sum: aggregationTemporality: 2 dataPoints: - asInt: "1486848" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault. + - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1). name: container.memory.total_pgfault sum: aggregationTemporality: 2 dataPoints: - asInt: "990" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{faults}' - - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault. + - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1). name: container.memory.total_pgmajfault sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{faults}' - - description: Number of pages read from disk by the cgroup and descendant groups. + - description: Number of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1). name: container.memory.total_pgpgin sum: aggregationTemporality: 2 dataPoints: - asInt: "1287" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{operations}' - - description: Number of pages written to disk by the cgroup and descendant groups. + - description: Number of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1). name: container.memory.total_pgpgout sum: aggregationTemporality: 2 dataPoints: - asInt: "667" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{operations}' - - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups.' + - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1).' name: container.memory.total_rss sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups. + - description: Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1). name: container.memory.total_rss_huge sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: The amount of memory that cannot be reclaimed. Includes descendant cgroups. + - description: The amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_unevictable sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants. + - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1). name: container.memory.total_writeback sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: The amount of memory that cannot be reclaimed. name: container.memory.unevictable @@ -628,8 +628,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: Memory limit of the container. name: container.memory.usage.limit @@ -637,8 +637,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10449559552" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: Maximum memory usage. name: container.memory.usage.max @@ -646,8 +646,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3932160" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: Memory usage of the container. This excludes the cache. name: container.memory.usage.total @@ -655,17 +655,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "724992" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup. + - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1). name: container.memory.writeback sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" unit: By - description: Bytes received by the container. name: container.network.io.usage.rx_bytes @@ -677,8 +677,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: By - description: Incoming packets dropped. @@ -691,8 +691,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{packets}' - description: Received errors. @@ -705,8 +705,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{errors}' - description: Packets received. @@ -719,8 +719,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{packets}' - description: Bytes sent. @@ -733,8 +733,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: By - description: Outgoing packets dropped. @@ -747,8 +747,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{packets}' - description: Sent errors. @@ -761,8 +761,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{errors}' - description: Packets sent. @@ -775,17 +775,18 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723817610618000" - timeUnixNano: "1683723817613281000" + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" isMonotonic: true unit: '{packets}' - description: Time elapsed since container start time. - name: container.uptime gauge: dataPoints: - - asDouble: 0.0002888012543185477 - timeUnixNano: "1657771705535206000" - unit: 's' + - asDouble: 2.95714675823128e+07 + startTimeUnixNano: "1686652517836091000" + timeUnixNano: "1686652517839381000" + name: container.uptime + unit: s scope: name: otelcol/dockerstatsreceiver version: latest diff --git a/receiver/dockerstatsreceiver/testdata/mock/pids_stats_max/expected_metrics.yaml b/receiver/dockerstatsreceiver/testdata/mock/pids_stats_max/expected_metrics.yaml index 2fdfccad4911e..726fccfae9c8a 100644 --- a/receiver/dockerstatsreceiver/testdata/mock/pids_stats_max/expected_metrics.yaml +++ b/receiver/dockerstatsreceiver/testdata/mock/pids_stats_max/expected_metrics.yaml @@ -35,8 +35,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" - asInt: "0" attributes: - key: device_major @@ -48,8 +48,8 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" - asInt: "1998848" attributes: - key: device_major @@ -61,8 +61,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" - asInt: "0" attributes: - key: device_major @@ -74,8 +74,8 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" - asInt: "1998848" attributes: - key: device_major @@ -87,8 +87,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" - asInt: "0" attributes: - key: device_major @@ -100,16 +100,16 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: By - description: 'Deprecated: use `container.cpu.utilization` metric instead. Percent of CPU used by the container.' gauge: dataPoints: - asDouble: 0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" name: container.cpu.percent unit: "1" - description: Number of periods with throttling active. @@ -118,8 +118,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{periods}' - description: Number of periods when the container hits its throttling limit. @@ -128,8 +128,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{periods}' - description: Aggregate time the container was throttled. @@ -138,8 +138,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in kernel mode (Linux). Time spent by all container processes in kernel mode (Windows). @@ -148,8 +148,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "5467000" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: ns - description: System CPU usage, as reported by docker. @@ -158,8 +158,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "183556380000000" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: ns - description: Total CPU time consumed. @@ -168,8 +168,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10935000" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in user mode (Linux). Time spent by all container processes in user mode (Windows). @@ -178,8 +178,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "5467000" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: ns - description: The amount of anonymous memory that has been identified as active by the kernel. @@ -188,8 +188,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4096" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: By - description: Cache memory that has been identified as active by the kernel. name: container.memory.active_file @@ -197,8 +197,26 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" + unit: By + - description: Amount of memory used in anonymous mappings such as brk(), sbrk(), and mmap(MAP_ANONYMOUS) (Only available with cgroups v2). + name: container.memory.anon + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "114688" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" + unit: By + - description: Amount of memory used to cache filesystem data, including tmpfs and shared memory (Only available with cgroups v2). + name: container.memory.file + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1892352" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: By - description: The amount of anonymous memory that has been identified as inactive by the kernel. name: container.memory.inactive_anon @@ -206,8 +224,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "110592" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: By - description: Cache memory that has been identified as inactive by the kernel. name: container.memory.inactive_file @@ -215,15 +233,15 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1892352" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: By - description: Percentage of memory used. gauge: dataPoints: - asDouble: 0.016875995187363255 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" name: container.memory.percent unit: "1" - description: Indicate the number of times that a process of the cgroup triggered a page fault. @@ -232,8 +250,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1029" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{faults}' - description: Indicate the number of times that a process of the cgroup triggered a major fault. @@ -242,8 +260,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "12" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{faults}' - description: The amount of memory that cannot be reclaimed. @@ -252,8 +270,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: By - description: Memory limit of the container. name: container.memory.usage.limit @@ -261,8 +279,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2063048704" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: By - description: Maximum memory usage. name: container.memory.usage.max @@ -270,8 +288,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: By - description: Memory usage of the container. This excludes the cache. name: container.memory.usage.total @@ -279,8 +297,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "348160" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: By - description: Bytes received by the container. name: container.network.io.usage.rx_bytes @@ -292,8 +310,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: By - description: Incoming packets dropped. @@ -306,8 +324,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{packets}' - description: Received errors. @@ -320,8 +338,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{errors}' - description: Packets received. @@ -334,8 +352,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{packets}' - description: Bytes sent. @@ -348,8 +366,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: By - description: Outgoing packets dropped. @@ -362,8 +380,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{packets}' - description: Sent errors. @@ -376,8 +394,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{errors}' - description: Packets sent. @@ -390,8 +408,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" isMonotonic: true unit: '{packets}' - description: Number of pids in the container's cgroup. @@ -400,8 +418,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: '{pids}' - description: Maximum number of pids in the container's cgroup. name: container.pids.limit @@ -409,16 +427,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2192" - startTimeUnixNano: "1683723781127718000" - timeUnixNano: "1683723781130612000" + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" unit: '{pids}' - description: Time elapsed since container start time. - name: container.uptime gauge: dataPoints: - - asDouble: 0.0002888012543185477 - timeUnixNano: "1657771705535206000" - unit: 's' + - asDouble: 4.739290078504516e+06 + startTimeUnixNano: "1686652517884566000" + timeUnixNano: "1686652517887966000" + name: container.uptime + unit: s scope: name: otelcol/dockerstatsreceiver version: latest diff --git a/receiver/dockerstatsreceiver/testdata/mock/single_container/expected_metrics.yaml b/receiver/dockerstatsreceiver/testdata/mock/single_container/expected_metrics.yaml index df4e917182355..8a7991ca61dcf 100644 --- a/receiver/dockerstatsreceiver/testdata/mock/single_container/expected_metrics.yaml +++ b/receiver/dockerstatsreceiver/testdata/mock/single_container/expected_metrics.yaml @@ -47,8 +47,8 @@ resourceMetrics: - key: operation value: stringValue: async - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "0" attributes: - key: device_major @@ -60,8 +60,8 @@ resourceMetrics: - key: operation value: stringValue: discard - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "2502656" attributes: - key: device_major @@ -73,8 +73,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "2502656" attributes: - key: device_major @@ -86,8 +86,8 @@ resourceMetrics: - key: operation value: stringValue: sync - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "2502656" attributes: - key: device_major @@ -99,8 +99,8 @@ resourceMetrics: - key: operation value: stringValue: total - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "0" attributes: - key: device_major @@ -112,11 +112,11 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: By - - description: Number of IOs (bio) issued to the disk by the group and descendant groups. + - description: Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1). name: container.blockio.io_serviced_recursive sum: aggregationTemporality: 2 @@ -132,8 +132,8 @@ resourceMetrics: - key: operation value: stringValue: async - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "0" attributes: - key: device_major @@ -145,8 +145,8 @@ resourceMetrics: - key: operation value: stringValue: discard - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "99" attributes: - key: device_major @@ -158,8 +158,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "99" attributes: - key: device_major @@ -171,8 +171,8 @@ resourceMetrics: - key: operation value: stringValue: sync - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "99" attributes: - key: device_major @@ -184,8 +184,8 @@ resourceMetrics: - key: operation value: stringValue: total - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "0" attributes: - key: device_major @@ -197,15 +197,16 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1661128093793004000" - timeUnixNano: "1661128093795620000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{operations}' - description: 'Deprecated: use `container.cpu.utilization` metric instead. Percent of CPU used by the container.' gauge: dataPoints: - asDouble: 0.0002888012543185477 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" name: container.cpu.percent unit: "1" - description: Number of periods with throttling active. @@ -214,7 +215,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{periods}' - description: Number of periods when the container hits its throttling limit. @@ -223,7 +225,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{periods}' - description: Aggregate time the container was throttled. @@ -232,7 +235,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in kernel mode (Linux). Time spent by all container processes in kernel mode (Windows). @@ -241,10 +245,11 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10000000" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: ns - - description: Per-core CPU usage by the container. + - description: Per-core CPU usage by the container (Only available with cgroups v1). name: container.cpu.usage.percpu sum: aggregationTemporality: 2 @@ -254,49 +259,57 @@ resourceMetrics: - key: core value: stringValue: cpu0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "0" attributes: - key: core value: stringValue: cpu1 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "262690" attributes: - key: core value: stringValue: cpu2 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "762532" attributes: - key: core value: stringValue: cpu3 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "78532" attributes: - key: core value: stringValue: cpu4 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "28108575" attributes: - key: core value: stringValue: cpu5 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "8800811" attributes: - key: core value: stringValue: cpu6 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" - asInt: "4191833" attributes: - key: core value: stringValue: cpu7 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: ns - description: System CPU usage, as reported by docker. @@ -305,7 +318,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "120830550000000" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: ns - description: Total CPU time consumed. @@ -314,7 +328,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "43620018" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in user mode (Linux). Time spent by all container processes in user mode (Windows). @@ -323,7 +338,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10000000" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: ns - description: The amount of anonymous memory that has been identified as active by the kernel. @@ -332,7 +348,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: Cache memory that has been identified as active by the kernel. name: container.memory.active_file @@ -340,39 +357,44 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "270336" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device. + - description: The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1). name: container.memory.cache sum: aggregationTemporality: 2 dataPoints: - asInt: "2433024" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Bytes that are waiting to get written back to the disk, from this cgroup. + - description: Bytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1). name: container.memory.dirty sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: The maximum amount of physical memory that can be used by the processes of this control group. + - description: The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1). name: container.memory.hierarchical_memory_limit sum: aggregationTemporality: 2 dataPoints: - asInt: "9223372036854772000" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: The maximum amount of RAM + swap that can be used by the processes of this control group. + - description: The maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1). name: container.memory.hierarchical_memsw_limit sum: aggregationTemporality: 2 dataPoints: - asInt: "9223372036854772000" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: The amount of anonymous memory that has been identified as inactive by the kernel. name: container.memory.inactive_anon @@ -380,7 +402,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: Cache memory that has been identified as inactive by the kernel. name: container.memory.inactive_file @@ -388,21 +411,24 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2162688" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Indicates the amount of memory mapped by the processes in the control group. + - description: Indicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1). name: container.memory.mapped_file sum: aggregationTemporality: 2 dataPoints: - asInt: "1486848" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: Percentage of memory used. gauge: dataPoints: - asDouble: 0.006938014912420301 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" name: container.memory.percent unit: "1" - description: Indicate the number of times that a process of the cgroup triggered a page fault. @@ -411,7 +437,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "990" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{faults}' - description: Indicate the number of times that a process of the cgroup triggered a major fault. @@ -420,166 +447,186 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{faults}' - - description: Number of pages read from disk by the cgroup. + - description: Number of pages read from disk by the cgroup (Only available with cgroups v1). name: container.memory.pgpgin sum: aggregationTemporality: 2 dataPoints: - asInt: "1287" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{operations}' - - description: Number of pages written to disk by the cgroup. + - description: Number of pages written to disk by the cgroup (Only available with cgroups v1). name: container.memory.pgpgout sum: aggregationTemporality: 2 dataPoints: - asInt: "667" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{operations}' - - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps.' + - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1).' name: container.memory.rss sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Number of bytes of anonymous transparent hugepages in this cgroup. + - description: Number of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1). name: container.memory.rss_huge sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups. + - description: The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_active_anon sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Cache memory that has been identified as active by the kernel. Includes descendant cgroups. + - description: Cache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_active_file sum: aggregationTemporality: 2 dataPoints: - asInt: "270336" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs. + - description: Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1). name: container.memory.total_cache sum: aggregationTemporality: 2 dataPoints: - asInt: "2433024" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Bytes that are waiting to get written back to the disk, from this cgroup and descendants. + - description: Bytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1). name: container.memory.total_dirty sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups. + - description: The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_inactive_anon sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups. + - description: Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_inactive_file sum: aggregationTemporality: 2 dataPoints: - asInt: "2162688" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Indicates the amount of memory mapped by the processes in the control group and descendant groups. + - description: Indicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1). name: container.memory.total_mapped_file sum: aggregationTemporality: 2 dataPoints: - asInt: "1486848" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault. + - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1). name: container.memory.total_pgfault sum: aggregationTemporality: 2 dataPoints: - asInt: "990" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{faults}' - - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault. + - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1). name: container.memory.total_pgmajfault sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{faults}' - - description: Number of pages read from disk by the cgroup and descendant groups. + - description: Number of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1). name: container.memory.total_pgpgin sum: aggregationTemporality: 2 dataPoints: - asInt: "1287" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{operations}' - - description: Number of pages written to disk by the cgroup and descendant groups. + - description: Number of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1). name: container.memory.total_pgpgout sum: aggregationTemporality: 2 dataPoints: - asInt: "667" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{operations}' - - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups.' + - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1).' name: container.memory.total_rss sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups. + - description: Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1). name: container.memory.total_rss_huge sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: The amount of memory that cannot be reclaimed. Includes descendant cgroups. + - description: The amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_unevictable sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants. + - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1). name: container.memory.total_writeback sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: The amount of memory that cannot be reclaimed. name: container.memory.unevictable @@ -587,7 +634,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: Memory limit of the container. name: container.memory.usage.limit @@ -595,7 +643,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10449559552" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: Maximum memory usage. name: container.memory.usage.max @@ -603,7 +652,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3932160" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: Memory usage of the container. This excludes the cache. name: container.memory.usage.total @@ -611,15 +661,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "724992" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup. + - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1). name: container.memory.writeback sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: By - description: Bytes received by the container. name: container.network.io.usage.rx_bytes @@ -631,7 +683,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: By - description: Incoming packets dropped. @@ -644,7 +697,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{packets}' - description: Received errors. @@ -657,7 +711,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{errors}' - description: Packets received. @@ -670,7 +725,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{packets}' - description: Bytes sent. @@ -683,7 +739,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: By - description: Outgoing packets dropped. @@ -696,7 +753,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{packets}' - description: Sent errors. @@ -709,7 +767,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{errors}' - description: Packets sent. @@ -722,7 +781,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" isMonotonic: true unit: '{packets}' - description: Number of pids in the container's cgroup. @@ -731,15 +791,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - timeUnixNano: "1657771705535206000" + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" unit: '{pids}' - description: Time elapsed since container start time. - name: container.uptime gauge: dataPoints: - - asDouble: 0.0002888012543185477 - timeUnixNano: "1657771705535206000" - unit: 's' + - asDouble: 2.95714674407398e+07 + startTimeUnixNano: "1686652517690921000" + timeUnixNano: "1686652517697808000" + name: container.uptime + unit: s scope: name: otelcol/dockerstatsreceiver version: latest diff --git a/receiver/dockerstatsreceiver/testdata/mock/two_containers/expected_metrics.yaml b/receiver/dockerstatsreceiver/testdata/mock/two_containers/expected_metrics.yaml index e0e8459b0489c..8eb9fc57306bc 100644 --- a/receiver/dockerstatsreceiver/testdata/mock/two_containers/expected_metrics.yaml +++ b/receiver/dockerstatsreceiver/testdata/mock/two_containers/expected_metrics.yaml @@ -41,8 +41,8 @@ resourceMetrics: - key: operation value: stringValue: async - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "0" attributes: - key: device_major @@ -54,8 +54,8 @@ resourceMetrics: - key: operation value: stringValue: discard - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "73728" attributes: - key: device_major @@ -67,8 +67,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "73728" attributes: - key: device_major @@ -80,8 +80,8 @@ resourceMetrics: - key: operation value: stringValue: sync - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "73728" attributes: - key: device_major @@ -93,8 +93,8 @@ resourceMetrics: - key: operation value: stringValue: total - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "0" attributes: - key: device_major @@ -106,11 +106,11 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: By - - description: Number of IOs (bio) issued to the disk by the group and descendant groups. + - description: Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1). name: container.blockio.io_serviced_recursive sum: aggregationTemporality: 2 @@ -126,8 +126,8 @@ resourceMetrics: - key: operation value: stringValue: async - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "0" attributes: - key: device_major @@ -139,8 +139,8 @@ resourceMetrics: - key: operation value: stringValue: discard - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "1" attributes: - key: device_major @@ -152,8 +152,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "1" attributes: - key: device_major @@ -165,8 +165,8 @@ resourceMetrics: - key: operation value: stringValue: sync - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "1" attributes: - key: device_major @@ -178,8 +178,8 @@ resourceMetrics: - key: operation value: stringValue: total - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "0" attributes: - key: device_major @@ -191,15 +191,16 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - description: 'Deprecated: use `container.cpu.utilization` metric instead. Percent of CPU used by the container.' gauge: dataPoints: - asDouble: 0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" name: container.cpu.percent unit: "1" - description: Number of periods with throttling active. @@ -208,7 +209,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{periods}' - description: Number of periods when the container hits its throttling limit. @@ -217,7 +219,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{periods}' - description: Aggregate time the container was throttled. @@ -226,7 +229,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in kernel mode (Linux). Time spent by all container processes in kernel mode (Windows). @@ -235,10 +239,11 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10000000" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - - description: Per-core CPU usage by the container. + - description: Per-core CPU usage by the container (Only available with cgroups v1). name: container.cpu.usage.percpu sum: aggregationTemporality: 2 @@ -248,7 +253,8 @@ resourceMetrics: - key: core value: stringValue: cpu0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: System CPU usage, as reported by docker. @@ -257,7 +263,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "14930240000000" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: Total CPU time consumed. @@ -266,7 +273,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "31093384" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in user mode (Linux). Time spent by all container processes in user mode (Windows). @@ -275,7 +283,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10000000" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: The amount of anonymous memory that has been identified as active by the kernel. @@ -284,7 +293,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4096" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Cache memory that has been identified as active by the kernel. name: container.memory.active_file @@ -292,39 +302,44 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "73728" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device. + - description: The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1). name: container.memory.cache sum: aggregationTemporality: 2 dataPoints: - asInt: "73728" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Bytes that are waiting to get written back to the disk, from this cgroup. + - description: Bytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1). name: container.memory.dirty sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The maximum amount of physical memory that can be used by the processes of this control group. + - description: The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1). name: container.memory.hierarchical_memory_limit sum: aggregationTemporality: 2 dataPoints: - asInt: "9223372036854772000" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The maximum amount of RAM + swap that can be used by the processes of this control group. + - description: The maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1). name: container.memory.hierarchical_memsw_limit sum: aggregationTemporality: 2 dataPoints: - asInt: "9223372036854772000" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: The amount of anonymous memory that has been identified as inactive by the kernel. name: container.memory.inactive_anon @@ -332,7 +347,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "106496" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Cache memory that has been identified as inactive by the kernel. name: container.memory.inactive_file @@ -340,21 +356,24 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Indicates the amount of memory mapped by the processes in the control group. + - description: Indicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1). name: container.memory.mapped_file sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Percentage of memory used. gauge: dataPoints: - asDouble: 0.02053846320949035 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" name: container.memory.percent unit: "1" - description: Indicate the number of times that a process of the cgroup triggered a page fault. @@ -363,7 +382,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2417" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{faults}' - description: Indicate the number of times that a process of the cgroup triggered a major fault. @@ -372,166 +392,186 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{faults}' - - description: Number of pages read from disk by the cgroup. + - description: Number of pages read from disk by the cgroup (Only available with cgroups v1). name: container.memory.pgpgin sum: aggregationTemporality: 2 dataPoints: - asInt: "1980" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - - description: Number of pages written to disk by the cgroup. + - description: Number of pages written to disk by the cgroup (Only available with cgroups v1). name: container.memory.pgpgout sum: aggregationTemporality: 2 dataPoints: - asInt: "1935" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps.' + - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1).' name: container.memory.rss sum: aggregationTemporality: 2 dataPoints: - asInt: "110592" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Number of bytes of anonymous transparent hugepages in this cgroup. + - description: Number of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1). name: container.memory.rss_huge sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups. + - description: The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_active_anon sum: aggregationTemporality: 2 dataPoints: - asInt: "4096" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Cache memory that has been identified as active by the kernel. Includes descendant cgroups. + - description: Cache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_active_file sum: aggregationTemporality: 2 dataPoints: - asInt: "73728" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs. + - description: Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1). name: container.memory.total_cache sum: aggregationTemporality: 2 dataPoints: - asInt: "73728" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Bytes that are waiting to get written back to the disk, from this cgroup and descendants. + - description: Bytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1). name: container.memory.total_dirty sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups. + - description: The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_inactive_anon sum: aggregationTemporality: 2 dataPoints: - asInt: "106496" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups. + - description: Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_inactive_file sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Indicates the amount of memory mapped by the processes in the control group and descendant groups. + - description: Indicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1). name: container.memory.total_mapped_file sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault. + - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1). name: container.memory.total_pgfault sum: aggregationTemporality: 2 dataPoints: - asInt: "2417" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{faults}' - - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault. + - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1). name: container.memory.total_pgmajfault sum: aggregationTemporality: 2 dataPoints: - asInt: "1" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{faults}' - - description: Number of pages read from disk by the cgroup and descendant groups. + - description: Number of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1). name: container.memory.total_pgpgin sum: aggregationTemporality: 2 dataPoints: - asInt: "1980" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - - description: Number of pages written to disk by the cgroup and descendant groups. + - description: Number of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1). name: container.memory.total_pgpgout sum: aggregationTemporality: 2 dataPoints: - asInt: "1935" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups.' + - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1).' name: container.memory.total_rss sum: aggregationTemporality: 2 dataPoints: - asInt: "110592" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups. + - description: Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1). name: container.memory.total_rss_huge sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The amount of memory that cannot be reclaimed. Includes descendant cgroups. + - description: The amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_unevictable sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants. + - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1). name: container.memory.total_writeback sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: The amount of memory that cannot be reclaimed. name: container.memory.unevictable @@ -539,7 +579,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Memory limit of the container. name: container.memory.usage.limit @@ -547,7 +588,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2074079232" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Maximum memory usage. name: container.memory.usage.max @@ -555,7 +597,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "6172672" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Memory usage of the container. This excludes the cache. name: container.memory.usage.total @@ -563,15 +606,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "425984" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup. + - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1). name: container.memory.writeback sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Bytes received by the container. name: container.network.io.usage.rx_bytes @@ -583,7 +628,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: By - description: Incoming packets dropped. @@ -596,7 +642,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{packets}' - description: Received errors. @@ -609,7 +656,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{errors}' - description: Packets received. @@ -622,7 +670,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{packets}' - description: Bytes sent. @@ -635,7 +684,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: By - description: Outgoing packets dropped. @@ -648,7 +698,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{packets}' - description: Sent errors. @@ -661,7 +712,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{errors}' - description: Packets sent. @@ -674,7 +726,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{packets}' - description: Number of pids in the container's cgroup. @@ -683,15 +736,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - timeUnixNano: "1657771832637112000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: '{pids}' - description: Time elapsed since container start time. - name: container.uptime gauge: dataPoints: - - asDouble: 0.0002888012543185477 - timeUnixNano: "1657771705535206000" - unit: 's' + - asDouble: 2.906595253770684e+07 + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" + name: container.uptime + unit: s scope: name: otelcol/dockerstatsreceiver version: latest @@ -737,8 +792,8 @@ resourceMetrics: - key: operation value: stringValue: async - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "0" attributes: - key: device_major @@ -750,8 +805,8 @@ resourceMetrics: - key: operation value: stringValue: discard - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "1187840" attributes: - key: device_major @@ -763,8 +818,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "1187840" attributes: - key: device_major @@ -776,8 +831,8 @@ resourceMetrics: - key: operation value: stringValue: sync - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "1187840" attributes: - key: device_major @@ -789,8 +844,8 @@ resourceMetrics: - key: operation value: stringValue: total - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "0" attributes: - key: device_major @@ -802,11 +857,11 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: By - - description: Number of IOs (bio) issued to the disk by the group and descendant groups. + - description: Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1). name: container.blockio.io_serviced_recursive sum: aggregationTemporality: 2 @@ -822,8 +877,8 @@ resourceMetrics: - key: operation value: stringValue: async - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "0" attributes: - key: device_major @@ -835,8 +890,8 @@ resourceMetrics: - key: operation value: stringValue: discard - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "19" attributes: - key: device_major @@ -848,8 +903,8 @@ resourceMetrics: - key: operation value: stringValue: read - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "19" attributes: - key: device_major @@ -861,8 +916,8 @@ resourceMetrics: - key: operation value: stringValue: sync - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "19" attributes: - key: device_major @@ -874,8 +929,8 @@ resourceMetrics: - key: operation value: stringValue: total - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" - asInt: "0" attributes: - key: device_major @@ -887,15 +942,16 @@ resourceMetrics: - key: operation value: stringValue: write - startTimeUnixNano: "1661128790156624000" - timeUnixNano: "1661128790158163000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - description: 'Deprecated: use `container.cpu.utilization` metric instead. Percent of CPU used by the container.' gauge: dataPoints: - asDouble: 0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" name: container.cpu.percent unit: "1" - description: Number of periods with throttling active. @@ -904,7 +960,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{periods}' - description: Number of periods when the container hits its throttling limit. @@ -913,7 +970,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{periods}' - description: Aggregate time the container was throttled. @@ -922,7 +980,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in kernel mode (Linux). Time spent by all container processes in kernel mode (Windows). @@ -931,10 +990,11 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "20000000" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - - description: Per-core CPU usage by the container. + - description: Per-core CPU usage by the container (Only available with cgroups v1). name: container.cpu.usage.percpu sum: aggregationTemporality: 2 @@ -944,7 +1004,8 @@ resourceMetrics: - key: core value: stringValue: cpu0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: System CPU usage, as reported by docker. @@ -953,7 +1014,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "14834790000000" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: Total CPU time consumed. @@ -962,7 +1024,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "34117917" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: Time spent by tasks of the cgroup in user mode (Linux). Time spent by all container processes in user mode (Windows). @@ -971,7 +1034,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10000000" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: ns - description: The amount of anonymous memory that has been identified as active by the kernel. @@ -980,7 +1044,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4096" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Cache memory that has been identified as active by the kernel. name: container.memory.active_file @@ -988,39 +1053,44 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "393216" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device. + - description: The amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1). name: container.memory.cache sum: aggregationTemporality: 2 dataPoints: - asInt: "921600" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Bytes that are waiting to get written back to the disk, from this cgroup. + - description: Bytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1). name: container.memory.dirty sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The maximum amount of physical memory that can be used by the processes of this control group. + - description: The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1). name: container.memory.hierarchical_memory_limit sum: aggregationTemporality: 2 dataPoints: - asInt: "9223372036854772000" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The maximum amount of RAM + swap that can be used by the processes of this control group. + - description: The maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1). name: container.memory.hierarchical_memsw_limit sum: aggregationTemporality: 2 dataPoints: - asInt: "9223372036854772000" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: The amount of anonymous memory that has been identified as inactive by the kernel. name: container.memory.inactive_anon @@ -1028,7 +1098,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "147456" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Cache memory that has been identified as inactive by the kernel. name: container.memory.inactive_file @@ -1036,21 +1107,24 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "528384" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Indicates the amount of memory mapped by the processes in the control group. + - description: Indicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1). name: container.memory.mapped_file sum: aggregationTemporality: 2 dataPoints: - asInt: "843776" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Percentage of memory used. gauge: dataPoints: - asDouble: 0.037324707178785346 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" name: container.memory.percent unit: "1" - description: Indicate the number of times that a process of the cgroup triggered a page fault. @@ -1059,7 +1133,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2469" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{faults}' - description: Indicate the number of times that a process of the cgroup triggered a major fault. @@ -1068,166 +1143,186 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "8" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{faults}' - - description: Number of pages read from disk by the cgroup. + - description: Number of pages read from disk by the cgroup (Only available with cgroups v1). name: container.memory.pgpgin sum: aggregationTemporality: 2 dataPoints: - asInt: "2288" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - - description: Number of pages written to disk by the cgroup. + - description: Number of pages written to disk by the cgroup (Only available with cgroups v1). name: container.memory.pgpgout sum: aggregationTemporality: 2 dataPoints: - asInt: "2026" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps.' + - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1).' name: container.memory.rss sum: aggregationTemporality: 2 dataPoints: - asInt: "151552" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Number of bytes of anonymous transparent hugepages in this cgroup. + - description: Number of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1). name: container.memory.rss_huge sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups. + - description: The amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_active_anon sum: aggregationTemporality: 2 dataPoints: - asInt: "4096" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Cache memory that has been identified as active by the kernel. Includes descendant cgroups. + - description: Cache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_active_file sum: aggregationTemporality: 2 dataPoints: - asInt: "393216" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs. + - description: Total amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1). name: container.memory.total_cache sum: aggregationTemporality: 2 dataPoints: - asInt: "921600" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Bytes that are waiting to get written back to the disk, from this cgroup and descendants. + - description: Bytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1). name: container.memory.total_dirty sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups. + - description: The amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_inactive_anon sum: aggregationTemporality: 2 dataPoints: - asInt: "147456" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups. + - description: Cache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_inactive_file sum: aggregationTemporality: 2 dataPoints: - asInt: "528384" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Indicates the amount of memory mapped by the processes in the control group and descendant groups. + - description: Indicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1). name: container.memory.total_mapped_file sum: aggregationTemporality: 2 dataPoints: - asInt: "843776" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault. + - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1). name: container.memory.total_pgfault sum: aggregationTemporality: 2 dataPoints: - asInt: "2469" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{faults}' - - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault. + - description: Indicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1). name: container.memory.total_pgmajfault sum: aggregationTemporality: 2 dataPoints: - asInt: "8" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{faults}' - - description: Number of pages read from disk by the cgroup and descendant groups. + - description: Number of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1). name: container.memory.total_pgpgin sum: aggregationTemporality: 2 dataPoints: - asInt: "2288" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - - description: Number of pages written to disk by the cgroup and descendant groups. + - description: Number of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1). name: container.memory.total_pgpgout sum: aggregationTemporality: 2 dataPoints: - asInt: "2026" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{operations}' - - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups.' + - description: 'The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1).' name: container.memory.total_rss sum: aggregationTemporality: 2 dataPoints: - asInt: "151552" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups. + - description: Number of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1). name: container.memory.total_rss_huge sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: The amount of memory that cannot be reclaimed. Includes descendant cgroups. + - description: The amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1). name: container.memory.total_unevictable sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants. + - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1). name: container.memory.total_writeback sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: The amount of memory that cannot be reclaimed. name: container.memory.unevictable @@ -1235,7 +1330,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Memory limit of the container. name: container.memory.usage.limit @@ -1243,7 +1339,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2074079232" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Maximum memory usage. name: container.memory.usage.max @@ -1251,7 +1348,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "6201344" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Memory usage of the container. This excludes the cache. name: container.memory.usage.total @@ -1259,15 +1357,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "774144" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup. + - description: Number of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1). name: container.memory.writeback sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: By - description: Bytes received by the container. name: container.network.io.usage.rx_bytes @@ -1279,7 +1379,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: By - description: Incoming packets dropped. @@ -1292,7 +1393,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{packets}' - description: Received errors. @@ -1305,7 +1407,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{errors}' - description: Packets received. @@ -1318,7 +1421,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{packets}' - description: Bytes sent. @@ -1331,7 +1435,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: By - description: Outgoing packets dropped. @@ -1344,7 +1449,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{packets}' - description: Sent errors. @@ -1357,7 +1463,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{errors}' - description: Packets sent. @@ -1370,7 +1477,8 @@ resourceMetrics: - key: interface value: stringValue: eth0 - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" isMonotonic: true unit: '{packets}' - description: Number of pids in the container's cgroup. @@ -1379,15 +1487,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - timeUnixNano: "1657771832637093000" + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" unit: '{pids}' - description: Time elapsed since container start time. - name: container.uptime gauge: dataPoints: - - asDouble: 0.0002888012543185477 - timeUnixNano: "1657771705535206000" - unit: 's' + - asDouble: 2.906589656309223e+07 + startTimeUnixNano: "1686652517745787000" + timeUnixNano: "1686652517750632000" + name: container.uptime + unit: s scope: name: otelcol/dockerstatsreceiver version: latest