-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref: Allow to extract user IP address without req.user present #2467
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
event.user = { | ||
...event.user, | ||
...extractedUser, | ||
}; |
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.
By doing them in this order, is it possible we'd be overwriting user data added using withScope
with the extracted data?
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.
Yes, but this was the previous behavior and I didn't want to change it here.
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.
I ask because it just came up as a bug on the Python side (see getsentry/sentry-python#637). Even if we don't do it here (if we want to consider it a breaking change), might be worth thinking about as a way to prevent future user confusion/frustration.
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.
Agree. Let's get this in first, so it allows for extraction at all. It won't do any more harm in this form anyway.
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.
Sounds good.
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.
Created an issue so we don't forget :-)
ref: #2462