Skip to content

Commit

Permalink
[receiver/hostmetrics] Add new process metrics (open-telemetry#12972)
Browse files Browse the repository at this point in the history
Add the following process metrics:
- `process.context_switches`
- `process.open_file_descriptors`

Co-authored-by: Evan Bradley <[email protected]>
  • Loading branch information
2 people authored and shalper2 committed Dec 6, 2022
1 parent abf44c0 commit d331a39
Show file tree
Hide file tree
Showing 7 changed files with 488 additions and 92 deletions.
16 changes: 16 additions & 0 deletions .chloggen/hostmetricsreceiver-new-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add new process metrics

# One or more tracking issues related to the change
issues: [12482]

# (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: Add `process.context_switches` and `process.open_file_descriptors` as process metrics. They are disabled by default.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ These are the metrics available for this scraper.

| Name | Description | Unit | Type | Attributes |
| ---- | ----------- | ---- | ---- | ---------- |
| process.context_switches | Number of times the process has been context switched. | {count} | Sum(Int) | <ul> <li>context_switch_type</li> </ul> |
| **process.cpu.time** | Total CPU seconds broken down by different states. | s | Sum(Double) | <ul> <li>state</li> </ul> |
| **process.disk.io** | Disk bytes transferred. | By | Sum(Int) | <ul> <li>direction</li> </ul> |
| **process.memory.physical_usage** | The amount of physical memory in use. | By | Sum(Int) | <ul> </ul> |
| **process.memory.physical_usage** | The amount of physical memory in use | By | Sum(Int) | <ul> </ul> |
| **process.memory.virtual_usage** | Virtual memory size. | By | Sum(Int) | <ul> </ul> |
| 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> |
| process.open_file_descriptors | Number of file descriptors in use by the process. | {count} | Sum(Int) | <ul> </ul> |
| 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> |
| process.threads | Process threads count. | {threads} | Sum(Int) | <ul> </ul> |

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

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

Loading

0 comments on commit d331a39

Please sign in to comment.