Skip to content

Commit

Permalink
Add system.cpu.frequency metric. (#337)
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <[email protected]>
Co-authored-by: Pablo Baeyens <[email protected]>
  • Loading branch information
ChrsMark and mx-psi authored Oct 26, 2023
1 parent 6121966 commit 26f4992
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ release.
- BREAKING: Rename `telemetry.auto.version` resource attribute to `telemetry.distro.version`
and add `telemetry.distro.name` resource attribute
([#178](https://github.com/open-telemetry/semantic-conventions/pull/178))
- Add `system.cpu.frequency` metric.
([#337](https://github.com/open-telemetry/semantic-conventions/pull/337))
- Improve HTTP metric briefs.
([#366](https://github.com/open-telemetry/semantic-conventions/pull/366))
- Add `host.ip` resource attribute convention.
Expand Down
17 changes: 17 additions & 0 deletions docs/system/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Resource attributes related to a host, SHOULD be reported under the `host.*` nam
* [Metric: `system.cpu.utilization`](#metric-systemcpuutilization)
* [Metric: `system.cpu.physical.count`](#metric-systemcpuphysicalcount)
* [Metric: `system.cpu.logical.count`](#metric-systemcpulogicalcount)
* [Metric: `system.cpu.frequency`](#metric-systemcpufrequency)
- [Memory Metrics](#memory-metrics)
* [Metric: `system.memory.usage`](#metric-systemmemoryusage)
* [Metric: `system.memory.utilization`](#metric-systemmemoryutilization)
Expand Down Expand Up @@ -145,6 +146,22 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.cpu.logical.count(full) -->
<!-- endsemconv -->

### Metric: `system.cpu.frequency`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.system.cpu.frequency(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `system.cpu.frequency` | Gauge | `{Hz}` | Reports the current frequency of the CPU in Hz |
<!-- endsemconv -->

<!-- semconv metric.system.cpu.frequency(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `system.cpu.logical_number` | int | The logical CPU number [0..n-1] | `1` | Recommended |
<!-- endsemconv -->

## Memory Metrics

**Description:** System level memory metrics capture under the namespace `system.memory`.
Expand Down
9 changes: 9 additions & 0 deletions model/metrics/system-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ groups:
- ref: system.cpu.state
- ref: system.cpu.logical_number

- id: metric.system.cpu.frequency
type: metric
metric_name: system.cpu.frequency
brief: "Reports the current frequency of the CPU in Hz"
instrument: gauge
unit: "{Hz}"
attributes:
- ref: system.cpu.logical_number

- id: metric.system.cpu.physical.count
type: metric
metric_name: system.cpu.physical.count
Expand Down

0 comments on commit 26f4992

Please sign in to comment.