@sentry/browser
@sentry/node
raven-js
raven-node
_(raven for node)_4.4.2
I'm updating from using raven to @sentry/node
When I call Sentry.captureMessage('xyz')
my event is captured correctly. When I log into sentry I can find the event, but under "additional data" I have something like this:
String {
0: x,
1: y,
2: z
}
This gets pretty out of hand with long messages. Here's a screenshot:
Any idea what gives? Am I doing anything wrong here?
Yes, this also happens with me. Still haven't been able to figure out how to turn if off.
What I noticed is it's not logged under "Additional Data" if you do Sentry.captureException(new Error('cool error'))
;
But any other way, the string you add on captureException
or captureMessage
is logged like that.
this is FunctionToString integration in sentry/core, killed a few hours to find...
if you want a workaround - disable default integrations or filter out function to string during init call
https://github.com/getsentry/sentry-javascript/blob/4.4.2/packages/core/src/integrations/functiontostring.ts#L21-L27 - culprit
Thanks! I'll be back at work soon and I'll try that first thing
I have tried to filter out FunctionToString
but I'm still getting this error. Maybe I'm filtering wrong, but I tried simply:
Sentry.init({
...,
integrations: integrations => integrations.filter(integration => integration.name !== 'FunctionToString')
});
@AVVS Would you mind sharing your init
code? Maybe it's a combination of options that turn this off.
I'm seeing the same as @fvcaputo. Filtering out FunctionToString
isn't preventing this, but filtering out ExtraErrorData
_does_ stop this from happening.
I'm thinking right now that ExtraErrorData is a useful enough integration for me to keep that on and live with the weird message string for now.
Seems like I tracked down the issue on ExtraErrorData, I submitted a small PR to deal with it.
This should have been fixed in the latest version 4.5.0
.
Most helpful comment
if you want a workaround - disable default integrations or filter out function to string during init call
https://github.com/getsentry/sentry-javascript/blob/4.4.2/packages/core/src/integrations/functiontostring.ts#L21-L27 - culprit