Skip to content

Commit b9268b7

Browse files
povilasvJaredTan95
authored andcommitted
[k8sclusterreceiver] change resourcequota and clusterquota units (open-telemetry#27662)
change resourcequota and clusterquota metrics to use {resource} units. **Link to tracking Issue:** open-telemetry#10553
1 parent e609f9b commit b9268b7

File tree

7 files changed

+57
-30
lines changed

7 files changed

+57
-30
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: k8sclusterreceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Change clusterquota and resourcequota metrics to use {resource} unit"
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [10553]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

receiver/k8sclusterreceiver/documentation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ The upper limit for a particular resource in a specific namespace. Will only be
274274
275275
| Unit | Metric Type | Value Type |
276276
| ---- | ----------- | ---------- |
277-
| 1 | Gauge | Int |
277+
| {resource} | Gauge | Int |
278278
279279
#### Attributes
280280
@@ -288,7 +288,7 @@ The usage for a particular resource in a specific namespace. Will only be sent i
288288
289289
| Unit | Metric Type | Value Type |
290290
| ---- | ----------- | ---------- |
291-
| 1 | Gauge | Int |
291+
| {resource} | Gauge | Int |
292292
293293
#### Attributes
294294
@@ -334,7 +334,7 @@ The upper limit for a particular resource in a specific namespace.
334334

335335
| Unit | Metric Type | Value Type |
336336
| ---- | ----------- | ---------- |
337-
| 1 | Gauge | Int |
337+
| {resource} | Gauge | Int |
338338

339339
#### Attributes
340340

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

350350
| Unit | Metric Type | Value Type |
351351
| ---- | ----------- | ---------- |
352-
| 1 | Gauge | Int |
352+
| {resource} | Gauge | Int |
353353

354354
#### Attributes
355355

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

365365
| Unit | Metric Type | Value Type |
366366
| ---- | ----------- | ---------- |
367-
| 1 | Gauge | Int |
367+
| {resource} | Gauge | Int |
368368

369369
#### Attributes
370370

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

379379
| Unit | Metric Type | Value Type |
380380
| ---- | ----------- | ---------- |
381-
| 1 | Gauge | Int |
381+
| {resource} | Gauge | Int |
382382

383383
#### Attributes
384384

receiver/k8sclusterreceiver/internal/clusterresourcequota/testdata/expected.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resourceMetrics:
1919
value:
2020
stringValue: requests.cpu
2121
name: openshift.clusterquota.limit
22-
unit: "1"
22+
unit: "{resource}"
2323
- description: The usage for a particular resource with a configured limit.
2424
gauge:
2525
dataPoints:
@@ -29,7 +29,7 @@ resourceMetrics:
2929
value:
3030
stringValue: requests.cpu
3131
name: openshift.clusterquota.used
32-
unit: "1"
32+
unit: "{resource}"
3333
- description: The upper limit for a particular resource in a specific namespace.
3434
gauge:
3535
dataPoints:
@@ -50,7 +50,7 @@ resourceMetrics:
5050
value:
5151
stringValue: "ns2"
5252
name: openshift.appliedclusterquota.limit
53-
unit: "1"
53+
unit: "{resource}"
5454
- description: The usage for a particular resource in a specific namespace.
5555
gauge:
5656
dataPoints:
@@ -72,7 +72,7 @@ resourceMetrics:
7272
value:
7373
stringValue: "ns2"
7474
name: openshift.appliedclusterquota.used
75-
unit: "1"
75+
unit: "{resource}"
7676
scope:
7777
name: otelcol/k8sclusterreceiver
7878
version: latest

receiver/k8sclusterreceiver/internal/metadata/generated_metrics.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/k8sclusterreceiver/internal/metadata/generated_metrics_test.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/k8sclusterreceiver/internal/resourcequota/testdata/expected.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resourceMetrics:
2222
value:
2323
stringValue: requests.cpu
2424
name: k8s.resource_quota.hard_limit
25-
unit: "1"
25+
unit: "{resource}"
2626
- 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
2727
gauge:
2828
dataPoints:
@@ -32,7 +32,7 @@ resourceMetrics:
3232
value:
3333
stringValue: requests.cpu
3434
name: k8s.resource_quota.used
35-
unit: "1"
35+
unit: "{resource}"
3636
scope:
3737
name: otelcol/k8sclusterreceiver
3838
version: latest

receiver/k8sclusterreceiver/metadata.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,15 @@ metrics:
402402
k8s.resource_quota.hard_limit:
403403
enabled: true
404404
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
405-
unit: 1
405+
unit: "{resource}"
406406
gauge:
407407
value_type: int
408408
attributes:
409409
- resource
410410
k8s.resource_quota.used:
411411
enabled: true
412412
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
413-
unit: 1
413+
unit: "{resource}"
414414
gauge:
415415
value_type: int
416416
attributes:
@@ -447,23 +447,23 @@ metrics:
447447
openshift.clusterquota.limit:
448448
enabled: true
449449
description: The configured upper limit for a particular resource.
450-
unit: "1"
450+
unit: "{resource}"
451451
gauge:
452452
value_type: int
453453
attributes:
454454
- resource
455455
openshift.clusterquota.used:
456456
enabled: true
457457
description: The usage for a particular resource with a configured limit.
458-
unit: "1"
458+
unit: "{resource}"
459459
gauge:
460460
value_type: int
461461
attributes:
462462
- resource
463463
openshift.appliedclusterquota.limit:
464464
enabled: true
465465
description: The upper limit for a particular resource in a specific namespace.
466-
unit: "1"
466+
unit: "{resource}"
467467
gauge:
468468
value_type: int
469469
attributes:
@@ -472,7 +472,7 @@ metrics:
472472
openshift.appliedclusterquota.used:
473473
enabled: true
474474
description: The usage for a particular resource in a specific namespace.
475-
unit: "1"
475+
unit: "{resource}"
476476
gauge:
477477
value_type: int
478478
attributes:

0 commit comments

Comments
 (0)