Skip to content

Commit

Permalink
add system.cpu.physical.count and system.cpu.logical.count metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Bongartz <[email protected]>
Co-authored-by: Pablo Baeyens <[email protected]>
Co-authored-by: Tigran Najaryan <[email protected]>
  • Loading branch information
3 people committed Jul 18, 2023
1 parent 82a6efb commit 30f35a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
16 changes: 10 additions & 6 deletions docs/system/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ 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) |
NOTE: Logical CPU refers to the virtual cores created by the operating system to manage multitasking, while a physical CPU represents the actual physical processor core(s) on the hardware.

| 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 available physical CPUs - may change over time | {cpu} | UpDownCounters | Int64 | | |
| system.cpu.logical.count | Reports the number of available logical CPUs - may change over time | {cpu} | UpDownCounters | Int64 | | |

### `system.memory.` - Memory metrics

Expand Down

0 comments on commit 30f35a1

Please sign in to comment.