Skip to content

Commit b3cebce

Browse files
authored
[receiver/hostmetrics] Enable re-aggregation for process scraper (#46752)
### Description Enable the re-aggregation feature for the `process` scraper within the `hostmetrics` receiver. **Changes made:** - Added `reaggregation_enabled: true` to `metadata.yaml` for the process scraper - Added `requirement_level: recommended` to all metric attributes (`context_switch_type`, `direction`, `paging_fault_type`, `state`) - Ran `make generate` to update the generated metrics and configuration files ### Link to tracking issues Resolves #46623 Part of #46386 ### Testing - Ran `make generate` successfully - Ran `make fmt` and `make lint` in the receiver module - Executed `go test ./...` in the `processscraper` and parent `hostmetricsreceiver` directories (all passed)
1 parent a914ed7 commit b3cebce

File tree

9 files changed

+1325
-253
lines changed

9 files changed

+1325
-253
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
change_type: enhancement
2+
component: receiver/hostmetrics
3+
note: Enable re-aggregation for process scraper
4+
issues: [46623]
5+
subtext: Enabled the reaggregation feature gate for the process scraper and set all metric attributes (context_switch_type, direction, paging_fault_type, state) with requirement_level recommended.

receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/config.schema.yaml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,114 @@ $defs:
1111
enabled:
1212
type: boolean
1313
default: false
14+
aggregation_strategy:
15+
type: string
16+
enum:
17+
- "sum"
18+
- "avg"
19+
- "min"
20+
- "max"
21+
default: "sum"
22+
attributes:
23+
type: array
24+
items:
25+
type: string
26+
enum:
27+
- "type"
28+
default:
29+
- "type"
1430
process.cpu.time:
1531
description: "ProcessCPUTimeMetricConfig provides config for the process.cpu.time metric."
1632
type: object
1733
properties:
1834
enabled:
1935
type: boolean
2036
default: true
37+
aggregation_strategy:
38+
type: string
39+
enum:
40+
- "sum"
41+
- "avg"
42+
- "min"
43+
- "max"
44+
default: "sum"
45+
attributes:
46+
type: array
47+
items:
48+
type: string
49+
enum:
50+
- "state"
51+
default:
52+
- "state"
2153
process.cpu.utilization:
2254
description: "ProcessCPUUtilizationMetricConfig provides config for the process.cpu.utilization metric."
2355
type: object
2456
properties:
2557
enabled:
2658
type: boolean
2759
default: false
60+
aggregation_strategy:
61+
type: string
62+
enum:
63+
- "sum"
64+
- "avg"
65+
- "min"
66+
- "max"
67+
default: "avg"
68+
attributes:
69+
type: array
70+
items:
71+
type: string
72+
enum:
73+
- "state"
74+
default:
75+
- "state"
2876
process.disk.io:
2977
description: "ProcessDiskIoMetricConfig provides config for the process.disk.io metric."
3078
type: object
3179
properties:
3280
enabled:
3381
type: boolean
3482
default: true
83+
aggregation_strategy:
84+
type: string
85+
enum:
86+
- "sum"
87+
- "avg"
88+
- "min"
89+
- "max"
90+
default: "sum"
91+
attributes:
92+
type: array
93+
items:
94+
type: string
95+
enum:
96+
- "direction"
97+
default:
98+
- "direction"
3599
process.disk.operations:
36100
description: "ProcessDiskOperationsMetricConfig provides config for the process.disk.operations metric."
37101
type: object
38102
properties:
39103
enabled:
40104
type: boolean
41105
default: false
106+
aggregation_strategy:
107+
type: string
108+
enum:
109+
- "sum"
110+
- "avg"
111+
- "min"
112+
- "max"
113+
default: "sum"
114+
attributes:
115+
type: array
116+
items:
117+
type: string
118+
enum:
119+
- "direction"
120+
default:
121+
- "direction"
42122
process.handles:
43123
description: "ProcessHandlesMetricConfig provides config for the process.handles metric."
44124
type: object
@@ -81,6 +161,22 @@ $defs:
81161
enabled:
82162
type: boolean
83163
default: false
164+
aggregation_strategy:
165+
type: string
166+
enum:
167+
- "sum"
168+
- "avg"
169+
- "min"
170+
- "max"
171+
default: "sum"
172+
attributes:
173+
type: array
174+
items:
175+
type: string
176+
enum:
177+
- "type"
178+
default:
179+
- "type"
84180
process.signals_pending:
85181
description: "ProcessSignalsPendingMetricConfig provides config for the process.signals_pending metric."
86182
type: object

0 commit comments

Comments
 (0)