-
Notifications
You must be signed in to change notification settings - Fork 896
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add yaml semantic conventions for Exception (#927)
- Loading branch information
Showing
2 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
groups: | ||
- id: exception | ||
prefix: exception | ||
brief: > | ||
This document defines the attributes used to | ||
report a single exception associated with a span. | ||
attributes: | ||
- id: type | ||
type: string | ||
brief: > | ||
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. | ||
examples: ["java.net.ConnectException","OSError"] | ||
- id: message | ||
type: string | ||
brief: The exception message. | ||
examples: ["Division by zero","Can't convert 'int' object to str implicitly"] | ||
- id: stacktrace | ||
type: string | ||
brief: > | ||
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. | ||
examples: '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)' | ||
- id: escaped | ||
type: boolean | ||
brief: > | ||
SHOULD be set to true if the exception event is recorded at a point where | ||
it is known that the exception is escaping the scope of the span (e.g. if | ||
there is an exception active just before ending the span). | ||
note: > | ||
Note that an exception may still leave the scope of the span even if this | ||
was not set or set to false, if the event was recorded at an earlier time. | ||
constraints: | ||
- any_of: | ||
- "exception.type" | ||
- "exception.message" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters