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. |
|[`code.column.number`](/docs/attributes-registry/code.md)| 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`|`Recommended`||
434
-
|[`code.filepath`](/docs/attributes-registry/code.md)| string | Deprecated, use `code.file.path` instead |`/usr/local/MyApplication/content_root/app/index.php`|`Recommended`||
435
-
|[`code.function.name`](/docs/attributes-registry/code.md)| string | The method or function name, or equivalent (usually rightmost part of the code unit's name). |`serveRequest`|`Recommended`||
434
+
|[`code.filepath`](/docs/attributes-registry/code.md)| string | Deprecated, use `code.file.path` instead |`/usr/local/MyApplication/content_root/app/index.php`|`Recommended`|<br>Replaced by `code.file.path`|
435
+
|[`code.function.name`](/docs/attributes-registry/code.md)| 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`|`Recommended`||
436
436
|[`code.line.number`](/docs/attributes-registry/code.md)| 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`|`Recommended`||
437
-
|[`code.namespace`](/docs/attributes-registry/code.md)| 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`|`Recommended`||
437
+
|[`code.namespace`](/docs/attributes-registry/code.md)| string |Deprecated, namespaceis now included into `code.function.name`|`com.example.MyHttpService`|`Recommended`|<br>Value should be included in `code.function.name` which is expected to be a fully-qualified name.|
438
438
|[`code.stacktrace`](/docs/attributes-registry/code.md)| 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)`|`Opt-In`||
439
439
440
+
**[1]`code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
441
+
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
442
+
`code.stacktrace` without information on arguments.
0 commit comments