Skip to content

refactor(logs): apply user attributes to log regardless of send_default_pii #843

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

Conversation

lcian
Copy link
Member

@lcian lcian commented Jun 13, 2025

We have decided that SDKs should ignore send_default_pii when setting user attributes on logs because that's what we do for other data types such as events.

(explanation: any integration that can set the user must honor send_default_pii, so they won't set the user if that flag is off. Then, the only way to have a user on the scope is for the Sentry user to manually set it, in which case we always want to let them do it and send the data, regardless of send_default_pii.)

Technically this is a breaking change even though it's pretty unlikely that someone is already using this.
As an alternative we could just ignore the parameter.

Copy link

codecov bot commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 15.78947% with 16 lines in your changes missing coverage. Please review.

Project coverage is 73.66%. Comparing base (0b251dc) to head (2a219f9).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #843      +/-   ##
==========================================
+ Coverage   73.64%   73.66%   +0.01%     
==========================================
  Files          64       64              
  Lines        7728     7726       -2     
==========================================
  Hits         5691     5691              
+ Misses       2037     2035       -2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lcian lcian changed the title refactor(core): apply user attributes to log regardless of send_default_pii refactor(logs): apply user attributes to log regardless of send_default_pii Jun 16, 2025
@lcian lcian merged commit 88b00f3 into master Jun 16, 2025
19 checks passed
@lcian lcian deleted the lcian/ref/logs-user-pii branch June 16, 2025 13:37
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.

2 participants