Skip to content

Commit

Permalink
Merge branch 'master' into fix-sdk-getting-started
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanie-anderson committed Mar 7, 2025
2 parents 812fc01 + 074644f commit b55118f
Show file tree
Hide file tree
Showing 17 changed files with 286 additions and 123 deletions.
8 changes: 4 additions & 4 deletions docs/platforms/android/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ When set to `true`, the SDK will send session events to Sentry. This is supporte

</ConfigKey>

<ConfigKey name="in-app-include">
<ConfigKey name="in-app-includes">

A list of string prefixes of module names that belong to the app. This option takes precedence over `in-app-exclude`.
A list of string prefixes of module names that belong to the app. This option takes precedence over `in-app-excludes`.

Sentry differentiates stack frames that are directly related to your application ("in application") from stack frames that come from other packages such as the standard library, frameworks, or other dependencies. The application package is automatically marked as `inApp`. The difference is visible in [sentry.io](https://sentry.io), where only the "in application" frames are displayed by default.

</ConfigKey>

<ConfigKey name="in-app-exclude">
<ConfigKey name="in-app-excludes">

A list of string prefixes of module names that do not belong to the app, but rather to third-party packages. Modules considered not part of the app will be hidden from stack traces by default.

This option can be overridden using <PlatformIdentifier name="in-app-include" />.
This option can be overridden using <PlatformIdentifier name="in-app-includes" />.

</ConfigKey>

Expand Down
73 changes: 40 additions & 33 deletions docs/platforms/apple/common/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ To capture all errors, initialize the SDK as soon as possible, such as in your `

<PlatformSection notSupported={["apple.tvos", "apple.watchos", "apple.visionos"]}>

```swift {tabTitle:Swift} {"onboardingOptions": {"performance": "9-12", "profiling": "14-24"}}
```swift {tabTitle:Swift} {"onboardingOptions": {"performance": "13-16", "profiling": "18-28"}}
import Sentry

func application(_ application: UIApplication,
Expand All @@ -97,13 +97,13 @@ func application(_ application: UIApplication,
options.dsn = "___PUBLIC_DSN___"
options.debug = true // Enabled debug when first installing is always helpful

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0

// 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
}

// Manually call startProfiler and stopProfiler to profile any code that runs in between.
Expand All @@ -121,7 +121,7 @@ func application(_ application: UIApplication,
}
```

```objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "8-11", "profiling": "13-23"}}
```objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "12-15", "profiling": "17-27"}}
@import Sentry;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
Expand All @@ -130,13 +130,13 @@ func application(_ application: UIApplication,
options.dsn = @"___PUBLIC_DSN___";
options.debug = YES; // Enabled debug when first installing is always helpful

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = @1.0;

// 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;
}];

// Manually call startProfiler and stopProfiler to profile any code that runs in between.
Expand All @@ -154,7 +154,7 @@ func application(_ application: UIApplication,
}
```

```swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "9-12", "profiling": "13-16"}}
```swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "13-16", "profiling": "18-28"}}
import Sentry

@main
Expand All @@ -164,26 +164,33 @@ struct SwiftUIApp: App {
options.dsn = "___PUBLIC_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
}

// Sample rate for profiling, applied on top of TracesSampleRate.
// We recommend adjusting this value in production.
options.profilesSampleRate = 1.0
// Manually call startProfiler and stopProfiler to profile any code that runs in between.
SentrySDK.startProfiler()

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

// Calls to stopProfiler are optional - if you don't stop the profiler, it will keep profiling
// your application until the process exits, the app goes to the background, or stopProfiling is called.
SentrySDK.stopProfiler()
}
}
```
</PlatformSection>

<PlatformSection notSupported={["apple.ios", "apple.macos"]}>

```swift {tabTitle:Swift} {"onboardingOptions": {"performance": "9-12"}}
```swift {tabTitle:Swift} {"onboardingOptions": {"performance": "13-16"}}
import Sentry

