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

ip_address field always None #2463

Closed
ibraheemalayan opened this issue Oct 25, 2023 · 1 comment
Closed

ip_address field always None #2463

ibraheemalayan opened this issue Oct 25, 2023 · 1 comment
Labels

Comments

@ibraheemalayan
Copy link

How do you use Sentry?

Self-hosted/on-premise

Version

23.9.0.dev0

Steps to Reproduce

I have a flask web-app that uses a sentry integration, each time a user is loaded, his information are added to the sentry context using from sentry_sdk import set_user as follows

set_user(
            {
                "id": str(user.id),
                "ip_address": str(request.remote_addr),
                "IP": str(request.remote_addr),
                "email": str(user.email),
            }
        )

I've added a custom field IP and passed exactly the same value as the ip_address, the IP value appeared correctly in sentry but the ip_address did not.

Expected Result

Expected that the IP field has the same value as ip_address

Actual Result

This is what appears in sentry
image

@sentrivana
Copy link
Contributor

sentrivana commented Oct 25, 2023

Hey @ibraheemalayan, thanks for the report. How do you initialize the SDK? There's an option called send_default_pii (see docs) which, if not set, defaults to False and will result in some potentially sensitive data being scrubbed from the event before it leaves the SDK, including user.ip_address. See Scrubbing sensitive data for more info on how to fine tune this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants