From e1be1b11fe4acde235a7f09045954873437f2444 Mon Sep 17 00:00:00 2001 From: Benedikt Bongartz Date: Wed, 19 Jul 2023 00:09:48 +0200 Subject: [PATCH 1/3] add system.cpu.physical.count and system.cpu.logical.count metrics Signed-off-by: Benedikt Bongartz Co-authored-by: Pablo Baeyens Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Co-authored-by: Dmitrii Anoshin --- CHANGELOG.md | 2 ++ docs/system/system-metrics.md | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6580b21cdf..b5547818af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,6 +111,8 @@ Note: This is the first release of Semantic Conventions separate from the Specif ([#133](https://github.com/open-telemetry/semantic-conventions/pull/133)) - Add markdown file for url semantic conventions ([#174](https://github.com/open-telemetry/semantic-conventions/pull/174)) +- Add `system.cpu.physical.count` and `system.cpu.logical.count` metrics. + ([#99](https://github.com/open-telemetry/opentelemetry-specification/pull/99)) ## v1.20.0 (2023-04-07) diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 3882a55788..1c559263d2 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -33,12 +33,15 @@ instruments not explicitly defined in the specification. **Description:** System level processor metrics. -| Name | Description | Units | Instrument Type ([*](/docs/general/metrics.md#instrument-types)) | Value Type | Attribute Key(s) | Attribute Values | -| ---------------------- | -------------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------------- | ---------- | ---------------- | ----------------------------------- | -| system.cpu.time | | s | Counter | Double | state | idle, user, system, interrupt, etc. | -| | | | | | cpu | CPU number [0..n-1] | -| system.cpu.utilization | Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of CPUs | 1 | Gauge | Double | state | idle, user, system, interrupt, etc. | -| | | | | | cpu | CPU number (0..n) | + +| Name | Description | Units | Instrument Type ([*](/docs/general/metrics.md#instrument-types)) | Value Type | Attribute Key(s) | Attribute Values | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------------- | ---------- | ---------------- | ----------------------------------- | +| system.cpu.time | Seconds each logical CPU spent on each mode | s | Counter | Double | state | idle, user, system, interrupt, etc. | +| | | | | | cpu | Logical CPU number [0..n-1] | +| system.cpu.utilization | Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs | 1 | Gauge | Double | state | idle, user, system, interrupt, etc. | +| | | | | | cpu | Logical CPU number (0..n) | +| system.cpu.physical.count | Reports the number of actual physical processor cores on the hardware | {cpu} | UpDownCounters | Int64 | | | +| system.cpu.logical.count | Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking | {cpu} | UpDownCounters | Int64 | | | ### `system.memory.` - Memory metrics From a99f5406ba3dbc1cd00c469288731706b7654cb9 Mon Sep 17 00:00:00 2001 From: Benedikt Bongartz Date: Tue, 1 Aug 2023 09:53:27 +0200 Subject: [PATCH 2/3] fix Signed-off-by: Benedikt Bongartz --- docs/system/system-metrics.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 1c559263d2..fc58947697 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -33,7 +33,6 @@ instruments not explicitly defined in the specification. **Description:** System level processor metrics. - | Name | Description | Units | Instrument Type ([*](/docs/general/metrics.md#instrument-types)) | Value Type | Attribute Key(s) | Attribute Values | | ------------------------- | ---------------------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------------- | ---------- | ---------------- | ----------------------------------- | | system.cpu.time | Seconds each logical CPU spent on each mode | s | Counter | Double | state | idle, user, system, interrupt, etc. | From 1a1daadd0277a421c590de11f5a4df6e59746f44 Mon Sep 17 00:00:00 2001 From: Ben B Date: Tue, 1 Aug 2023 17:40:13 +0200 Subject: [PATCH 3/3] Update docs/system/system-metrics.md Co-authored-by: Armin Ruech --- docs/system/system-metrics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index fc58947697..2f71ef86af 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -39,8 +39,8 @@ instruments not explicitly defined in the specification. | | | | | | cpu | Logical CPU number [0..n-1] | | system.cpu.utilization | Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs | 1 | Gauge | Double | state | idle, user, system, interrupt, etc. | | | | | | | cpu | Logical CPU number (0..n) | -| system.cpu.physical.count | Reports the number of actual physical processor cores on the hardware | {cpu} | UpDownCounters | Int64 | | | -| system.cpu.logical.count | Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking | {cpu} | UpDownCounters | Int64 | | | +| system.cpu.physical.count | Reports the number of actual physical processor cores on the hardware | {cpu} | UpDownCounter | Int64 | | | +| system.cpu.logical.count | Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking | {cpu} | UpDownCounter | Int64 | | | ### `system.memory.` - Memory metrics