func application(_ application: UIApplication,
Expand All @@ -193,20 +200,20 @@ func application(_ application: UIApplication,
options.dsn = "___PUBLIC_DSN___"
options.debug = true // Enabled debug when first installing is always helpful

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0

// 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
}

return true
}
```

```objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "8-11"}}
```objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "12-15"}}
@import Sentry;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
Expand All @@ -215,20 +222,20 @@ func application(_ application: UIApplication,
options.dsn = @"___PUBLIC_DSN___";
options.debug = YES; // Enabled debug when first installing is always helpful

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = @1.0;

// 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;
}];

return YES;
}
```

```swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "9-12"}}
```swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "13-16"}}
import Sentry

@main
Expand All @@ -238,13 +245,13 @@ struct SwiftUIApp: App {
options.dsn = "___PUBLIC_DSN___"
options.debug = true // Enabled debug when first installing is always helpful

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0

// 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
16 changes: 9 additions & 7 deletions docs/platforms/dart/guides/flutter/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ brew install getsentry/tools/sentry-wizard && sentry-wizard -i flutter
npx @sentry/wizard@latest -i flutter
```

[Sentry Wizard](https://github.com/getsentry/sentry-wizard) will patch your project accordingly, though you can [set up manually](/platforms/dart/guides/flutter/manual-setup/) if you prefer. You only need to patch the project once. Then you can add the patched files to your version control system.

[Sentry Wizard](https://github.com/getsentry/sentry-wizard) will patch your project accordingly, though you can [set up manually](/platforms/dart/guides/flutter/manual-setup/) if you prefer. You only need to patch the project once. Then you can add the patched files to your version control system.

<Expandable title="The following tasks will be performed by the Sentry Wizard">

Expand All @@ -62,24 +61,24 @@ npx @sentry/wizard@latest -i flutter

Configuration should happen as early as possible in your application's lifecycle.

```dart {"onboardingOptions": {"performance": "8-10", "profiling": "11-14"}}
```dart {"onboardingOptions": {"performance": "11-13", "profiling": "14-17"}}
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn = '___PUBLIC_DSN___';
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/ for more info
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;
// The sampling rate for profiling is relative to tracesSampleRate
// Setting to 1.0 will profile 100% of sampled transactions:
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
options.profilesSampleRate = 1.0;
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/ for more info
options.sendDefaultPii = true;
},
appRunner: () => runApp(
SentryWidget(
Expand All @@ -93,7 +92,7 @@ Future<void> main() async {
}
```

```dart {tabTitle:With custom zone} {"onboardingOptions": {"performance": "16-18", "profiling": "19-22"}}
```dart {tabTitle:With custom zone} {"onboardingOptions": {"performance": "19-21", "profiling": "22-25"}}
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
Expand All @@ -109,6 +108,9 @@ Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn = '___PUBLIC_DSN___';
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/ for more info
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
13 changes: 8 additions & 5 deletions docs/platforms/dart/guides/flutter/manual-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ dependencies:
Configuration should happen as early as possible in your application's lifecycle.
```dart {"onboardingOptions": {"performance": "8-10", "profiling": "11-14"}}
```dart {"onboardingOptions": {"performance": "11-13", "profiling": "14-17"}}
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn = '___PUBLIC_DSN___';
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/ for more info
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;
// The sampling rate for profiling is relative to tracesSampleRate
// Setting to 1.0 will profile 100% of sampled transactions:
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
options.profilesSampleRate = 1.0;
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/ for more info
options.sendDefaultPii = true;
},
appRunner: () => runApp(
SentryWidget(
Expand All @@ -58,7 +58,7 @@ Future<void> main() async {
}
```

```dart {tabTitle:With custom zone} {"onboardingOptions": {"performance": "16-18", "profiling": "19-22"}}
```dart {tabTitle:With custom zone} {"onboardingOptions": {"performance": "19-21", "profiling": "22-25"}}
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
Expand All @@ -74,6 +74,9 @@ Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn = '___PUBLIC_DSN___';
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides//data-management/data-collected/ for more info
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
10 changes: 5 additions & 5 deletions docs/platforms/dart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori

<Alert>

Sentry provides a dedicated [Flutter SDK](/platforms/dart/guides/flutter) as well.
Sentry provides a dedicated [Flutter SDK](/platforms/dart/guides/flutter) as well.

</Alert>

Expand All @@ -51,18 +51,18 @@ dependencies:
To capture all errors, initialize the Sentry Dart SDK as soon as possible.
```dart {"onboardingOptions": {"performance": "6-8"}}
```dart {"onboardingOptions": {"performance": "9-11"}}
import 'package:sentry/sentry.dart';

Future<void> main() async {
await Sentry.init((options) {
options.dsn = '___PUBLIC_DSN___';
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/data-management/data-collected/ for more info
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;
});

// you can also configure SENTRY_DSN, SENTRY_RELEASE, SENTRY_DIST, and
Expand Down
8 changes: 4 additions & 4 deletions docs/platforms/java/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ Most SDKs will attempt to auto-discover this value.

</ConfigKey>

<ConfigKey name="in-app-include">
<ConfigKey name="in-app-includes">

A list of string prefixes of module names that belong to the app. This option takes precedence over `in-app-exclude`.
A list of string prefixes of module names that belong to the app. This option takes precedence over `in-app-excludes`.

Sentry differentiates stack frames that are directly related to your application ("in application") from stack frames that come from other packages such as the standard library, frameworks, or other dependencies. The application package is automatically marked as `inApp`. The difference is visible in [sentry.io](https://sentry.io), where only the "in application" frames are displayed by default.

</ConfigKey>

<ConfigKey name="in-app-exclude">
<ConfigKey name="in-app-excludes">

A list of string prefixes of module names that do not belong to the app, but rather to third-party packages. Modules considered not part of the app will be hidden from stack traces by default.

This option can be overridden using <PlatformIdentifier name="in-app-include" />.
This option can be overridden using <PlatformIdentifier name="in-app-includes" />.

</ConfigKey>

Expand Down
8 changes: 4 additions & 4 deletions docs/platforms/javascript/guides/capacitor/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Configuration should happen as early as possible in your application's lifecycle
Then forward the `init` method from the sibling Sentry SDK for the framework you use, such as Angular in this example:


```typescript {tabTitle: Angular 14+} {filename: app.module.ts} {"onboardingOptions": {"performance": "13-16, 21-27, 50-59", "session-replay": "17-19, 31-37"}}
```typescript {tabTitle: Angular 14+} {filename: app.module.ts} {"onboardingOptions": {"performance": "13-16, 21-30, 50-59", "session-replay": "17-19, 31-37"}}
import * as Sentry from "@sentry/capacitor";
import * as SentryAngular from "@sentry/angular";

Expand Down Expand Up @@ -155,7 +155,7 @@ Sentry.init(
})
```

```typescript {tabTitle: Angular 12, 13} {filename: app.module.ts} {"onboardingOptions": {"performance": "14-17, 22-28, 51-60", "session-replay": "18-20, 33-38"}}
```typescript {tabTitle: Angular 12, 13} {filename: app.module.ts} {"onboardingOptions": {"performance": "14-17, 22-31, 51-60", "session-replay": "18-20, 32-38"}}
// Requires @sentry/capacitor V0.
import * as Sentry from "@sentry/capacitor";
import * as SentryAngular from "@sentry/angular-ivy";
Expand Down Expand Up @@ -220,7 +220,7 @@ Sentry.init(
})
```

```typescript {tabTitle: React} {filename: index.tsx} {"onboardingOptions": {"performance": "13-16, 21-27, 46-55", "session-replay": "17-19, 31-37"}}
```typescript {tabTitle: React} {filename: index.tsx} {"onboardingOptions": {"performance": "13-16, 21-30, 46-55", "session-replay": "17-19, 29-37"}}
import * as Sentry from "@sentry/capacitor";
import * as SentryReact from "@sentry/react";

Expand Down Expand Up @@ -264,7 +264,7 @@ Sentry.init(
);
```

```typescript {tabTitle: Vue} {filename: main.ts} {"onboardingOptions": {"performance": "17-20, 25-31, 50-59", "session-replay": "21-23, 35-41"}}
```typescript {tabTitle: Vue} {filename: main.ts} {"onboardingOptions": {"performance": "17-20, 25-34, 50-59", "session-replay": "21-23, 33-41"}}
import * as Sentry from "@sentry/capacitor";
import * as SentryVue from "@sentry/vue";
import { createApp } from 'vue'
Expand Down
Loading

0 comments on commit b55118f

Please sign in to comment.