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

Yaml files for process semantic convention #1227

Merged
merged 5 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
84 changes: 84 additions & 0 deletions semantic_conventions/resource/process.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
groups:
- id: process
prefix: process
brief: >
An operating system process.
attributes:
- id: pid
type: number
brief: >
Process identifier (PID).
examples: [1234]
- id: executable.name
type: string
brief: >
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`.
examples: ['otelcol']
- id: executable.path
type: string
brief: >
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`.
examples: ['/usr/bin/cmd/otelcol']
- id: command
type: string
brief: >
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`.
examples: ['cmd/otelcol ']
- id: command_line
type: string
brief: >
The full command used to launch the process as a single string representing
the full command. On Windows, can be set to the result of `GetCommandLineW`.
Do not set this if you have to assemble it just for monitoring; use
`process.command_args` instead.
examples: ['C:\cmd\otecol --config="my directory\config.yaml"']
- id: command_args
type: string[]
brief: >
All the command arguments (including the command/executable itself) as
received by the process. On Linux-based systems (and some other Unixoid
systems supporting procfs), can be set according to the list of
null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based
executables, this would be the full argv vector passed to `main`.
examples: ['cmd/otecol', '--config=config.yaml ']
- id: owner
type: string
brief: >
The username of the user that owns the process.
examples: 'root'
constraints:
- any_of:
- process.executable.name
- process.executable.path
- process.command
- process.command_line
- process.command_args
- id: process.runtime
prefix: process.runtime
brief: >
The single (language) runtime instance which is monitored.
attributes:
- id: name
type: string
brief: >
The name of the runtime of this process. For compiled native binaries,
this SHOULD be the name of the compiler.
examples: ['OpenJDK Runtime Environment']
- id: version
type: string
brief: >
The version of the runtime of this process, as returned by the runtime
without modification.
examples: '14.0.2'
- id: description
type: string
brief: >
An additional description about the runtime of the process, for example
a specific vendor customization of the runtime environment.
examples: 'Eclipse OpenJ9 openj9-0.21.0'
thisthat marked this conversation as resolved.
Show resolved Hide resolved
41 changes: 26 additions & 15 deletions specification/resource/semantic_conventions/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@

**Description:** An operating system process.

| Attribute | Description | Example | Required |
|---|---|---|--|
| process.pid | Process identifier (PID). | `1234` | No |
| process.executable.name | 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` | See below |
| process.executable.path | 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` | See below |
| process.command | 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` | See below |
| process.command_line | The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` | See below |
| process.command_args | All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. | `[ cmd/otecol, --config=config.yaml ]` | See below |
| process.owner | The username of the user that owns the process. | `root` | No |
<!-- semconv process -->
| Attribute | Type | Description | Example | Required |
|---|---|---|---|---|
| `process.pid` | number | Process identifier (PID). | `1234` | No |
| `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` | See 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` | See 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 ` | See below |
| `process.command_line` | string | The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` | See below |
| `process.command_args` | string[] | All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. | `cmd/otecol`<br>`--config=config.yaml ` | See below |
thisthat marked this conversation as resolved.
Show resolved Hide resolved
| `process.owner` | string | The username of the user that owns the process. | `root` | No |

**Additional attribute requirements:** At least one of the following sets of attributes is required:

* `process.executable.name`
* `process.executable.path`
* `process.command`
* `process.command_line`
* `process.command_args`
thisthat marked this conversation as resolved.
Show resolved Hide resolved
<!-- endsemconv -->

Between `process.command_args` and `process.command_line`, usually `process.command_args` should be preferred.
On Windows and other systems where the native format of process commands is a single string,
Expand All @@ -40,19 +50,20 @@ For backwards compatibility with older versions of this semantic convention,
it is possible but deprecated to use an array as type for `process.command_line`.
In that case it MUST be interpreted as if it was `process.command_args`.

At least one of `process.executable.name`, `process.executable.path`, `process.command`, `process.command_line` or `process.command_args` is required to allow back ends to identify the executable.

## Process runtimes

**type:** `process.runtime`

**Description:** The single (language) runtime instance which is monitored.

| Attribute | Description | Example | Required |
|---|---|---|--|
| process.runtime.name | The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. | `OpenJDK Runtime Environment` | No |
| process.runtime.version | The version of the runtime of this process, as returned by the runtime without modification. | `14.0.2` | No |
| process.runtime.description | An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. | `Eclipse OpenJ9 openj9-0.21.0` | No |
<!-- semconv process.runtime -->
| Attribute | Type | Description | Example | Required |
|---|---|---|---|---|
| `process.runtime.name` | string | The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. | `OpenJDK Runtime Environment` | No |
| `process.runtime.version` | string | The version of the runtime of this process, as returned by the runtime without modification. | `14.0.2` | No |
| `process.runtime.description` | string | An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. | `Eclipse OpenJ9 openj9-0.21.0` | No |
arminru marked this conversation as resolved.
Show resolved Hide resolved
<!-- endsemconv -->

`process.runtime.name` SHOULD be set to one of the values listed below, unless more detailed instructions are provided.
If none of the listed values apply, a custom value best describing the runtime MAY be used.
Expand Down