-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
captureMessage can attach stack trace via stacktrace: true
option
#582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0a0ebf9
to
c4956d0
Compare
Let's use the sentry.interface.Stacktrace interface explicitly and avoid sending along an Exception interface for the synthetic exception. |
c4956d0
to
407848e
Compare
I mean, this is ideal, but to do so means a colossal refactor of Raven.js :( Let me dork around and see what it looks like. |
@@ -131,7 +131,7 @@ module.exports = function(grunt) { | |||
dest: 'build/raven.test.js', | |||
options: { | |||
browserifyOptions: { | |||
debug: true // source maps | |||
debug: false// source maps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Source map generation for tests is/has been broken so I just disabled it to make my life easier debugging this. I'll revisit in future.
ecb0205
to
7fbf87b
Compare
@@ -363,6 +363,8 @@ Raven.prototype = { | |||
ex = ex1; | |||
} | |||
|
|||
console.log(ex.stack); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks.
9403f01
to
310280d
Compare
stacktrace: true
option [WIP]stacktrace: true
option
310280d
to
722492b
Compare
This is no longer WIP. My plan is to test this live on |
@benvinegar Any updates on this? This would be a huge help for me 😁 |
@simon-weber yep trying to push this through. Big changes like this make me nervous so I just need to QA ourselves first. |
722492b
to
22bebbd
Compare
/cc @getsentry/team
/cc @getsentry/team
Okay, after some testing I've decided that attempting figure out the "tail" Raven frames has more cases than I've considered, so I've reverted that part of the code. This now strictly just does synthetic stack traces via cc @mattrobenolt @macqueen – can you look at this again? |
options = objectMerge({ | ||
// fingerprint on msg, not stack trace | ||
// NOTE: need also to do this because stack could include Raven.wrap, | ||
// which may create inconsistent traces if only using window.onerror |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand this comment anymore (re window.onerror
) ... uhhhh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
¯_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that comment was true until I added the trimHeadFrames
stuff.
Reviewed 2 of 3 files at r6, 3 of 3 files at r7. Comments from Reviewable |
Reviewed 1 of 1 files at r8. Comments from Reviewable |
Cool! What version is this targeting? We're past 3.4.0 now. |
3.6.0. |
See also #581
{ stacktrace: true }
captureMessage
calls, or set globally duringconfig
captureMessage
, but maybe not ifcaptureMessage
was the result of a failedcaptureException
call (e.g. bad error object)stack: true
when callingcaptureMessage
#544cc @mattrobenolt @mitsuhiko @dcramer @bradvogel
This change is