diff --git a/docs/error-reporting/platform-integrations/android/configuration.md b/docs/error-reporting/platform-integrations/android/configuration.md index 7774e5e125..fd626802e9 100644 --- a/docs/error-reporting/platform-integrations/android/configuration.md +++ b/docs/error-reporting/platform-integrations/android/configuration.md @@ -314,6 +314,32 @@ try { +### Sending Inner and Suppressed exceptions + +:::warning Inner and suppressed exception support + +Support for inner and suppressed exceptions is available starting backtrace-android@3.9.0 +::: + +Backtrace client allows sending Inner and suppressed exceptions. By default, this option is disabled. To enable inner and suppressed exception support, use the code shown below. + +```java +// enable inner exceptions +backtraceClient.sendInnerExceptions(true); +// enable suppressed exceptions +backtraceClient.sendSuppressedExceptions(true); +``` + +Once inner or suppressed exceptions are enabled, The Backtrace client will verify the `BacktraceReport` or `exception` object passed to the `send` method. If inner/suppressed exceptions are detected, the report with the same attributes will be created for each. In addition to that, the following attributes will be generated: + +| Attribute name | Attribute description | +| -------------- | ----------------------------------------------------------------------------------- | +| error.trace | Exception trace id. All exceptions in the exception chain will have the same value. | +| error.id | Current report identifier. The value is allows to identify the current report id | +| error.parent | Parent report id. Allows to identify the exception parent id | + +The outer exception always has `error.trace` and `error.id`. Since this is the first error in the exception chain, the `error.parent` attribute is set to `null`. The first inner exception of the outer exception will have the same `error.trace` attribute, its own unique `error.id` attribute, and `error.parent` set to the outer exception `error.id`. Each suppressed exception of the outer exception, follows the same pattern. + ## Custom Event Handlers The `BacktraceClient` allows you to attach your custom event handlers. For example, you can trigger actions before the `send` method, as shown below.