Skip to content

Commit

Permalink
Add additional process attributes to registry (#564)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandra Konrad <10500694+trisch-me@users.noreply.github.com>
  • Loading branch information
mjwolf and trisch-me committed Apr 9, 2024
1 parent f731ca7 commit c9b8445
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .chloggen/564.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: process

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

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [564]

# (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:
15 changes: 15 additions & 0 deletions docs/attributes-registry/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,27 @@
| `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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `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]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `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"` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.creation.time` | string | The date and time the process was created, in ISO 8601 format. | `2023-11-21T09:25:34.853Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.exit.code` | int | The exit code of the process. | `127` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.exit.time` | string | The date and time the process exited, in ISO 8601 format. | `2023-11-21T09:26:12.315Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.interactive` | boolean | Whether the process is connected to an interactive shell. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.owner` | string | The username of the user that owns the process. | `root` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.parent_pid` | int | Parent Process identifier (PPID). | `111` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.pid` | int | Process identifier (PID). | `1234` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.real_user.id` | int | The real user ID (RUID) of the process. | `1000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.real_user.name` | string | The username of the real user of the process. | `operator` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.runtime.description` | string | An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. | `Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.runtime.name` | string | The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. | `OpenJDK Runtime Environment` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.runtime.version` | string | The version of the runtime of this process, as returned by the runtime without modification. | `14.0.2` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.saved_user.id` | int | The saved user ID (SUID) of the process. | `1002` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.saved_user.name` | string | The username of the saved user. | `operator` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.session_leader.pid` | int | The PID of the process's session leader. This is also the session ID (SID) of the process. | `14` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.user.id` | int | The effective user ID (EUID) of the process. | `1001` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.user.name` | string | The username of the effective user of the process. | `root` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.vpid` | int | Virtual process identifier. [1] | `12` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[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.
<!-- endsemconv -->
85 changes: 84 additions & 1 deletion model/registry/process.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,30 @@ groups:
brief: >
Parent Process identifier (PPID).
examples: [111]
- id: vpid
type: int
stability: experimental
brief: >
Virtual process identifier.
note: >
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.
examples: [12]
- id: session_leader.pid
type: int
stability: experimental
brief: >
The PID of the process's session leader. This is also the session ID
(SID) of the process.
examples: [14]
- id: group_leader.pid
type: int
stability: experimental
brief: >
The PID of the process's group leader. This is also the process group
ID (PGID) of the process.
examples: [23]
- id: executable.name
type: string
stability: experimental
Expand Down Expand Up @@ -65,7 +89,43 @@ groups:
stability: experimental
brief: >
The username of the user that owns the process.
examples: 'root'
examples: ['root']
- id: user.id
type: int
stability: experimental
brief: >
The effective user ID (EUID) of the process.
examples: [1001]
- id: user.name
type: string
stability: experimental
brief: >
The username of the effective user of the process.
examples: ['root']
- id: real_user.id
type: int
stability: experimental
brief: >
The real user ID (RUID) of the process.
examples: [1000]
- id: real_user.name
type: string
stability: experimental
brief: >
The username of the real user of the process.
examples: ['operator']
- id: saved_user.id
type: int
stability: experimental
brief: >
The saved user ID (SUID) of the process.
examples: [1002]
- id: saved_user.name
type: string
stability: experimental
brief: >
The username of the saved user.
examples: ['operator']
- id: runtime.name
type: string
stability: experimental
Expand All @@ -87,3 +147,26 @@ groups:
An additional description about the runtime of the process, for example
a specific vendor customization of the runtime environment.
examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
- id: creation.time
type: string
stability: experimental
brief: >
The date and time the process was created, in ISO 8601 format.
examples: ['2023-11-21T09:25:34.853Z']
- id: exit.time
type: string
stability: experimental
brief: >
The date and time the process exited, in ISO 8601 format.
examples: ['2023-11-21T09:26:12.315Z']
- id: exit.code
type: int
stability: experimental
brief: >
The exit code of the process.
examples: [127]
- id: interactive
type: boolean
stability: experimental
brief: >
Whether the process is connected to an interactive shell.

0 comments on commit c9b8445

Please sign in to comment.