Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- fix(apple): add support for synchronized Xcode folders ([#904](https://github.com/getsentry/sentry-wizard/pull/904))
- feat(react-native): Add Feedback Widget step ([#969](https://github.com/getsentry/sentry-wizard/pull/969))
- feat(react-native): More granular error reporting for RN Wizard ([#861](https://github.com/getsentry/sentry-wizard/pull/861))
- feat(Mobile): add `sendDefaultPii=true` to Mobile wizards ([#981](https://github.com/getsentry/sentry-wizard/pull/981))

## 4.8.0

Expand Down
4 changes: 4 additions & 0 deletions e2e-tests/tests/expo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ describe('Expo', () => {
Sentry.init({
dsn: 'https://[email protected]/1337',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,

// Configure Session Replay
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1,
Expand Down
4 changes: 4 additions & 0 deletions e2e-tests/tests/react-native.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ describe('ReactNative', () => {
Sentry.init({
dsn: 'https://[email protected]/1337',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,

// Configure Session Replay
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1,
Expand Down
2 changes: 2 additions & 0 deletions src/android/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const pluginKts = (version = '3.12.0') => `
export const manifest = (dsn: string) => `
<!-- Required: set your sentry.io project identifier (DSN) -->
<meta-data android:name="io.sentry.dsn" android:value="${dsn}" />
<!-- Add data like request headers, user ip address 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" />

<!-- enable automatic breadcrumbs for user interactions (clicks, swipes, scrolls) -->
<meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="true" />
Expand Down
10 changes: 10 additions & 0 deletions src/apple/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export function getSwiftSnippet(dsn: string): string {
return ` SentrySDK.start { options in
options.dsn = "${dsn}"
options.debug = true // Enabled debug when first installing is always helpful

// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: I also opened a docs PR to tell users that the data collected varies depending on platform

options.sendDefaultPii = true

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
Expand All @@ -42,6 +47,11 @@ export function getObjcSnippet(dsn: string): string {
return ` [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {
options.dsn = @"${dsn}";
options.debug = YES; // Enabled debug when first installing is always helpful

// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
options.sendDefaultPii = YES;

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = @1.0;
Expand Down
8 changes: 7 additions & 1 deletion src/flutter/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export function initSnippet(
): string {
let snippet = `await SentryFlutter.init(
(options) {
options.dsn = '${dsn}';`;
options.dsn = '${dsn}';
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/
options.sendDefaultPii = true;`;

if (selectedFeaturesMap.tracing) {
snippet += `
Expand Down Expand Up @@ -77,6 +80,9 @@ Future<void>main() async {
await SentryFlutter.init(
(options) {
options.dsn = '${dsn}';
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/
options.sendDefaultPii = true;
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
Expand Down
4 changes: 4 additions & 0 deletions src/react-native/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ export function getSentryInitPlainTextSnippet(

Sentry.init({
dsn: '${dsn}',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,
${
enableSessionReplay
? `
Expand Down
15 changes: 15 additions & 0 deletions test/apple/code-tools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
SentrySDK.start { options in
options.dsn = "https://example.com/sentry-dsn"
options.debug = true // Enabled debug when first installing is always helpful

// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
options.sendDefaultPii = true

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
Expand Down Expand Up @@ -89,6 +94,11 @@ const validAppDelegateObjCWithSentry = `@import Sentry;
[SentrySDK startWithConfigureOptions:^(SentryOptions * options) {
options.dsn = @"https://example.com/sentry-dsn";
options.debug = YES; // Enabled debug when first installing is always helpful

// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
options.sendDefaultPii = YES;

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = @1.0;
Expand Down Expand Up @@ -139,6 +149,11 @@ struct TestApp: App {
SentrySDK.start { options in
options.dsn = "https://example.com/sentry-dsn"
options.debug = true // Enabled debug when first installing is always helpful

// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
options.sendDefaultPii = true

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
Expand Down
10 changes: 10 additions & 0 deletions test/apple/templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ fi
` SentrySDK.start { options in
options.dsn = "test-dsn"
options.debug = true // Enabled debug when first installing is always helpful

// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
options.sendDefaultPii = true

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
Expand Down Expand Up @@ -157,6 +162,11 @@ fi
` [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {
options.dsn = @"test-dsn";
options.debug = YES; // Enabled debug when first installing is always helpful

// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
options.sendDefaultPii = YES;

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = @1.0;
Expand Down
9 changes: 9 additions & 0 deletions test/flutter/templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ describe('Flutter code templates', () => {
"await SentryFlutter.init(
(options) {
options.dsn = 'my-dsn';
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/
options.sendDefaultPii = true;
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
Expand Down Expand Up @@ -66,6 +69,9 @@ describe('Flutter code templates', () => {
"await SentryFlutter.init(
(options) {
options.dsn = 'my-dsn';
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/
options.sendDefaultPii = true;
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
Expand All @@ -90,6 +96,9 @@ describe('Flutter code templates', () => {
"await SentryFlutter.init(
(options) {
options.dsn = 'my-dsn';
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/
options.sendDefaultPii = true;
},
appRunner: () => runApp(SentryWidget(child: const MyApp())),
);
Expand Down
24 changes: 24 additions & 0 deletions test/react-native/javascript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: 'dsn',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,

// uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: __DEV__,
});
Expand Down Expand Up @@ -85,6 +89,10 @@ import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: 'dsn',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,

// Configure Session Replay
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1,
Expand Down Expand Up @@ -138,6 +146,10 @@ import * as Sentry from '@sentry/react-native';

Sentry.init({
dsn: 'dsn',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,
integrations: [Sentry.feedbackIntegration()],

// uncomment the line below to enable Spotlight (https://spotlightjs.com)
Expand Down Expand Up @@ -189,6 +201,10 @@ import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: 'dsn',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,

// Configure Session Replay
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1,
Expand Down Expand Up @@ -498,6 +514,10 @@ import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: 'https://sentry.io/123',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,

// uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: __DEV__,
});
Expand Down Expand Up @@ -547,6 +567,10 @@ import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: 'https://sentry.io/123',

// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,

// uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: __DEV__,
});
Expand Down
Loading