Skip to content

Commit

Permalink
[k8sclusterreceiver] change resourcequota and clusterquota units (ope…
Browse files Browse the repository at this point in the history
…n-telemetry#27662)

change resourcequota and clusterquota metrics to use {resource} units.

**Link to tracking Issue:** open-telemetry#10553
  • Loading branch information
povilasv authored and JaredTan95 committed Oct 18, 2023
1 parent e609f9b commit b9268b7
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 30 deletions.
27 changes: 27 additions & 0 deletions .chloggen/k8sclusterreceiver-change-units.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: k8sclusterreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Change clusterquota and resourcequota metrics to use {resource} unit"

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

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

# 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: []
12 changes: 6 additions & 6 deletions receiver/k8sclusterreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ The upper limit for a particular resource in a specific namespace. Will only be
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| {resource} | Gauge | Int |
#### Attributes
Expand All @@ -288,7 +288,7 @@ The usage for a particular resource in a specific namespace. Will only be sent i
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| {resource} | Gauge | Int |
#### Attributes
Expand Down Expand Up @@ -334,7 +334,7 @@ The upper limit for a particular resource in a specific namespace.

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| {resource} | Gauge | Int |

#### Attributes

Expand All @@ -349,7 +349,7 @@ The usage for a particular resource in a specific namespace.

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| {resource} | Gauge | Int |

#### Attributes

Expand All @@ -364,7 +364,7 @@ The configured upper limit for a particular resource.

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| {resource} | Gauge | Int |

#### Attributes

Expand All @@ -378,7 +378,7 @@ The usage for a particular resource with a configured limit.

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| {resource} | Gauge | Int |

#### Attributes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resourceMetrics:
value:
stringValue: requests.cpu
name: openshift.clusterquota.limit
unit: "1"
unit: "{resource}"
- description: The usage for a particular resource with a configured limit.
gauge:
dataPoints:
Expand All @@ -29,7 +29,7 @@ resourceMetrics:
value:
stringValue: requests.cpu
name: openshift.clusterquota.used
unit: "1"
unit: "{resource}"
- description: The upper limit for a particular resource in a specific namespace.
gauge:
dataPoints:
Expand All @@ -50,7 +50,7 @@ resourceMetrics:
value:
stringValue: "ns2"
name: openshift.appliedclusterquota.limit
unit: "1"
unit: "{resource}"
- description: The usage for a particular resource in a specific namespace.
gauge:
dataPoints:
Expand All @@ -72,7 +72,7 @@ resourceMetrics:
value:
stringValue: "ns2"
name: openshift.appliedclusterquota.used
unit: "1"
unit: "{resource}"
scope:
name: otelcol/k8sclusterreceiver
version: latest

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resourceMetrics:
value:
stringValue: requests.cpu
name: k8s.resource_quota.hard_limit
unit: "1"
unit: "{resource}"
- description: The usage for a particular resource in a specific namespace. Will only be sent if a quota is specified. CPU requests/limits will be sent as millicores
gauge:
dataPoints:
Expand All @@ -32,7 +32,7 @@ resourceMetrics:
value:
stringValue: requests.cpu
name: k8s.resource_quota.used
unit: "1"
unit: "{resource}"
scope:
name: otelcol/k8sclusterreceiver
version: latest
12 changes: 6 additions & 6 deletions receiver/k8sclusterreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,15 @@ metrics:
k8s.resource_quota.hard_limit:
enabled: true
description: The upper limit for a particular resource in a specific namespace. Will only be sent if a quota is specified. CPU requests/limits will be sent as millicores
unit: 1
unit: "{resource}"
gauge:
value_type: int
attributes:
- resource
k8s.resource_quota.used:
enabled: true
description: The usage for a particular resource in a specific namespace. Will only be sent if a quota is specified. CPU requests/limits will be sent as millicores
unit: 1
unit: "{resource}"
gauge:
value_type: int
attributes:
Expand Down Expand Up @@ -447,23 +447,23 @@ metrics:
openshift.clusterquota.limit:
enabled: true
description: The configured upper limit for a particular resource.
unit: "1"
unit: "{resource}"
gauge:
value_type: int
attributes:
- resource
openshift.clusterquota.used:
enabled: true
description: The usage for a particular resource with a configured limit.
unit: "1"
unit: "{resource}"
gauge:
value_type: int
attributes:
- resource
openshift.appliedclusterquota.limit:
enabled: true
description: The upper limit for a particular resource in a specific namespace.
unit: "1"
unit: "{resource}"
gauge:
value_type: int
attributes:
Expand All @@ -472,7 +472,7 @@ metrics:
openshift.appliedclusterquota.used:
enabled: true
description: The usage for a particular resource in a specific namespace.
unit: "1"
unit: "{resource}"
gauge:
value_type: int
attributes:
Expand Down

0 comments on commit b9268b7

Please sign in to comment.