-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Pass the error object to log #1246
Conversation
Hi @ikonst, Could you please add a test for this? Change looks good me. |
@w666 take a look ^ |
4e9d23b
to
35e4a6a
Compare
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.
One minor comment, otherwise looks good to me.
Approved, thanks for the improvement, I will include it into next release. Please let me know if you need these changes asap, will see if I can make a release earlier. |
Thank you. There's no urgency. |
The current code uses
suppressStack
to determine what is logged, while I thinksuppressStack
was only intended to control whether we expose internals to the caller.It would be preferable if the logging mechanism could see the original error for what it is, since then it could use the appropriate logging mechanism in the code base; for example, pass the error object to Sentry, or log it in a structured way (name and stack separately) for Datadog to consume, etc.