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

Use sendDefaultPii=true for Java SDK onboarding #85141

Merged
merged 5 commits into from
Feb 17, 2025

Conversation

adinauer
Copy link
Member

Closes getsentry/sentry-java#4119

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 13, 2025
@@ -64,6 +64,9 @@ const getConfigurationSnippet = (params: Params) => `
<!-- Required: set your sentry.io project identifier (DSN) -->
<meta-data android:name="io.sentry.dsn" android:value="${params.dsn.public}" />

<!-- Add data like request headers and device name, see https://docs.sentry.io/platforms/android/data-management/data-collected/ for more info -->
<meta-data android:name="io.sentry.send-default-pii" android:value="true" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also the wizard where I couldn't find any trace of the PII setting being suggested / enabled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, probably we could add send-default-pii=true to the sentry.properties created by the Wizard, commented out and with a comment above it that explains what it does (out of scope for this PR ofc).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened an issue for the wizard changes: getsentry/sentry-wizard#790

dsn=${params.dsn.public}
# Add data like request headers and IP for users,
# see https://docs.sentry.io/platforms/java/guides/log4j2/data-management/data-collected/ for more info
send-defaut-pii=true${
params.isPerformanceSelected
? `
traces-sample-rate=1.0`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still a sample without sendDefaultPii here. While it would be possible to change the SDK and add that option to the XML config I think it's better to just use sentry.properties instead as that already existed for a while and doesn't require use of a new version of the SDK.

@adinauer
Copy link
Member Author

Marked this as a draft because getsentry/sentry-docs#12704 needs to be merged first.
This is ready for review though.

@@ -64,6 +64,9 @@ const getConfigurationSnippet = (params: Params) => `
<!-- Required: set your sentry.io project identifier (DSN) -->
<meta-data android:name="io.sentry.dsn" android:value="${params.dsn.public}" />

<!-- Add data like request headers and device name, see https://docs.sentry.io/platforms/android/data-management/data-collected/ for more info -->
<meta-data android:name="io.sentry.send-default-pii" android:value="true" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, probably we could add send-default-pii=true to the sentry.properties created by the Wizard, commented out and with a comment above it that explains what it does (out of scope for this PR ofc).

Copy link

codecov bot commented Feb 14, 2025

Bundle Report

