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

Document and add sendDefaultPii: true to onboarding docs #121

Open
5 of 23 tasks
HazAT opened this issue Jan 22, 2025 · 9 comments
Open
5 of 23 tasks

Document and add sendDefaultPii: true to onboarding docs #121

HazAT opened this issue Jan 22, 2025 · 9 comments

Comments

@HazAT
Copy link
Member

HazAT commented Jan 22, 2025

Description

Our approach is privacy first and we want to be transparent about that
sendDefaultPii is not the best API since it hides a lot of functionality behind one flag we are probably revisiting this in the future.

But until we have a better API, we want that sendDefaultPii: true will be added to the onboarding docs (in-product and docs) with a comment like:

Sentry.init({
  dsn: "DSN",
  // Adds request headers and IP for users,
  // visit: https://docs.sentry.io/platforms/javascript/data-management/data-collected/ for more info
  sendDefaultPii: true,

We know that what's not in onboarding docs is very hard to discover and the functionality provided by sendDefaultPii: true is something crucial for debugging your issues.

Each SDK should link to the specific docs added in #82.

Why should we be doing this?

To make it very clear to our users that this option exists and they can change the behavior in case they have privacy concerns.

Why now?

Because we had [INC-984] and we should be more deliberate what we do

Notion Document(s)

Related DACI: https://www.notion.so/sentry/DACI-user-ip_address-auto-behind-sendDefaultPii-true-1818b10e4b5d802f8938e894fd0348d5

Stakeholder(s)

@HazAT

Team(s)

Mobile, Web Backend, Web Frontend, GDX

SDKs

SDKs

Preview Give feedback
  1. Platform: Dart
    buenaflor
  2. Platform: KMP
@markushi
Copy link
Member

@HazAT I already see people blindly copying this, how about having the prop commented out by default?

Something like this

Sentry.init({
  dsn: "DSN",

  // Uncomment if you want to see request headers and IP for users
  // Visit https://docs.sentry.io/platforms/javascript/sendDefaultPii for more info
  // sendDefaultPii: true,

@philipphofmann
Copy link
Member

I agree with @markushi. Even though you can argue that the code tells you in your face that it sends PII, plenty of developers will blindly copy this and then get angry once they see PII in Sentry.

@kahest
Copy link
Member

kahest commented Jan 22, 2025

@HazAT

Each SDK should furthermore add a page similar to https://docs.sentry.io/platforms/python/data-management/data-collected/, listing all data collected by the SDK and pointing out what additional data is sent if sendDefaultPii: true.

We have this project #82 which captures what you describe here, IMO it makes sense to do both in tandem

@cleptric
Copy link
Member

Updated getsentry/sentry-cocoa#82 and this issue accordingly.

@andreiborza
Copy link
Member

@HazAT I already see people blindly copying this, how about having the prop commented out by default?

Something like this

Sentry.init({
dsn: "DSN",

// Uncomment if you want to see request headers and IP for users
// Visit https://docs.sentry.io/platforms/javascript/sendDefaultPii for more info
// sendDefaultPii: true,

How about putting this behind, default toggled off?

Image

@philipphofmann
Copy link
Member

That's a great idea. @andreiborza, with your approach, I would argue default toggled on is OK. I think fewer people will miss the checkbox than the default value in the code.

@HazAT
Copy link
Member Author

HazAT commented Jan 27, 2025

Let's please just add this line of code and comment and move on -> KISS
It should work when you paste it (so the code shouldn't even be commented out).

Another button means more docs, more confusion, more questions

The intention of this is to make it more obvious to our users what our SDKs can do and not make it more difficult.

@philipphofmann
Copy link
Member

@HazAT, OK I will shut up now 😄 , and I accept the decision to add the line of code 👍 because of KISS.

sentrivana added a commit to getsentry/sentry-docs that referenced this issue Jan 29, 2025
sentrivana added a commit to getsentry/sentry that referenced this issue Jan 29, 2025
…ippets (#84220)

As part of getsentry/team-sdks#121 we want to
add `send_default_pii=True` to all relevant onboarding snippets for
better out-of-the-box debugability.
andrewshie-sentry pushed a commit to getsentry/sentry that referenced this issue Jan 29, 2025
…ippets (#84220)

As part of getsentry/team-sdks#121 we want to
add `send_default_pii=True` to all relevant onboarding snippets for
better out-of-the-box debugability.
c298lee pushed a commit to getsentry/sentry that referenced this issue Jan 29, 2025
…ippets (#84220)

As part of getsentry/team-sdks#121 we want to
add `send_default_pii=True` to all relevant onboarding snippets for
better out-of-the-box debugability.
@buenaflor
Copy link

buenaflor commented Feb 11, 2025

@HazAT should the line also be part of the wizard when we patch the Sentry.init into the user code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

9 participants