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 semantic conventions for process resource #635

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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ the release.
- Clarify Tracer vs TracerProvider in tracing API and SDK spec. Most importantly:
* Configuration should be stored not per Tracer but in the TracerProvider.
* Active spans are not per Tracer.
- Add semantic conventions for process resource.

## v0.5.0 (06-02-2020)

Expand Down
20 changes: 19 additions & 1 deletion specification/resource/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
james-bebbington marked this conversation as resolved.
Show resolved Hide resolved

**type:** `process`

**Description:** An operating system process.

| Attribute | Description | Example | Required |
|---|---|---|--|
| process.pid | Process identifier (PID). | `1234` | Yes |
| process.executable.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.executable.path | 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 the result of `GetProcessImageFileNameW`. | `/usr/bin/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 in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. | `cmd/otelcol` | See below |
| process.command_line | The full command used to launch the process. The value can be either a list of strings representing the ordered list of arguments, or a single string representing the full command. On Unix based systems, can be set to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. On Windows, can be set to the result of `GetCommandLineW`. | Unix: `[ cmd/otecol, --config=config.yaml ]`, Windows: `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.executable.name`, `process.executable.path`, `process.command`, or `process.command_line` is required.

## Deployment Service

Attributes defining a deployment service (e.g. Kubernetes).
Expand Down