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

Moved should_send_default_pii into client #2840

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Moved should_send_default_pii from hub to client
  • Loading branch information
antonpirker committed Mar 18, 2024
commit 1834c66f72bd0db3655f32d04425d36d3423a075
9 changes: 9 additions & 0 deletions sentry_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,15 @@ def is_active(self):
"""
return True

def should_send_default_pii(self):
# type: () -> bool
"""
.. versionadded:: 2.0.0

Returns whether the client should send default PII (Personally Identifiable Information) data to Sentry.
"""
return self.options.get("send_default_pii", False)

@property
def dsn(self):
# type: () -> Optional[str]
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _should_send_default_pii():
client = Hub.current.client
if not client:
return False
return client.options["send_default_pii"]
return client.should_send_default_pii()


class _InitGuard:
Expand Down
Loading