Skip to content

feat(core): Don't gate user on logs with sendDefaultPii #16527

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 5 commits into from
Jun 16, 2025

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad requested a review from a team June 9, 2025 21:31
@AbhiPrasad AbhiPrasad self-assigned this Jun 9, 2025
@AbhiPrasad AbhiPrasad requested review from stephanie-anderson and s1gr1d and removed request for a team June 9, 2025 21:31
@mdtro
Copy link
Member

mdtro commented Jun 11, 2025

@AbhiPrasad Does this mean we will by default send the user's name, email, and ID? Or does it just mean that developers can use the setUser functionality without sendDefaultPII set to true?

@AbhiPrasad
Copy link
Member Author

If the SDK automatically collects user information (and thus calls Sentry.setUser for a user), we should gate this behind sendDefaultPii.

If a user explicitly calls Sentry.setUser, thats not default PII, that's the user opting in explicitly to the behaviour, so we should attach user information to all outgoing events as appropriate.

In this change we just remove sendDefaultPii gating user scope info (from Sentry.setUser) being applied to logs. We do not change behaviour about setting user automatically for users. Essentially we assume if the user info is already on the scope, the user wants to also see it in their events.

@AbhiPrasad AbhiPrasad merged commit 66436bc into develop Jun 16, 2025
163 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-send-default-pii-user branch June 16, 2025 14:34
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