[chore] move process metrics to the registry (#988)
This commit is contained in:
parent
db1a97b0ad
commit
e979d416cd
|
|
@ -6,6 +6,9 @@
|
||||||
|
|
||||||
# Process
|
# Process
|
||||||
|
|
||||||
|
- [Process](#process-attributes)
|
||||||
|
- [Process Cpu](#process-cpu-attributes)
|
||||||
|
|
||||||
## Process Attributes
|
## Process Attributes
|
||||||
|
|
||||||
An operating system process.
|
An operating system process.
|
||||||
|
|
@ -15,6 +18,7 @@ An operating system process.
|
||||||
| `process.command` | string | The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. | `cmd/otelcol` |  |
|
| `process.command` | string | The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. | `cmd/otelcol` |  |
|
||||||
| `process.command_args` | string[] | All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. | `cmd/otecol`; `--config=config.yaml` |  |
|
| `process.command_args` | string[] | All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. | `cmd/otecol`; `--config=config.yaml` |  |
|
||||||
| `process.command_line` | string | The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` |  |
|
| `process.command_line` | string | The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` |  |
|
||||||
|
| `process.context_switch_type` | string | Specifies whether the context switches for this data point were voluntary or involuntary. | `voluntary`; `involuntary` |  |
|
||||||
| `process.creation.time` | string | The date and time the process was created, in ISO 8601 format. | `2023-11-21T09:25:34.853Z` |  |
|
| `process.creation.time` | string | The date and time the process was created, in ISO 8601 format. | `2023-11-21T09:25:34.853Z` |  |
|
||||||
| `process.executable.name` | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` |  |
|
| `process.executable.name` | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` |  |
|
||||||
| `process.executable.path` | string | The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` |  |
|
| `process.executable.path` | string | The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` |  |
|
||||||
|
|
@ -23,6 +27,7 @@ An operating system process.
|
||||||
| `process.group_leader.pid` | int | The PID of the process's group leader. This is also the process group ID (PGID) of the process. | `23` |  |
|
| `process.group_leader.pid` | int | The PID of the process's group leader. This is also the process group ID (PGID) of the process. | `23` |  |
|
||||||
| `process.interactive` | boolean | Whether the process is connected to an interactive shell. | |  |
|
| `process.interactive` | boolean | Whether the process is connected to an interactive shell. | |  |
|
||||||
| `process.owner` | string | The username of the user that owns the process. | `root` |  |
|
| `process.owner` | string | The username of the user that owns the process. | `root` |  |
|
||||||
|
| `process.paging.fault_type` | string | The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. | `major`; `minor` |  |
|
||||||
| `process.parent_pid` | int | Parent Process identifier (PPID). | `111` |  |
|
| `process.parent_pid` | int | Parent Process identifier (PPID). | `111` |  |
|
||||||
| `process.pid` | int | Process identifier (PID). | `1234` |  |
|
| `process.pid` | int | Process identifier (PID). | `1234` |  |
|
||||||
| `process.real_user.id` | int | The real user ID (RUID) of the process. | `1000` |  |
|
| `process.real_user.id` | int | The real user ID (RUID) of the process. | `1000` |  |
|
||||||
|
|
@ -38,3 +43,33 @@ An operating system process.
|
||||||
| `process.vpid` | int | Virtual process identifier. [1] | `12` |  |
|
| `process.vpid` | int | Virtual process identifier. [1] | `12` |  |
|
||||||
|
|
||||||
**[1]:** The process ID within a PID namespace. This is not necessarily unique across all processes on the host but it is unique within the process namespace that the process exists within.
|
**[1]:** The process ID within a PID namespace. This is not necessarily unique across all processes on the host but it is unique within the process namespace that the process exists within.
|
||||||
|
|
||||||
|
`process.context_switch_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||||
|
|
||||||
|
| Value | Description | Stability |
|
||||||
|
| ------------- | ----------- | ---------------------------------------------------------------- |
|
||||||
|
| `voluntary` | none |  |
|
||||||
|
| `involuntary` | none |  |
|
||||||
|
|
||||||
|
`process.paging.fault_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||||
|
|
||||||
|
| Value | Description | Stability |
|
||||||
|
| ------- | ----------- | ---------------------------------------------------------------- |
|
||||||
|
| `major` | none |  |
|
||||||
|
| `minor` | none |  |
|
||||||
|
|
||||||
|
## Process Cpu Attributes
|
||||||
|
|
||||||
|
Attributes for process CPU
|
||||||
|
|
||||||
|
| Attribute | Type | Description | Examples | Stability |
|
||||||
|
| ------------------- | ------ | ----------------------------- | ------------------------ | ---------------------------------------------------------------- |
|
||||||
|
| `process.cpu.state` | string | The CPU state of the process. | `system`; `user`; `wait` |  |
|
||||||
|
|
||||||
|
`process.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||||
|
|
||||||
|
| Value | Description | Stability |
|
||||||
|
| -------- | ----------- | ---------------------------------------------------------------- |
|
||||||
|
| `system` | none |  |
|
||||||
|
| `user` | none |  |
|
||||||
|
| `wait` | none |  |
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ This metric is [recommended][MetricRecommended].
|
||||||
<!-- semconv metric.process.cpu.time(full) -->
|
<!-- semconv metric.process.cpu.time(full) -->
|
||||||
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
||||||
|---|---|---|---|---|---|
|
|---|---|---|---|---|---|
|
||||||
| [`process.cpu.state`](/docs/attributes-registry/process.md) | string | The CPU state for this data point. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system`; `user`; `wait` | `Recommended` |  |
|
| [`process.cpu.state`](/docs/attributes-registry/process.md) | string | A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system`; `user`; `wait` | `Recommended` |  |
|
||||||
|
|
||||||
`process.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
`process.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||||
|
|
||||||
|
|
@ -82,7 +82,7 @@ This metric is [recommended][MetricRecommended].
|
||||||
<!-- semconv metric.process.cpu.utilization(full) -->
|
<!-- semconv metric.process.cpu.utilization(full) -->
|
||||||
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
||||||
|---|---|---|---|---|---|
|
|---|---|---|---|---|---|
|
||||||
| [`process.cpu.state`](/docs/attributes-registry/process.md) | string | The CPU state for this data point. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system`; `user`; `wait` | `Recommended` |  |
|
| [`process.cpu.state`](/docs/attributes-registry/process.md) | string | A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system`; `user`; `wait` | `Recommended` |  |
|
||||||
|
|
||||||
`process.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
`process.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,4 @@
|
||||||
groups:
|
groups:
|
||||||
- id: attributes.process.cpu
|
|
||||||
prefix: process.cpu
|
|
||||||
type: attribute_group
|
|
||||||
brief: "Attributes for process CPU metrics."
|
|
||||||
attributes:
|
|
||||||
- id: state
|
|
||||||
brief: "The CPU state for this data point. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels."
|
|
||||||
type:
|
|
||||||
allow_custom_values: true
|
|
||||||
members:
|
|
||||||
- id: system
|
|
||||||
value: 'system'
|
|
||||||
stability: experimental
|
|
||||||
- id: user
|
|
||||||
value: 'user'
|
|
||||||
stability: experimental
|
|
||||||
- id: wait
|
|
||||||
value: 'wait'
|
|
||||||
stability: experimental
|
|
||||||
stability: experimental
|
|
||||||
- id: metric.process.cpu.time
|
- id: metric.process.cpu.time
|
||||||
type: metric
|
type: metric
|
||||||
metric_name: process.cpu.time
|
metric_name: process.cpu.time
|
||||||
|
|
@ -28,16 +8,24 @@ groups:
|
||||||
unit: "s"
|
unit: "s"
|
||||||
attributes:
|
attributes:
|
||||||
- ref: process.cpu.state
|
- ref: process.cpu.state
|
||||||
|
brief: >
|
||||||
|
A process SHOULD be characterized _either_ by data points with no `state`
|
||||||
|
labels, _or only_ data points with `state` labels.
|
||||||
|
|
||||||
- id: metric.process.cpu.utilization
|
- id: metric.process.cpu.utilization
|
||||||
type: metric
|
type: metric
|
||||||
metric_name: process.cpu.utilization
|
metric_name: process.cpu.utilization
|
||||||
stability: experimental
|
stability: experimental
|
||||||
brief: "Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process."
|
brief:
|
||||||
|
Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs
|
||||||
|
available to the process.
|
||||||
instrument: gauge
|
instrument: gauge
|
||||||
unit: "1"
|
unit: "1"
|
||||||
attributes:
|
attributes:
|
||||||
- ref: process.cpu.state
|
- ref: process.cpu.state
|
||||||
|
brief: >
|
||||||
|
A process SHOULD be characterized _either_ by data points with no `state`
|
||||||
|
labels, _or only_ data points with `state` labels.
|
||||||
|
|
||||||
- id: metric.process.memory.usage
|
- id: metric.process.memory.usage
|
||||||
type: metric
|
type: metric
|
||||||
|
|
@ -102,18 +90,7 @@ groups:
|
||||||
instrument: counter
|
instrument: counter
|
||||||
unit: "{count}"
|
unit: "{count}"
|
||||||
attributes:
|
attributes:
|
||||||
- id: process.context_switch_type
|
- ref: process.context_switch_type
|
||||||
brief: "Specifies whether the context switches for this data point were voluntary or involuntary."
|
|
||||||
type:
|
|
||||||
allow_custom_values: true
|
|
||||||
members:
|
|
||||||
- id: voluntary
|
|
||||||
value: 'voluntary'
|
|
||||||
stability: experimental
|
|
||||||
- id: involuntary
|
|
||||||
value: 'involuntary'
|
|
||||||
stability: experimental
|
|
||||||
stability: experimental
|
|
||||||
- id: metric.process.paging.faults
|
- id: metric.process.paging.faults
|
||||||
type: metric
|
type: metric
|
||||||
metric_name: process.paging.faults
|
metric_name: process.paging.faults
|
||||||
|
|
@ -122,15 +99,4 @@ groups:
|
||||||
instrument: counter
|
instrument: counter
|
||||||
unit: "{fault}"
|
unit: "{fault}"
|
||||||
attributes:
|
attributes:
|
||||||
- id: process.paging.fault_type
|
- ref: process.paging.fault_type
|
||||||
brief: "The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults."
|
|
||||||
type:
|
|
||||||
allow_custom_values: true
|
|
||||||
members:
|
|
||||||
- id: major
|
|
||||||
value: 'major'
|
|
||||||
stability: experimental
|
|
||||||
- id: minor
|
|
||||||
value: 'minor'
|
|
||||||
stability: experimental
|
|
||||||
stability: experimental
|
|
||||||
|
|
|
||||||
|
|
@ -170,3 +170,52 @@ groups:
|
||||||
stability: experimental
|
stability: experimental
|
||||||
brief: >
|
brief: >
|
||||||
Whether the process is connected to an interactive shell.
|
Whether the process is connected to an interactive shell.
|
||||||
|
- id: context_switch_type
|
||||||
|
brief: "Specifies whether the context switches for this data point were voluntary or involuntary."
|
||||||
|
type:
|
||||||
|
allow_custom_values: true
|
||||||
|
members:
|
||||||
|
- id: voluntary
|
||||||
|
value: 'voluntary'
|
||||||
|
stability: experimental
|
||||||
|
- id: involuntary
|
||||||
|
value: 'involuntary'
|
||||||
|
stability: experimental
|
||||||
|
stability: experimental
|
||||||
|
- id: paging.fault_type
|
||||||
|
brief: >
|
||||||
|
The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor`
|
||||||
|
is for minor/soft page faults.
|
||||||
|
type:
|
||||||
|
allow_custom_values: true
|
||||||
|
members:
|
||||||
|
- id: major
|
||||||
|
value: 'major'
|
||||||
|
stability: experimental
|
||||||
|
- id: minor
|
||||||
|
value: 'minor'
|
||||||
|
stability: experimental
|
||||||
|
stability: experimental
|
||||||
|
|
||||||
|
- id: registry.process.cpu
|
||||||
|
prefix: process.cpu
|
||||||
|
type: attribute_group
|
||||||
|
brief: >
|
||||||
|
Attributes for process CPU
|
||||||
|
attributes:
|
||||||
|
- id: state
|
||||||
|
brief: >
|
||||||
|
The CPU state of the process.
|
||||||
|
type:
|
||||||
|
allow_custom_values: true
|
||||||
|
members:
|
||||||
|
- id: system
|
||||||
|
value: 'system'
|
||||||
|
stability: experimental
|
||||||
|
- id: user
|
||||||
|
value: 'user'
|
||||||
|
stability: experimental
|
||||||
|
- id: wait
|
||||||
|
value: 'wait'
|
||||||
|
stability: experimental
|
||||||
|
stability: experimental
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue