RUM-2928: Report all threads in case of crash#1848
Conversation
72153f1 to
68aa1ae
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #1848 +/- ##
===========================================
+ Coverage 83.41% 83.58% +0.16%
===========================================
Files 467 470 +3
Lines 16530 16567 +37
Branches 2498 2492 -6
===========================================
+ Hits 13788 13846 +58
+ Misses 2050 2046 -4
+ Partials 692 675 -17
|
| val thread = it.key | ||
| val isCrashedThread = thread == crashedThread | ||
| val stack = if (isCrashedThread) { | ||
| crashException.loggableStackTrace() |
There was a problem hiding this comment.
what is the difference between using crashExceptiom.loggableStackTrace and thread.stackTrae.loggableStackTrace and why not just using the later here.
There was a problem hiding this comment.
The difference is that one reads a stacktrace from an exception, while the latter captures the current stacktrace of a given thread.
If the thread is the crashedThread, it means that this is the current one, and so capturing the current stacktrace would report the state as the DDExceptionHandler
| val thread = it.key | ||
| val isCrashedThread = thread == crashedThread | ||
| val stack = if (isCrashedThread) { | ||
| crashException.loggableStackTrace() |
There was a problem hiding this comment.
The difference is that one reads a stacktrace from an exception, while the latter captures the current stacktrace of a given thread.
If the thread is the crashedThread, it means that this is the current one, and so capturing the current stacktrace would report the state as the DDExceptionHandler
68aa1ae to
f28e295
Compare
What does this PR do?
This PR will make all threads to be reported in case of the application crash. Data will be sent in the
error.threadsproperty for both Logs and RUM, and will include the following:name- thread namecrashed- if this particular thread crashed or not (it will be the thread for which we caught an exception).state- thread state at the moment of the crash, according to theThread.Statestack- stacktrace of the thread at the crash moment, for the crashed thread it will exception stacktrace instead.Review checklist (to be filled by reviewers)