From 55bbb5bb9ccdd32656d7c283bf434769c115c92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDavid?= Date: Fri, 22 Jul 2022 15:12:15 -0700 Subject: [PATCH 1/6] add process.parent_pid attribute --- semantic_conventions/resource/process.yaml | 5 +++++ specification/resource/semantic_conventions/process.md | 1 + 2 files changed, 6 insertions(+) diff --git a/semantic_conventions/resource/process.yaml b/semantic_conventions/resource/process.yaml index f3040efb42a..8ef754b7fff 100644 --- a/semantic_conventions/resource/process.yaml +++ b/semantic_conventions/resource/process.yaml @@ -9,6 +9,11 @@ groups: brief: > Process identifier (PID). examples: [1234] + - id: parent_pid + type: int + brief: > + Parent Process identifier (PID). + examples: [1234] - id: executable.name type: string requirement_level: diff --git a/specification/resource/semantic_conventions/process.md b/specification/resource/semantic_conventions/process.md index dbfa1a7e38f..0f835ce0713 100644 --- a/specification/resource/semantic_conventions/process.md +++ b/specification/resource/semantic_conventions/process.md @@ -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). | `1234` | Recommended | | `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. | From 177e3c3e481e52b210fca31d7e45b8fb6ae1bf01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDavid?= Date: Fri, 22 Jul 2022 15:21:28 -0700 Subject: [PATCH 2/6] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b49b8972d0..bc3e9e1c2e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) + ([#2602](https://github.com/open-telemetry/opentelemetry-specification/pull/2691)). ### Compatibility From 2b087141f003503a5bc286b43c144ee733a1092d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDavid?= Date: Fri, 22 Jul 2022 15:22:57 -0700 Subject: [PATCH 3/6] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc3e9e1c2e8..c36531d0c22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,7 +60,7 @@ release. - 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) - ([#2602](https://github.com/open-telemetry/opentelemetry-specification/pull/2691)). + ([#2691](https://github.com/open-telemetry/opentelemetry-specification/pull/2691)). ### Compatibility From 51519af8e8582b26c30e4ca00de06e20f6c010e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDavid?= Date: Mon, 25 Jul 2022 10:18:15 -0700 Subject: [PATCH 4/6] update ppid example --- semantic_conventions/resource/process.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic_conventions/resource/process.yaml b/semantic_conventions/resource/process.yaml index 8ef754b7fff..aebaa1d612d 100644 --- a/semantic_conventions/resource/process.yaml +++ b/semantic_conventions/resource/process.yaml @@ -13,7 +13,7 @@ groups: type: int brief: > Parent Process identifier (PID). - examples: [1234] + examples: [5678] - id: executable.name type: string requirement_level: From 9752ee3ca9cc54bed7bb156f58c2cf4f3378d64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDavid?= Date: Mon, 25 Jul 2022 10:20:25 -0700 Subject: [PATCH 5/6] update process readme --- specification/resource/semantic_conventions/process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resource/semantic_conventions/process.md b/specification/resource/semantic_conventions/process.md index 0f835ce0713..9ea28216c03 100644 --- a/specification/resource/semantic_conventions/process.md +++ b/specification/resource/semantic_conventions/process.md @@ -28,7 +28,7 @@ | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `process.pid` | int | Process identifier (PID). | `1234` | Recommended | -| `process.parent_pid` | int | Parent Process identifier (PID). | `1234` | Recommended | +| `process.parent_pid` | int | Parent Process identifier (PID). | `5678` | Recommended | | `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. | From 63f0cd9bdd9d57bb63672abdab15d8302865ac8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDavid?= Date: Mon, 25 Jul 2022 10:58:42 -0700 Subject: [PATCH 6/6] updated parentid example --- semantic_conventions/resource/process.yaml | 2 +- specification/resource/semantic_conventions/process.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/semantic_conventions/resource/process.yaml b/semantic_conventions/resource/process.yaml index aebaa1d612d..e0303e12f4c 100644 --- a/semantic_conventions/resource/process.yaml +++ b/semantic_conventions/resource/process.yaml @@ -13,7 +13,7 @@ groups: type: int brief: > Parent Process identifier (PID). - examples: [5678] + examples: [111] - id: executable.name type: string requirement_level: diff --git a/specification/resource/semantic_conventions/process.md b/specification/resource/semantic_conventions/process.md index 9ea28216c03..b741128b5ed 100644 --- a/specification/resource/semantic_conventions/process.md +++ b/specification/resource/semantic_conventions/process.md @@ -28,7 +28,7 @@ | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `process.pid` | int | Process identifier (PID). | `1234` | Recommended | -| `process.parent_pid` | int | Parent Process identifier (PID). | `5678` | Recommended | +| `process.parent_pid` | int | Parent Process identifier (PID). | `111` | Recommended | | `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. |