Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add system.cpu.frequency metric. #337

Merged
merged 9 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
mx-psi marked this conversation as resolved.
Show resolved Hide resolved
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
Loading