Changes will increase total bundle size by 3.83kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
app-webpack-bundle-array-push 32.92MB 3.83kB (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: app-webpack-bundle-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-5dfcad.d7b606af91c12bfcf44c.js (New) 281.42kB 281.42kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_projectDetail_index_tsx.de5eb76f3e1e2d299e9e.js (New) 95.24kB 95.24kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_performance_transactionSummary-51d702.09a79437cc35f05dde61.js (New) 37.35kB 37.35kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_insights_common_components_cha-d2aaf9.7087fd205f002ae1d588.js (New) 31.68kB 31.68kB 100.0% 🚀
chunks/app_components_charts_eventsRequest_tsx-app_components_feedback_widget_us*kWidget_tsx--fbb1b9.eba25a9fd9bd09ff6b90.js (New) 31.18kB 31.18kB 100.0% 🚀
chunks/app_gettingStartedDocs_java_spring_tsx.*.js 718 bytes 27.46kB 2.69%
chunks/app_gettingStartedDocs_java_spring-boot_tsx.*.js 720 bytes 25.44kB 2.91%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-feae7d.82d4ee6b1ab3b3a06a25.js (New) 24.18kB 24.18kB 100.0% 🚀
chunks/app_gettingStartedDocs_android_android_tsx.*.js 589 bytes 22.79kB 2.65%
chunks/app_gettingStartedDocs_java_logback_tsx.*.js 937 bytes 20.45kB 4.8%
chunks/app_gettingStartedDocs_java_log4j2_tsx.*.js 520 bytes 19.62kB 2.72%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-c5fefe.3920d4bf14f7e43ed578.js (New) 17.29kB 17.29kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_gridEditable_sortLink_tsx-d372f4.2245c81bca067c4d36c7.js (New) 16.21kB 16.21kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-f61270.e98d36d104d6c3d09a68.js (New) 13.36kB 13.36kB 100.0% 🚀
chunks/app_components_charts_lineChart_tsx-app_components_feedback_widget_us*kWidget_tsx-app_-26fc43.9dbf6dec96ad82fa840e.js (New) 12.32kB 12.32kB 100.0% 🚀
chunks/app_gettingStartedDocs_java_java_tsx.*.js 344 bytes 10.17kB 3.5%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-5dfcad.c91957931ea475eda61f.js (Deleted) -281.42kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_projectDetail_index_tsx.76b513faf87efe743aea.js (Deleted) -95.24kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_performance_transactionSummary-51d702.88c610d08ebd05fa6975.js (Deleted) -37.35kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_insights_common_components_cha-d2aaf9.b58a2aad92e98332e33d.js (Deleted) -31.68kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_eventsRequest_tsx-app_components_feedback_widget_us*kWidget_tsx--fbb1b9.1d2a1acdbea38441e849.js (Deleted) -31.18kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-feae7d.deec6d6df655e4555ab9.js (Deleted) -24.18kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-c5fefe.a26270d3c2a1173ea1e7.js (Deleted) -17.29kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_gridEditable_sortLink_tsx-d372f4.98c9db67a14bf0d54242.js (Deleted) -16.21kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-f61270.4b955ae7f1c8663687f4.js (Deleted) -13.36kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_lineChart_tsx-app_components_feedback_widget_us*kWidget_tsx-app_-26fc43.1f9053452c6e206f68c8.js (Deleted) -12.32kB 0 bytes -100.0% 🗑️

Files in chunks/app_gettingStartedDocs_java_spring_tsx.*.js:

  • ./app/gettingStartedDocs/java/java.tsx → Total Size: 11.48kB

  • ./app/gettingStartedDocs/java/spring.tsx → Total Size: 12.49kB

Files in chunks/app_gettingStartedDocs_java_spring-boot_tsx.*.js:

  • ./app/gettingStartedDocs/java/java.tsx → Total Size: 11.48kB

  • ./app/gettingStartedDocs/java/spring-boot.tsx → Total Size: 9.85kB

Files in chunks/app_gettingStartedDocs_android_android_tsx.*.js:

  • ./app/gettingStartedDocs/android/android.tsx → Total Size: 11.91kB

  • ./app/gettingStartedDocs/java/java.tsx → Total Size: 11.48kB

Files in chunks/app_gettingStartedDocs_java_logback_tsx.*.js:

  • ./app/gettingStartedDocs/java/java.tsx → Total Size: 11.48kB

  • ./app/gettingStartedDocs/java/logback.tsx → Total Size: 12.35kB

Files in chunks/app_gettingStartedDocs_java_log4j2_tsx.*.js:

  • ./app/gettingStartedDocs/java/log4j2.tsx → Total Size: 11.56kB

  • ./app/gettingStartedDocs/java/java.tsx → Total Size: 11.48kB

Files in chunks/app_gettingStartedDocs_java_java_tsx.*.js:

  • ./app/gettingStartedDocs/java/java.tsx → Total Size: 11.48kB

Copy link
Member

@kahest kahest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you @adinauer

@kahest kahest requested a review from markushi February 17, 2025 09:36
@adinauer adinauer marked this pull request as ready for review February 17, 2025 13:32
@adinauer adinauer requested a review from a team as a code owner February 17, 2025 13:32
@adinauer adinauer enabled auto-merge (squash) February 17, 2025 13:32
@adinauer adinauer merged commit feb529e into master Feb 17, 2025
42 checks passed
@adinauer adinauer deleted the feat/java-onboarding-default-pii branch February 17, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use sendDefaultPii=true in docs and in product getting started guide
4 participants