You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/attributes-registry/code.md
+19-3
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,34 @@ These attributes provide context about source code
14
14
|---|---|---|---|---|
15
15
| <aid="code-column-number"href="#code-column-number">`code.column.number`</a> | int | The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. |`16`||
16
16
| <aid="code-file-path"href="#code-file-path">`code.file.path`</a> | string | The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). |`/usr/local/MyApplication/content_root/app/index.php`||
17
-
| <aid="code-function-name"href="#code-function-name">`code.function.name`</a> | string | The method or function name, or equivalent (usually rightmost part of the code unit's name). |`serveRequest`||
17
+
| <aid="code-function-name"href="#code-function-name">`code.function.name`</a> | string | The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. [1]|`com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen`||
18
18
| <aid="code-line-number"href="#code-line-number">`code.line.number`</a> | int | The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. |`42`||
19
-
| <aid="code-namespace"href="#code-namespace">`code.namespace`</a> | string | The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit. |`com.example.MyHttpService`||
20
19
| <aid="code-stacktrace"href="#code-stacktrace">`code.stacktrace`</a> | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. |`at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)`||
21
20
21
+
**[1]`code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
22
+
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
23
+
`code.stacktrace` without information on arguments.
| <aid="code-column"href="#code-column">`code.column`</a> | int | Deprecated, use `code.column.number`|`16`|<br>Replaced by `code.column.number`|
29
-
| <aid="code-filepath"href="#code-filepath">`code.filepath`</a> | string | Deprecated, use `code.file.path` instead |`/usr/local/MyApplication/content_root/app/index.php`||
44
+
| <aid="code-filepath"href="#code-filepath">`code.filepath`</a> | string | Deprecated, use `code.file.path` instead |`/usr/local/MyApplication/content_root/app/index.php`|<br>Replaced by `code.file.path`|
30
45
| <aid="code-function"href="#code-function">`code.function`</a> | string | Deprecated, use `code.function.name` instead |`serveRequest`|<br>Replaced by `code.function.name`|
31
46
| <aid="code-lineno"href="#code-lineno">`code.lineno`</a> | int | Deprecated, use `code.line.number` instead |`42`|<br>Replaced by `code.line.number`|
47
+
| <aid="code-namespace"href="#code-namespace">`code.namespace`</a> | string | Deprecated, namespace is now included into `code.function.name`|`com.example.MyHttpService`|<br>Value should be included in `code.function.name` which is expected to be a fully-qualified name. |
| <aid="cpu-logical-number"href="#cpu-logical-number">`cpu.logical_number`</a> | int | The logical CPU number [0..n-1]|`1`||
12
13
| <aid="cpu-mode"href="#cpu-mode">`cpu.mode`</a> | string | The mode of the CPU |`user`; `system`||
Copy file name to clipboardexpand all lines: docs/attributes-registry/process.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ An operating system process.
22
22
| <aid="process-executable-build-id-gnu"href="#process-executable-build-id-gnu">`process.executable.build_id.gnu`</a> | string | The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). |`c89b11207f6479603b0d49bf291c092c2b719293`||
23
23
| <aid="process-executable-build-id-go"href="#process-executable-build-id-go">`process.executable.build_id.go`</a> | string | The Go build ID as retrieved by `go tool buildid <go executable>`. |`foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY`||
24
24
| <aid="process-executable-build-id-htlhash"href="#process-executable-build-id-htlhash">`process.executable.build_id.htlhash`</a> | string | Profiling specific build ID for executables. See the OTel specification for Profiles for more information. |`600DCAFE4A110000F2BF38C493F5FB92`||
25
-
| <aid="process-executable-name"href="#process-executable-name">`process.executable.name`</a> | 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`||
25
+
| <aid="process-executable-name"href="#process-executable-name">`process.executable.name`</a> | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. |`otelcol`||
26
26
| <aid="process-executable-path"href="#process-executable-path">`process.executable.path`</a> | 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`||
27
27
| <aid="process-exit-code"href="#process-exit-code">`process.exit.code`</a> | int | The exit code of the process. |`127`||
28
28
| <aid="process-exit-time"href="#process-exit-time">`process.exit.time`</a> | string | The date and time the process exited, in ISO 8601 format. |`2023-11-21T09:26:12.315Z`||
| <aid="system-cpu-logical-number"href="#system-cpu-logical-number">`system.cpu.logical_number`</a> | int | The logical CPU number [0..n-1]|`1`||
| <aid="system-cpu-logical-number"href="#system-cpu-logical-number">`system.cpu.logical_number`</a> | int | Deprecated, use `cpu.logical_number` instead. |`1`||
145
137
| <aid="system-cpu-state"href="#system-cpu-state">`system.cpu.state`</a> | string | Deprecated, use `cpu.mode` instead. |`idle`; `interrupt`|<br>Replaced by `cpu.mode`|
146
138
| <aid="system-network-state"href="#system-network-state">`system.network.state`</a> | string | Deprecated, use `network.connection.state` instead. |`close_wait`|<br>Removed, report network connection state with `network.connection.state` attribute |
147
139
| <aid="system-processes-status"href="#system-processes-status">`system.processes.status`</a> | string | Deprecated, use `system.process.status` instead. |`running`|<br>Replaced by `system.process.status`. |
|[`process.executable.name`](/docs/attributes-registry/process.md)| 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`|`Required`||
32
+
|[`process.executable.name`](/docs/attributes-registry/process.md)| string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. |`otelcol`|`Required`||
33
33
|[`process.exit.code`](/docs/attributes-registry/process.md)| int | The exit code of the process. |`127`|`Required`||
34
34
|[`process.pid`](/docs/attributes-registry/process.md)| int | Process identifier (PID). |`1234`|`Required`||
35
35
|[`error.type`](/docs/attributes-registry/error.md)| string | Describes a class of error the operation ended with. [1]|`timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500`|`Conditionally Required` if and only if process.exit.code is not 0 ||
|[`process.executable.name`](/docs/attributes-registry/process.md)| 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`|`Required`||
83
+
|[`process.executable.name`](/docs/attributes-registry/process.md)| string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. |`otelcol`|`Required`||
84
84
|[`process.exit.code`](/docs/attributes-registry/process.md)| int | The exit code of the process. |`127`|`Required`||
85
85
|[`process.pid`](/docs/attributes-registry/process.md)| int | Process identifier (PID). |`1234`|`Required`||
86
86
|[`error.type`](/docs/attributes-registry/error.md)| string | Describes a class of error the operation ended with. [1]|`timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500`|`Conditionally Required` if and only if process.exit.code is not 0 ||
0 commit comments