diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index 0d23cd0cbd5..950f17c8b4c 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -8,6 +8,7 @@ This document defines standard attributes for resources. These attributes are ty - [Compute Unit](#compute-unit) * [Container](#container) * [Function as a Service](#function-as-a-service) + * [Process](#process) - [Deployment Service](#deployment-service) * [Kubernetes](#kubernetes) - [Compute Instance](#compute-instance) @@ -19,7 +20,7 @@ This document defines standard attributes for resources. These attributes are ty ## TODOs -* Add more compute units: Process, AppEngine unit, etc. +* Add more compute units: AppEngine unit, etc. * Add Device (mobile) and Web Browser. * Decide if lower case strings only. * Consider to add optional/required for each attribute and combination of attributes @@ -113,6 +114,23 @@ Note: The resource attribute `faas.instance` differs from the span attribute `fa [ARN]:https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html [FunctionDirectory]: https://github.com/Azure/azure-functions-host/wiki/Retrieving-information-about-the-currently-running-function +### Process + +**type:** `process` + +**Description:** An operating system process. + +| Attribute | Description | Example | Required | +|---|---|---|--| +| process.pid | Process identifier (PID). | `1234` | Yes | +| process.name | The name of the process executable. On Unix based systems, can be set to the Name in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | See below | +| process.exe | The full path to the process executable. On Unix based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to `GetProcessImageFileNameW`. | `cmd/otelcol` | See below | +| process.command | The command used to launch the process (i.e. the command name). On Unix based systems, can be set to the zeroth string `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. | `cmd/otelcol` | See below | +| process.commandline | The full command used to launch the process. This can be a list of strings (ordered arguments), or a single string with arguments separated by a space. On Unix based systems, can be set to the list of strings returned by `proc/[pid]/cmdline`. On Windows, can be set to `GetCommandLineW`. | `cmd/otecol --config=config.yaml` | See below | +| process.owner | The username of the user that owns the process. | `root` | No | + +At least one of `process.name`, `process.exe`, `process.command`, or `process.commandline` is required. + ## Deployment Service Attributes defining a deployment service (e.g. Kubernetes).