-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
capturing a message with stack trace using @sentry/browser
#1666
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
Comments
There is an option called After that you call |
(github is still being a pain, so I can't see your message except in
emails.)
That's useful, thank you. Would still be useful to decide whether to
include the stack trace when firing the message.
…On Mon, 22 Oct 2018 at 14:39, Daniel Griesser ***@***.***> wrote:
There is an option called attachStacktrace for init see:
https://docs.sentry.io/learn/configuration/?platform=browser#attach-stacktrace
After that you call captureMessage and you will get a stacktrace.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1666 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD2jGZ_upB1fl6QnH5X8yZnQeNCuuPhlks5uncqBgaJpZM4XzFhf>
.
|
While attaching a stack seems simple, it actually adds a overhead to performance and payload. Also if this seems not to be enough you can write your own integration. |
Thanks for the response, I'll close this however IMHO it still seems like a step back from the raven-js interface. |
https://docs.sentry.io/platforms/javascript/configuration/options/#attach-stacktrace This issue appears at the top of a Google search for sentry capturemessage stacktrace.
|
Not ideal as this doesn't let you include for just some messages, and the overhead involved means it's likely undesirable to enable it for all messages. |
If you only want it for specific messages, I'd suggest to just use |
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)Version:
Description
I'm switching from
raven-js
to@sentry/browser
.In raven-js I could do
However with
@sentry/browser
captureMessage
only takes alevel
argument. To addextra
I can use(which is arguably uglier), but the real problem is that there's no way to add
stacktrace: true
, instead thestacktrace
argument requires an actual stack trace. I tried settingsstacktrace: true
but I got "Discarded invalid value for parameter 'stacktrace'".It doesn't seem to be possible to log a message with a stack using
@sentry/browser
.The text was updated successfully, but these errors were encountered: