Skip to content

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

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

kamilogorek
Copy link
Contributor

ref: #2462

@kamilogorek kamilogorek requested a review from lobsterkatie March 3, 2020 14:48
@getsentry-bot
Copy link
Contributor

getsentry-bot commented Mar 3, 2020

Warnings
⚠️ Please add a changelog entry for your changes.
Messages
📖

@sentry/browser bundle gzip'ed minified size: (ES5: 16.6953 kB) (ES6: 15.709 kB)

📖 ✅ TSLint passed

Generated by 🚫 dangerJS against 0fec064

Comment on lines +261 to +264
event.user = {
...event.user,
...extractedUser,
};
Copy link
Member

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?

Copy link
Contributor Author

@kamilogorek kamilogorek Mar 3, 2020

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

Copy link
Member

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 :-)

#2472

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.

3 participants