Skip to content

Commit

Permalink
[vcenterreceiver] Updated units on several metrics (open-telemetry#34946
Browse files Browse the repository at this point in the history
)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
The following change works to update several metrics units to be more
inline with the semantics declared here:
https://opentelemetry.io/docs/specs/semconv/general/metrics/#instrument-units
Specifically it changes all the uses of `sec` to `s` and also updates
the incorrect unit usage of `{MHz}` to `MHz` on a couple metrics.

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>
All golden package tests were updated, as well as integration tests.

**Documentation:** <Describe the documentation added.>
Documentation was updated with mdatagen with the use of `make generate`
  • Loading branch information
BominRahmani authored Sep 3, 2024
1 parent 5822332 commit d25990b
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 119 deletions.
42 changes: 42 additions & 0 deletions .chloggen/vcenter-unit-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Use this changelog template to create an entry for release notes.

# 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: vcenterreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Updated units on several metrics to be more in line with documented semantics.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [34946]

# (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: |
The following are the metrics with their respective unit changes:
- vcenter.datacenter.cpu.limit ({MHz} -> MHz)
- vcenter.cluster.cpu.limit ({MHz} -> MHz)
- vcenter.cluster.cpu.effective ({MHz} -> MHz)
- vcenter.cluster.vsan.operations ({operations/sec} -> {operations/s})
- vcenter.cluster.vsan.congestions ({congestions/sec} -> {congestions/s})
- vcenter.host.network.packet.error.rate ({errors/sec} -> {errors/s})
- vcenter.host.network.packet.rate ({packets/sec} -> {packets/s})
- vcenter.host.network.packet.drop.rate ({packets/sec} -> {packets/s})
- vcenter.host.vsan.operations ({operations/sec} -> {operations/s})
- vcenter.host.vsan.congestions ({congestions/sec} -> {congestions/s})
- vcenter.resource_pool.cpu.usage ({MHz} -> MHz)
- vcenter.vm.network.throughput (By/sec -> By/s)
- vcenter.vm.network.packet.rate ({packets/sec} -> {packets/s})
- vcenter.vm.vsan.operations ({operations/sec} -> {operations/s})
# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
30 changes: 15 additions & 15 deletions receiver/vcenterreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ The effective CPU available to the cluster. This value excludes CPU from hosts i
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {MHz} | Sum | Int | Cumulative | false |
| MHz | Sum | Int | Cumulative | false |
### vcenter.cluster.cpu.limit
The amount of CPU available to the cluster.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {MHz} | Sum | Int | Cumulative | false |
| MHz | Sum | Int | Cumulative | false |
### vcenter.cluster.host.count
Expand Down Expand Up @@ -88,7 +88,7 @@ The congestions of IOs generated by all vSAN clients in the cluster.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {congestions/sec} | Gauge | Double |
| {congestions/s} | Gauge | Double |
### vcenter.cluster.vsan.latency.avg
Expand All @@ -110,7 +110,7 @@ The vSAN IOPs of a cluster.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {operations/sec} | Gauge | Int |
| {operations/s} | Gauge | Int |
#### Attributes
Expand Down Expand Up @@ -152,7 +152,7 @@ The total amount of CPU available to the datacenter.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {MHz} | Sum | Int | Cumulative | false |
| MHz | Sum | Int | Cumulative | false |
### vcenter.datacenter.datastore.count
Expand Down Expand Up @@ -348,7 +348,7 @@ As measured over the most recent 20s interval.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {packets/sec} | Gauge | Double |
| {packets/s} | Gauge | Double |
#### Attributes
Expand All @@ -365,7 +365,7 @@ As measured over the most recent 20s interval.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {errors/sec} | Gauge | Double |
| {errors/s} | Gauge | Double |
#### Attributes
Expand All @@ -382,7 +382,7 @@ As measured over the most recent 20s interval.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {packets/sec} | Gauge | Double |
| {packets/s} | Gauge | Double |
#### Attributes
Expand Down Expand Up @@ -440,7 +440,7 @@ As measured over the most recent 5m interval.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {congestions/sec} | Gauge | Double |
| {congestions/s} | Gauge | Double |
### vcenter.host.vsan.latency.avg
Expand All @@ -466,7 +466,7 @@ As measured over the most recent 5m interval.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {operations/sec} | Gauge | Int |
| {operations/s} | Gauge | Int |
#### Attributes
Expand Down Expand Up @@ -504,7 +504,7 @@ The usage of the CPU used by the resource pool.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {MHz} | Sum | Int | Cumulative | false |
| MHz | Sum | Int | Cumulative | false |
### vcenter.resource_pool.memory.ballooned
Expand Down Expand Up @@ -701,7 +701,7 @@ As measured over the most recent 20s interval.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {packets/sec} | Gauge | Double |
| {packets/s} | Gauge | Double |
#### Attributes
Expand All @@ -718,7 +718,7 @@ As measured over the most recent 20s interval.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {packets/sec} | Gauge | Double |
| {packets/s} | Gauge | Double |
#### Attributes
Expand All @@ -735,7 +735,7 @@ As measured over the most recent 20s interval.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| By/sec | Sum | Int | Cumulative | false |
| By/s | Sum | Int | Cumulative | false |
#### Attributes
Expand Down Expand Up @@ -780,7 +780,7 @@ The vSAN IOPs of a virtual machine.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {operations/sec} | Gauge | Int |
| {operations/s} | Gauge | Int |
#### Attributes
Expand Down
30 changes: 15 additions & 15 deletions receiver/vcenterreceiver/internal/metadata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d25990b

Please sign in to comment.