Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: Update process.executable.build_id.htlhash description to be generic

# 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: [3563]

# (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:
28 changes: 21 additions & 7 deletions docs/registry/attributes/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ An operating system process.
| <a id="process-environment-variable" href="#process-environment-variable">`process.environment_variable.<key>`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Process environment variables, `<key>` being the environment variable name, the value being the environment variable value. [2] | `ubuntu`; `/usr/local/bin:/usr/bin` |
| <a id="process-executable-build-id-gnu" href="#process-executable-build-id-gnu">`process.executable.build_id.gnu`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). | `c89b11207f6479603b0d49bf291c092c2b719293` |
| <a id="process-executable-build-id-go" href="#process-executable-build-id-go">`process.executable.build_id.go`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The Go build ID as retrieved by `go tool buildid <go executable>`. | `foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY` |
| <a id="process-executable-build-id-htlhash" href="#process-executable-build-id-htlhash">`process.executable.build_id.htlhash`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Profiling specific build ID for executables. See the OTel specification for Profiles for more information. | `600DCAFE4A110000F2BF38C493F5FB92` |
| <a id="process-executable-build-id-htlhash" href="#process-executable-build-id-htlhash">`process.executable.build_id.htlhash`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Deterministic build ID for executables. [3] | `600DCAFE4A110000F2BF38C493F5FB92` |
| <a id="process-executable-name" href="#process-executable-name">`process.executable.name`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. | `otelcol` |
| <a id="process-executable-path" href="#process-executable-path">`process.executable.path`</a> | ![Development](https://img.shields.io/badge/-development-blue) | 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` |
| <a id="process-exit-code" href="#process-exit-code">`process.exit.code`</a> | ![Development](https://img.shields.io/badge/-development-blue) | int | The exit code of the process. | `127` |
Expand All @@ -43,10 +43,10 @@ An operating system process.
| <a id="process-saved-user-name" href="#process-saved-user-name">`process.saved_user.name`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The username of the saved user. | `operator` |
| <a id="process-session-leader-pid" href="#process-session-leader-pid">`process.session_leader.pid`</a> | ![Development](https://img.shields.io/badge/-development-blue) | int | The PID of the process's session leader. This is also the session ID (SID) of the process. | `14` |
| <a id="process-state" href="#process-state">`process.state`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) | `running` |
| <a id="process-title" href="#process-title">`process.title`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Process title (proctitle) [3] | `cat /etc/hostname`; `xfce4-session`; `bash` |
| <a id="process-title" href="#process-title">`process.title`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Process title (proctitle) [4] | `cat /etc/hostname`; `xfce4-session`; `bash` |
| <a id="process-user-id" href="#process-user-id">`process.user.id`</a> | ![Development](https://img.shields.io/badge/-development-blue) | int | The effective user ID (EUID) of the process. | `1001` |
| <a id="process-user-name" href="#process-user-name">`process.user.name`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The username of the effective user of the process. | `root` |
| <a id="process-vpid" href="#process-vpid">`process.vpid`</a> | ![Development](https://img.shields.io/badge/-development-blue) | int | Virtual process identifier. [4] | `12` |
| <a id="process-vpid" href="#process-vpid">`process.vpid`</a> | ![Development](https://img.shields.io/badge/-development-blue) | int | Virtual process identifier. [5] | `12` |
| <a id="process-working-directory" href="#process-working-directory">`process.working_directory`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The working directory of the process. | `/root` |

**[1] `process.args_count`:** This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.
Expand All @@ -60,9 +60,23 @@ as the `process.environment_variable.USER` attribute with value `"ubuntu"`.
SHOULD be recorded as the `process.environment_variable.PATH` attribute
with value `"/usr/local/bin:/usr/bin"`.

**[3] `process.title`:** In many Unix-like systems, process title (proctitle), is the string that represents the name or command line of a running process, displayed by system monitoring tools like ps, top, and htop.
**[3] `process.executable.build_id.htlhash`:** GNU and Go build IDs may be stripped or unavailable in some environments
(e.g., Alpine Linux, Docker images). This attribute provides a deterministic
build ID computed by hashing the first and last 4096 bytes of the file
along with its length:

**[4] `process.vpid`:** 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.
```
Input ← Concat(File[:4096], File[-4096:], BigEndianUInt64(Len(File)))
Digest ← SHA256(Input)
BuildID ← Digest[:16]
```

The result is the first 16 bytes (128 bits) of the SHA256 digest,
represented as a hex string.

**[4] `process.title`:** In many Unix-like systems, process title (proctitle), is the string that represents the name or command line of a running process, displayed by system monitoring tools like ps, top, and htop.

**[5] `process.vpid`:** 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.

---

Expand Down Expand Up @@ -92,9 +106,9 @@ Describes Linux Process attributes

| Key | Stability | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- |
| <a id="process-linux-cgroup" href="#process-linux-cgroup">`process.linux.cgroup`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The control group associated with the process. [5] | `1:name=systemd:/user.slice/user-1000.slice/session-3.scope`; `0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope` |
| <a id="process-linux-cgroup" href="#process-linux-cgroup">`process.linux.cgroup`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The control group associated with the process. [6] | `1:name=systemd:/user.slice/user-1000.slice/session-3.scope`; `0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope` |

**[5] `process.linux.cgroup`:** Control groups (cgroups) are a kernel feature used to organize and manage process resources. This attribute provides the path(s) to the cgroup(s) associated with the process, which should match the contents of the [/proc/\[PID\]/cgroup](https://man7.org/linux/man-pages/man7/cgroups.7.html) file.
**[6] `process.linux.cgroup`:** Control groups (cgroups) are a kernel feature used to organize and manage process resources. This attribute provides the path(s) to the cgroup(s) associated with the process, which should match the contents of the [/proc/\[PID\]/cgroup](https://man7.org/linux/man-pages/man7/cgroups.7.html) file.

## Deprecated Process Attributes

Expand Down
17 changes: 15 additions & 2 deletions model/process/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,21 @@ groups:
stability: development
type: string
brief: >
Profiling specific build ID for executables. See the OTel specification
for Profiles for more information.
Deterministic build ID for executables.
note: |
GNU and Go build IDs may be stripped or unavailable in some environments
(e.g., Alpine Linux, Docker images). This attribute provides a deterministic
build ID computed by hashing the first and last 4096 bytes of the file
along with its length:

```
Input ← Concat(File[:4096], File[-4096:], BigEndianUInt64(Len(File)))
Digest ← SHA256(Input)
BuildID ← Digest[:16]
```

The result is the first 16 bytes (128 bits) of the SHA256 digest,
represented as a hex string.
examples: ['600DCAFE4A110000F2BF38C493F5FB92']
- id: process.executable.name
type: string
Expand Down
Loading