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 OS process as resource attributes #919

Merged
merged 7 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Add semantic convention for `faas.coldstart` and `container.id`. (#909)
- Add http content size semantic conventions. (#905)
- Include `http.request_content_length` in HTTP request basic attributes. (#905)
- Add semantic conventions for operating system process resource attribute keys. (#919)

### Changed

Expand Down
28 changes: 28 additions & 0 deletions api/standard/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,34 @@ const (
FaaSInstance = kv.Key("faas.instance")
)

// Standard operation system process resource attribute keys.
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
const (
// Process identifier (PID).
ProcessPIDKey = kv.Key("process.pid")
// 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`.
ProcessExecutableNameKey = kv.Key("process.executable.name")
// The full oath to the process executable. On Unix based systems, can
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
// be set to the target of `proc/[pid]/exe`. On Windows, can be set to
// the result of `GetProcessImageFileNameW`.
ProcessExecutablePathKey = kv.Key("process.executable.path")
// 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`.
ProcessCommandKey = kv.Key("process.command")
// 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`.
ProcessCommandLineKey = kv.Key("process.command_line")
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
// The username of the user that owns the process.
ProcessOwnerKey = kv.Key("process.owner")
)

// Standard Kubernetes resource attribute keys.
const (
// A uniquely identifying name for the Kubernetes cluster. Kubernetes
Expand Down