Skip to content

Commit

Permalink
Add additional fields to process attribute registry
Browse files Browse the repository at this point in the history
Add additional fields, based on the POSIX process model, to the process
attribute registry
  • Loading branch information
mjwolf committed Nov 21, 2023
1 parent 04c8e49 commit 4afb258
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 4 deletions.
12 changes: 11 additions & 1 deletion docs/attributes-registry/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,22 @@
| `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_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.effective_user.id` | int | The effective user ID (EUID) of the process. | `1001` |
| `process.end` | string | The time the process ended. | `2023-11-21T09:26:12.315Z` |
| `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.exit_code` | int | The exit code of the process. | `127` |
| `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. | `true` |
| `process.owner` | string | The username of the user that owns the process. | `root` |
| `process.parent_pid` | int | Parent Process identifier (PID). | `111` |
| `process.parent.pid` | int | Parent Process identifier (PID). | `111` |
| `process.pid` | int | Process identifier (PID). | `1234` |
| `process.real_user.id` | int | The real user ID (RUID) of the process. | `1000` |
| `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` |
| `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` |
| `process.runtime.version` | string | The version of the runtime of this process, as returned by the runtime without modification. | `14.0.2` |
| `process.saved_user.id` | int | The saved user ID (SUID) of the process. | `1002` |
| `process.session_leader.pid` | int | The PID of the process's session leader. This is also the session ID (SID) of the process. | `14` |
| `process.start` | string | The time the process started. | `2023-11-21T09:25:34.853Z` |
| `process.vpid` | int | Virtual process identifier. The process PID 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. | `12` |
<!-- endsemconv -->
67 changes: 64 additions & 3 deletions model/registry/process.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,32 @@ groups:
brief: >
Process identifier (PID).
examples: [1234]
- id: parent_pid
- id: parent.pid
type: int
brief: >
Parent Process identifier (PID).
Parent Process identifier (PPID).
examples: [111]
- id: vpid
type: int
brief: >
Virtual process identifier.
note: >
The process PID 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
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
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
brief: >
Expand Down Expand Up @@ -57,7 +78,27 @@ groups:
type: string
brief: >
The username of the user that owns the process.
examples: 'root'
note: >
This is intended to be used with Windows only. On POSIX systems, processes
can have multiple owners (effective, real and saved). To avoid confusion
about which owner is being referenced, this field should not be used with
POSIX systems.
examples: ['root']
- id: real_user.id
type: int
brief: >
The real user ID (RUID) of the process.
examples: [1000]
- id: effective_user.id
type: int
brief: >
The effective user ID (EUID) of the process.
examples: [1001]
- id: saved_user.id
type: int
brief: >
The saved user ID (SUID) of the process.
examples: [1002]
- id: runtime.name
type: string
brief: >
Expand All @@ -76,3 +117,23 @@ 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: start
type: string
brief: >
The time the process started.
examples: ['2023-11-21T09:25:34.853Z']
- id: end
type: string
brief: >
The time the process ended.
examples: ['2023-11-21T09:26:12.315Z']
- id: exit_code
type: int
brief: >
The exit code of the process.
examples: [127]
- id: interactive
type: boolean
brief: >
Whether the process is connected to an interactive shell.
examples: [true]

0 comments on commit 4afb258

Please sign in to comment.