Always attach a stack trace, when AttachStackTrace
is true
#2262
Labels
Feature
New feature or request
AttachStackTrace
is true
#2262
Problem Statement
The current behavior
SentryOptions.AttachStackTrace = true
is that we attach a stack trace when capturing any error event that does not contain an exception.This does not cover the case where there is an exception on the event, but it does not contain a stack trace.
For example:
Regardless of the
AttachStackTrace
option, no stack trace will be sent.Solution Brainstorm
AttachStackTrace = true
implies that there should always be a stack trace. Thus, we can check the exceptions on the event and see if any of them have a stack trace. If none do, then attach one separately.Note that the stack trace will point at where the exception is captured, not where it is created.
In other words, it's different than throwing and capturing the exception like this:
In that case, the stack trace will point at where the exception is thrown.
Still, it's better to have some stack trace than nothing, IMHO.
The text was updated successfully, but these errors were encountered: