From caaa9a534d6fc4526aa803aa23ac190e732dcce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Tue, 8 Sep 2020 16:44:34 +0200 Subject: [PATCH] Add exception.escaped attribute. (#784) * Add exception.escaped attribute. This reverts commit 80ea27df4dd858b686d91ef37dad89aa8cd89439. * New wording for API change. * Remove additional condition for escaped parameter. * Remove exception.escaped from the API. * Add CHANGELOG entry. * Wrong PR# in CHANGELOG. * Wrong wrong PR# in CHANGELOG (hey anagrams!). * Closing ) * Typos Co-authored-by: Armin Ruech Co-authored-by: Armin Ruech --- CHANGELOG.md | 5 +++-- specification/trace/semantic_conventions/exceptions.md | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17151fa165b..3e4d182126e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,8 +18,9 @@ New: - Clarification of the behavior of the Trace API, re: context propagation, in the absence of an installed SDK - Add Span API and semantic conventions for recording exceptions - ([#697](https://github.com/open-telemetry/opentelemetry-specification/pull/697), - [#874](https://github.com/open-telemetry/opentelemetry-specification/pull/874)) + ([#697](https://github.com/open-telemetry/opentelemetry-specification/pull/697)) + * API was extended to allow adding arbitrary event attributes ([#874](https://github.com/open-telemetry/opentelemetry-specification/pull/874)) + * `exception.escaped` was added ([#784](https://github.com/open-telemetry/opentelemetry-specification/pull/784)) Updates: diff --git a/specification/trace/semantic_conventions/exceptions.md b/specification/trace/semantic_conventions/exceptions.md index 6dc61b07c74..35cb1a8085e 100644 --- a/specification/trace/semantic_conventions/exceptions.md +++ b/specification/trace/semantic_conventions/exceptions.md @@ -26,6 +26,7 @@ their types. | exception.type | 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. E.g. "java.net.ConnectException", "OSError" | One of `exception.type` or `exception.message` is required | | exception.message | String | The exception message. E.g. `"Division by zero"`, `"Can't convert 'int' object to str implicitly"` | One of `exception.type` or `exception.message` is required | | exception.stacktrace | 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. E.g. `"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)"`. | No | +| exception.escaped | Bool | 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 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. | No | ### Stacktrace Representation