Skip to content
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

Fix: do not call captureException/captureMessage in a setImmediate #34

Closed
wants to merge 1 commit into from

Conversation

glensc
Copy link
Collaborator

@glensc glensc commented Oct 19, 2021

Somehow, doing so, will lose scope.setTag and scope.setExtra results

Instead, wrap whole setScope inside a function.

Somehow, doing so, will lose scope.setTag and scope.setExtra results

Instead, wrap whole setScope inside a function
@glensc
Copy link
Collaborator Author

glensc commented Oct 19, 2021

Perhaps should just not combine Sentry.withScope and setImmediate, but I moved everything, so it's simpler to understand.

@glensc
Copy link
Collaborator Author

glensc commented Oct 20, 2021

@aandrewww please merge #34 or #32

I prefer #34 because it's a more compact change.

and release as 0.9.1 bugfix

@aandrewww
Copy link
Owner

@glensc hi.
I'm going to review, merge and bump version today or tomorrow.
Thanks!

@jdkajewski
Copy link

jdkajewski commented Oct 20, 2021

@glensc and @aandrewww, the only issue I foresee with this PR is that it does not set the proper log level. Where as with #32 it properly sets the log level.

@glensc
Copy link
Collaborator Author

glensc commented Oct 20, 2021

@jdkajewski you just guess, or do you have a reproducer?

@glensc
Copy link
Collaborator Author

glensc commented Oct 20, 2021

I just tested, code from this branch and info level gets logged as info to sentry as well

image

@gomerdoom
Copy link

@glensc The issue shows up with different log levels for exceptions. We're not seeing it capture the difference between fatal and error exceptions unless you call scope.setLevel, as well as pass the scope in as the second parameter on captureException.

@aandrewww
Copy link
Owner

I will review and test this PR tomorrow
Sorry for the delay :( (A lot of other stuff)

@glensc
Copy link
Collaborator Author

glensc commented Oct 27, 2021

perhaps go with #32 then, or need to add scope.setLevel to this branch?

none of them matter much if v7 comes as there's a new API for transports

@aandrewww
Copy link
Owner

@glensc Hey. Sorry for long break.
I am going to merge #32 and bump minor version
Then I am going to review and merge #35 and bump major version

I think This PR should be closed

@glensc
Copy link
Collaborator Author

glensc commented Nov 4, 2021

superseded by #32

@glensc glensc closed this Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants