Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add process.parent_pid attribute #2691

Merged
merged 7 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ release.
([#2650](https://github.com/open-telemetry/opentelemetry-specification/pull/2650)).
- Improve the definition of `state` attribute for metric `system.network.connections`
([#2663](https://github.com/open-telemetry/opentelemetry-specification/pull/2663))
- Add `process.parent_pid` attribute for use in reporting parent process id (PID)
([#2691](https://github.com/open-telemetry/opentelemetry-specification/pull/2691)).

### Compatibility

Expand Down
5 changes: 5 additions & 0 deletions semantic_conventions/resource/process.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ groups:
brief: >
Process identifier (PID).
examples: [1234]
- id: parent_pid
type: int
brief: >
Parent Process identifier (PID).
examples: [111]
- id: executable.name
type: string
requirement_level:
Expand Down
1 change: 1 addition & 0 deletions specification/resource/semantic_conventions/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `process.pid` | int | Process identifier (PID). | `1234` | Recommended |
| `process.parent_pid` | int | Parent Process identifier (PID). | `111` | Recommended |
davidmirza408 marked this conversation as resolved.
Show resolved Hide resolved
| `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` | Conditionally Required: See alternative attributes below. |
| `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` | Conditionally Required: See alternative attributes below. |
| `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` | Conditionally Required: See alternative attributes below. |
Expand Down