Skip to content

Commit d331a39

Browse files
evan-bradleyshalper2
authored andcommitted
[receiver/hostmetrics] Add new process metrics (open-telemetry#12972)
Add the following process metrics: - `process.context_switches` - `process.open_file_descriptors` Co-authored-by: Evan Bradley <evan-bradley@users.noreply.github.com>
1 parent abf44c0 commit d331a39

File tree

7 files changed

+488
-92
lines changed

7 files changed

+488
-92
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: enhancement
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
5+
component: hostmetricsreceiver
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Add new process metrics
9+
10+
# One or more tracking issues related to the change
11+
issues: [12482]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: Add `process.context_switches` and `process.open_file_descriptors` as process metrics. They are disabled by default.

receiver/hostmetricsreceiver/internal/scraper/processscraper/documentation.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ These are the metrics available for this scraper.
88

99
| Name | Description | Unit | Type | Attributes |
1010
| ---- | ----------- | ---- | ---- | ---------- |
11+
| process.context_switches | Number of times the process has been context switched. | {count} | Sum(Int) | <ul> <li>context_switch_type</li> </ul> |
1112
| **process.cpu.time** | Total CPU seconds broken down by different states. | s | Sum(Double) | <ul> <li>state</li> </ul> |
1213
| **process.disk.io** | Disk bytes transferred. | By | Sum(Int) | <ul> <li>direction</li> </ul> |
13-
| **process.memory.physical_usage** | The amount of physical memory in use. | By | Sum(Int) | <ul> </ul> |
14+
| **process.memory.physical_usage** | The amount of physical memory in use | By | Sum(Int) | <ul> </ul> |
1415
| **process.memory.virtual_usage** | Virtual memory size. | By | Sum(Int) | <ul> </ul> |
15-
| process.paging.faults | Number of page faults the process has made. This metric is only available on Linux. | {faults} | Sum(Int) | <ul> <li>type</li> </ul> |
16+
| process.open_file_descriptors | Number of file descriptors in use by the process. | {count} | Sum(Int) | <ul> </ul> |
17+
| process.paging.faults | Number of page faults the process has made. This metric is only available on Linux. | {faults} | Sum(Int) | <ul> <li>paging_fault_type</li> </ul> |
1618
| process.threads | Process threads count. | {threads} | Sum(Int) | <ul> </ul> |
1719

1820
**Highlighted metrics** are emitted by default. Other metrics are optional and not emitted by default.
@@ -40,6 +42,7 @@ metrics:
4042
4143
| Name | Description | Values |
4244
| ---- | ----------- | ------ |
45+
| context_switch_type (type) | Type of context switched. | involuntary, voluntary |
4346
| direction | Direction of flow of bytes (read or write). | read, write |
47+
| paging_fault_type (type) | Type of memory paging fault. | major, minor |
4448
| state | Breakdown of CPU usage by type. | system, user, wait |
45-
| type | Type of memory paging fault. | major, minor |

receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/generated_metrics.go

+178-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)