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
# Use this changelog template to create an entry for release notes.
2
+
#
3
+
# If your change doesn't affect end users you should instead start
4
+
# your pull request title with [chore] or use the "Skip Changelog" label.
5
+
6
+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7
+
change_type: enhancement
8
+
9
+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10
+
component: exception
11
+
12
+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13
+
note: "Add code attributes (`code.function.name`, `code.file.path`, `code.line.number`, `code.column.number`) as opt-in attributes for the `event.exception` event."
14
+
15
+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16
+
# The values here must be integers.
17
+
issues: [1981]
18
+
19
+
# (Optional) One or more lines of additional information to render under the primary note.
20
+
# These lines will be padded with 2 spaces and then inserted directly into the document.
Copy file name to clipboardExpand all lines: docs/exceptions/exceptions-spans.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,11 +37,31 @@ This event describes a single exception.
37
37
|[`exception.type`](/docs/registry/attributes/exception.md)||`Conditionally Required`[2]| string | The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. |`java.net.ConnectException`; `OSError`|
38
38
|[`exception.escaped`](/docs/registry/attributes/exception.md)|<br>It's no longer recommended to record exceptions that are handled and do not escape the scope of a span. |`Recommended`| boolean | Indicates that the exception is escaping the scope of the span. ||
39
39
|[`exception.stacktrace`](/docs/registry/attributes/exception.md)||`Recommended`| 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. |`Exception in thread "main" java.lang.RuntimeException: Test exception\n 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)`|
40
+
|[`code.column.number`](/docs/registry/attributes/code.md)||`Opt-In`| int | The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity. |`16`|
41
+
|[`code.file.path`](/docs/registry/attributes/code.md)||`Opt-In`| string | The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity. |`/usr/local/MyApplication/content_root/app/index.php`|
42
+
|[`code.function.name`](/docs/registry/attributes/code.md)||`Opt-In`| 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. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity. [3]|`com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen`|
43
+
|[`code.line.number`](/docs/registry/attributes/code.md)||`Opt-In`| int | The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity. |`42`|
40
44
41
45
**[1]`exception.message`:** Required if `exception.type` is not set, recommended otherwise.
42
46
43
47
**[2]`exception.type`:** Required if `exception.message` is not set, recommended otherwise.
44
48
49
+
**[3]`code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
50
+
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
51
+
`code.stacktrace` without information on arguments.
0 commit comments