From 66a676716583253fe074c257399f07c0b859930d Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Thu, 27 Nov 2025 14:01:30 +0100 Subject: [PATCH 1/9] feat(apple): Migration Guide for V9 Add the migration guide for major version v9. --- .../apple/common/configuration/app-hangs.mdx | 6 +- .../apple/common/migration/index.mdx | 121 +++++++++++++++++- .../apple/common/profiling/index.mdx | 20 +-- 3 files changed, 133 insertions(+), 14 deletions(-) diff --git a/docs/platforms/apple/common/configuration/app-hangs.mdx b/docs/platforms/apple/common/configuration/app-hangs.mdx index e5a95ce47f277..f860c7e35f87c 100644 --- a/docs/platforms/apple/common/configuration/app-hangs.mdx +++ b/docs/platforms/apple/common/configuration/app-hangs.mdx @@ -134,11 +134,11 @@ SentrySDK.resumeAppHangTracking() ### App Hangs V2 -As of version 8.50.0, you can enable AppHangsV2, which is available on iOS and tvOS. The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking app hangs, which you might choose to ignore, and measures the duration of app hangs. A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. A non-fully-blocking app hang is when the app appears stuck to the user, but can still render a few frames. Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the main thread. Non-fully-blocking app hangs can have a stacktrace that doesn't highlight the exact blocking location, since the main thread isn't completely blocked. +As of version 8.50.0, you can enable AppHangsV2, which is available on iOS and tvOS. **Starting with version 9.0.0, App Hangs V2 is enabled by default.** The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking app hangs, which you might choose to ignore, and measures the duration of app hangs. A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. A non-fully-blocking app hang is when the app appears stuck to the user, but can still render a few frames. Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the main thread. Non-fully-blocking app hangs can have a stacktrace that doesn't highlight the exact blocking location, since the main thread isn't completely blocked. The SDK sets the `exception.type` to `App Hang Fully Blocked` or `App Hang Non Fully Blocked`, so you can filter for App Hangs via `error.type` in Sentry. -To enable the feature: +To enable the feature in version 8.50.0 and later (enabled by default starting with 9.0.0): ```swift {tabTitle:Swift} import Sentry @@ -190,7 +190,7 @@ SentrySDK.start { options in -The SDK supports App Hang Rate calculation starting with version 8.50.0. Additionally, you have to enable App Hangs V2 via `options.enableAppHangTrackingV2 = true` in your SDK configuration. +The SDK supports App Hang Rate calculation starting with version 8.50.0. For versions 8.50.0 to 8.x, you have to enable App Hangs V2 via `options.enableAppHangTrackingV2 = true` in your SDK configuration. **Starting with version 9.0.0, App Hangs V2 is enabled by default.** diff --git a/docs/platforms/apple/common/migration/index.mdx b/docs/platforms/apple/common/migration/index.mdx index f529d3aaa96ae..075c709d161cd 100644 --- a/docs/platforms/apple/common/migration/index.mdx +++ b/docs/platforms/apple/common/migration/index.mdx @@ -3,7 +3,126 @@ title: Migration Guide sidebar_order: 8000 --- -To upgrade from version 4.x of the SDK to version 8.x of the SDK, you must first migrate from 4.x to 5.x, then 5.x to 6.x, then 6.x to 7.x, and finally from 7.x to 8.x. +To upgrade from version 4.x of the SDK to version 9.x of the SDK, you must first migrate from 4.x to 5.x, then 5.x to 6.x, then 6.x to 7.x, 7.x to 8.x, and finally from 8.x to 9.x. + +## Migrating From 8.x to 9.x + +Migrating to 9.x from 8.x includes several breaking changes. We provide this guide to help you update your SDK. + +### Changes to Minimum OS Versions and Xcode + +We bumped the minimum supported OS versions to: +- **iOS**: 15.0 (previously 11.0) +- **macOS**: 10.14 (previously 10.13) +- **tvOS**: 15.0 (previously 11.0) +- **visionOS**: 1.0 (unchanged) +- **watchOS**: 8.0 (previously 4.0) + +We now build the precompiled XCFramework with **Xcode 16**. To submit to the App Store, Apple now requires Xcode 16. If you need a precompiled XCFramework built with Xcode 15, continue using Sentry SDK 8.x.x. + +Additionally, the Package.swift sets `swift-tools-version` to 6.0. + +### Features Enabled by Default + +We now enabled the following features by default: + +- **Performance V2 is enabled by default**: The app start duration now finishes when the first frame is drawn instead of when the OS posts the `UIWindowDidBecomeVisibleNotification`. We removed the `enablePerformanceV2` option. +- **Pre-warmed app start tracking**: The SDK now collects pre-warmed app starts by default via `enablePreWarmedAppStartTracing`. +- App hang tracking V2: This is now the default and we removed the option to enable/disable it. + +### Disable App Hang Tracking for Extensions + +We now automatically disable app hang tracking for: Widgets, Live Activities, Action Extensions, (Siri) Intent Extensions, Share Extensions. These components run in separate processes or sandboxes with different execution characteristics, which can cause false positive app hang reports. + +### Structured Logging + +We moved structured logging options out of experimental and made them part of the main API. We added log APIs to `Hub` and `Client`, and logs now include a `sentry.replay_id` attribute. + +#### HTTP Client Errors + +HTTP client errors now mark sessions as errored. This provides better visibility into failed network requests in your release health data. + +### Profiling Changes + +We removed all deprecated profiling APIs in version 9.0.0. The only supported profiling method is now UI Profiling (also known as continuous V2 profiling), which was introduced in version 8.49.0. + +**Removed deprecated profiling options from `SentryOptions`:** +- `profilesSampleRate` - used for transaction-based profiling (deprecated) +- `profilesSampler` - used for transaction-based profiling (deprecated) +- `enableAppLaunchProfiling` - used for launch profiling (deprecated) + +**Migration to UI Profiling:** + +If you were using any of the deprecated profiling options, you need to migrate to UI Profiling. Configure profiling by assigning a closure to `SentryOptions.configureProfiling`: + +```swift +import Sentry + +SentrySDK.start { options in + options.dsn = "___PUBLIC_DSN___" + options.configureProfiling = { + $0.sessionSampleRate = 1 + $0.lifecycle = .manual // or .trace for trace-based lifecycle + } +} +``` + +For more information, see the UI Profiling documentation. + +### Breaking Changes + +#### Option Changes + +- `enableFileManagerSwizzling` is now a top-level non-experimental option and remains disabled by default. +- `enableDataSwizzling` is now a top-level option and is enabled by default. +- We increased the maximum attachment size to 200MB (previously 20MB) +- We removed the following methods and properties: + - `inAppExclude` (it had no effect) + - `integrations` + - `defaultIntegrations()` + - `enableTracing` (use `tracesSampleRate` or `tracesSampler` instead) + - `getStoreEndpoint()` + +#### Behavioral Breaking Changes + +- The default trace context status is now `ok` instead of `undefined`. +- The `function` property on `SentryFrame` now defaults to `nil` instead of `""` +- The `value` and `type` properties on `SentryException` are now nullable; when `NSException` has no reason, `type` is set to `nil` + +#### Renamed APIs + +- We renamed `SentryStructuredLogLevel` to `SentryLogLevel` +- We renamed `SentryStructuredLogAttribute` to `SentryLogAttribute` + +#### Removed APIs + +- We removed the `segment` property from `SentryTraceContext`, `SentryUser`, and `SentryBaggage` +- We removed the initializers from `SentryTraceContext` +- We removed `SentryDsn.getHash()` +- We removed `SentryFrame.instruction` + +We removed the following deprecated APIs: + +- `SentrySpan.setExtraValue(_:forKey:)` +- User feedback API (use the new feedback API instead) +- `Scope.useSpan()` (use `Scope.span` instead) +- `SentryDebugMeta.uuid` (use `debugID` instead) +- `SentryDebugMeta.name` (use `codeFile` instead) + +We made the following classes and APIs private: + +- `SentryEventDecoder` and `SentryEventDecodable` +- `SentryEnvelopeItemHeader` +- `SentryIntegrationProtocol` +- `SentrySession` +- `SentrySDKInfo` +- `SentryDebugImageProvider` + +#### Other breaking changes + +- We made the following classes `final`: `PreviewRedactOptions`, `SentryProfileOptions`, `SentryRedactViewHelper`, `SentryViewScreenshotOptions`, `SentryReplayOptions`, `SentryUserFeedbackConfiguration`, `SentryUserFeedbackFormConfiguration`, `SentryUserFeedbackThemeConfiguration`, `SentryUserFeedbackWidgetConfiguration`, `SentryFeedback`, and `SentryExperimentalOptions` + +For a complete list of changes, see the [Changelog of version 9.0.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.0.0) ## Migrating From 7.x to 8.x diff --git a/docs/platforms/apple/common/profiling/index.mdx b/docs/platforms/apple/common/profiling/index.mdx index 6971b0f2949f8..edddae3c60323 100644 --- a/docs/platforms/apple/common/profiling/index.mdx +++ b/docs/platforms/apple/common/profiling/index.mdx @@ -20,7 +20,7 @@ notSupported: -UI Profiling was introduced in SDK version 8.49.0. All prior profiling API are deprecated and will be removed in a future major version of the SDK. +UI Profiling was introduced in SDK version 8.49.0. All prior profiling APIs were removed in version 9.0.0. @@ -48,7 +48,7 @@ SentrySDK.start { options in }]; ``` -By default, `sessionSampleRate` is `0`, so you'll need to set it to a higher value to receive profile data. `sessionSampleRate` is evaluated once per user session and applies to any attempt to start a profile until the next user session starts. See user session documentation for more information on user sessions. +By default, `sessionSampleRate` is `0`, so you'll need to set it to a higher value to receive profile data. `sessionSampleRate` is evaluated once per user session and applies to any attempt to start a profile until the next user session starts. See user session documentation for more information on user sessions. See the subsections below to learn about the various ways the profiler can be started and stopped. @@ -74,7 +74,7 @@ var tableView: UITableView! DispatchQueue.main.async { self.tableView.performBatchUpdates { // update table view with model - } completion: { finished in + } completion: { finished in SentrySDK.stopProfiler() } } @@ -124,7 +124,7 @@ Check out the tracing setup documentationTime to Initial Display (TTID)/Time to Full Display (TTFD) tracking is enabled, when the SDK determines that TTID/TTFD has been reached. @@ -136,11 +136,11 @@ The SDK must have been started with a call to `SentrySDK.startWithOptions` in or Every time `SentrySDK.startWithOptions` is called with app start profiling configured, a separate sample decision is generated with `sessionSampleRate` and stored until the next app launch (as well as `tracesSampleRate` if trace profile lifecycle is configured). The same sample decision will apply for the remainder of the profile session following that subsequent launch. -## Transaction-based Profiling (deprecated) +## Transaction-based Profiling (removed in 9.0.0) -Profiling configuration, explained below, was originally introduced in SDK version `8.12.0`. It is now deprecated in favor of UI Profiling, introduced in 8.49.0. +Transaction-based profiling configuration, explained below, was originally introduced in SDK version 8.12.0 and was removed in version 9.0.0. Use UI Profiling instead, which was introduced in version 8.49.0. @@ -172,11 +172,11 @@ SentrySDK.start { options in }]; ``` -## Launch Profiling (deprecated) +## Launch Profiling (removed in 9.0.0) -Launch profiling configuration, explained below, was originally introduced in SDK version 8.21.0. It is now deprecated in favor of UI Profiling, released in 8.49.0. +Launch profiling configuration, explained below, was originally introduced in SDK version 8.21.0 and was removed in version 9.0.0. Use UI Profiling instead, which was released in version 8.49.0. @@ -210,11 +210,11 @@ SentrySDK.start { options in }]; ``` -## Continuous Profiling Beta (deprecated) +## Continuous Profiling Beta (removed in 9.0.0) -Continuous Profiling Beta, explained below, was originally introduced in SDK version 8.36.0. It is now deprecated in favor of UI Profiling, released in 8.49.0. +Continuous Profiling Beta, explained below, was originally introduced in SDK version 8.36.0 and was removed in version 9.0.0. Use UI Profiling instead, which was released in version 8.49.0. From 9dcdb3ea00b22e1a7727870bcb52e3b10fc5c0ea Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Thu, 27 Nov 2025 15:45:11 +0100 Subject: [PATCH 2/9] minor fixes --- docs/platforms/apple/common/migration/index.mdx | 3 ++- .../instrumentation/automatic-instrumentation.mdx | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/platforms/apple/common/migration/index.mdx b/docs/platforms/apple/common/migration/index.mdx index 075c709d161cd..aae4eca8ad3ef 100644 --- a/docs/platforms/apple/common/migration/index.mdx +++ b/docs/platforms/apple/common/migration/index.mdx @@ -82,6 +82,7 @@ For more information, see the ) when using SwiftUI, which is from when starting the Cocoa SDK to the [`didFinishLaunchingNotification`][didfinishlaunching]. -- **Initial Frame Render**: from the [`didFinishLaunchingNotification`][didfinishlaunching] to [`UIWindowDidBecomeVisibleNotification`][uiwindow]. When enabling the option `enablePerformanceV2` this is from the [`didFinishLaunchingNotification`][didfinishlaunching] until the app renders its first frame. +- **Initial Frame Render**: from the [`didFinishLaunchingNotification`][didfinishlaunching] until the app renders its first frame. **Starting with version 9.0.0, this is the default behavior.** In versions prior to 9.0.0, this measured until [`UIWindowDidBecomeVisibleNotification`][uiwindow] unless you enabled the `enablePerformanceV2` option. ![App Start Transaction](./img/app-start-transaction.png) @@ -126,7 +126,7 @@ Cold and warm start are Mobile Vitals, which you can learn about in the [full do ### Prewarmed App Start Tracing -Starting with iOS 15, the operating system might [prewarm](https://developer.apple.com/documentation/uikit/app_and_environment/responding_to_the_launch_of_your_app/about_the_app_launch_sequence#3894431) your app by creating the process before the user opens it. Enable the `enablePreWarmedAppStartTracing` feature to collect prewarmed app starts, which will be enabled by default in V9. +Starting with iOS 15, the operating system might [prewarm](https://developer.apple.com/documentation/uikit/app_and_environment/responding_to_the_launch_of_your_app/about_the_app_launch_sequence#3894431) your app by creating the process before the user opens it. **Starting with version 9.0.0, the SDK collects prewarmed app starts by default.** For versions prior to 9.0.0, enable the `enablePreWarmedAppStartTracing` feature to collect prewarmed app starts. When the OS prewarms your app process, it already does some of the initialization steps of a normal app start before the user taps the app icon. This can be anywhere from seconds to minutes or hours before your app is fully launched. Therefore, the SDK doesn't add the **Pre Runtime Init** and the **Runtime Init to Pre Main Initializers** spans. This approach shortens the app start duration, but it represents the time from when a user clicks the app icon to when the app is responsive. @@ -139,14 +139,14 @@ With this feature, the SDK differentiates between four different app start types You can filter for different app start types in [Discover](/product/explore/discover-queries/) with `app_start_type:cold.prewarmed`, `app_start_type:warm.prewarmed`, `app_start_type:cold`, and `app_start_type:warm`. -To enable prewarmed app start tracing: +To enable prewarmed app start tracing (only needed for versions prior to 9.0.0): ```swift {tabTitle:Swift} import Sentry SentrySDK.start { options in options.dsn = "___PUBLIC_DSN___" - options.enablePreWarmedAppStartTracing = true + options.enablePreWarmedAppStartTracing = true // Enabled by default in 9.0.0+ } ``` @@ -155,7 +155,7 @@ SentrySDK.start { options in [SentrySDK startWithConfigureOptions:^(SentryOptions *options) { options.dsn = @"___PUBLIC_DSN___"; - options.enablePreWarmedAppStartTracing = YES; + options.enablePreWarmedAppStartTracing = YES; // Enabled by default in 9.0.0+ }]; ``` From 95b77219d1bee8c4c25cb2ded82db0fc8439ff7c Mon Sep 17 00:00:00 2001 From: Sigrid <32902192+s1gr1d@users.noreply.github.com> Date: Thu, 27 Nov 2025 12:31:12 +0100 Subject: [PATCH 3/9] docs(profiling): Add docs for UI profiling (Browser JS) (#15611) ## DESCRIBE YOUR PR Adds docs for the new UI Profiling APIs in the browser. part of https://github.com/getsentry/sentry-javascript/issues/17279 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): - [ ] Other deadline: - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --- .../profiles/continuous-profiling-api.mdx | 2 +- docs/platforms/android/profiling/index.mdx | 2 +- .../platforms/java/common/profiling/index.mdx | 4 +- .../common/configuration/options.mdx | 31 ++++++++++++- .../javascript/guides/astro/index.mdx | 5 +-- docs/platforms/python/profiling/index.mdx | 2 +- .../explore/profiling/getting-started.mdx | 5 ++- .../_default.mdx | 9 ++-- .../javascript.angular.mdx | 9 ++-- .../javascript.astro.mdx | 9 ++-- .../javascript.nextjs.mdx | 9 ++-- .../javascript.nuxt.mdx | 9 ++-- .../javascript.react.mdx | 9 ++-- .../javascript.remix.mdx | 9 ++-- .../javascript.svelte.mdx | 9 ++-- .../javascript.sveltekit.mdx | 9 ++-- .../javascript.vue.mdx | 9 ++-- .../browser-profiling/javascript.mdx | 45 +++++++++++++++++-- .../profiling/node-profiling/javascript.mdx | 2 +- 19 files changed, 113 insertions(+), 75 deletions(-) diff --git a/develop-docs/sdk/telemetry/profiles/continuous-profiling-api.mdx b/develop-docs/sdk/telemetry/profiles/continuous-profiling-api.mdx index 4304a7a5a0eb1..2eab84371d60d 100644 --- a/develop-docs/sdk/telemetry/profiles/continuous-profiling-api.mdx +++ b/develop-docs/sdk/telemetry/profiles/continuous-profiling-api.mdx @@ -74,7 +74,7 @@ Those are the two modes: - **`'trace'`**: **This mode requires tracing to be enabled.** The profiler starts automatically when there is at least one active root span and stops when there are no active root spans (letting the current chunk completely finish). - Profiling respects **both** `profile_session_sample_rate` and the tracing sampling configuration (`traces_sample_rate` or `traces_sampler`). - `profile_session_sample_rate` is checked first. If the session is not sampled, no profiling will occur. - - If the session is sampled, `traces_sample_rate` / `traces_sampler` is evaluated for each root span to determine if it should be profiled. + - Only if a root span is sampled (this is based on `traces_sample_rate` / `traces_sampler`), profiling will start. Therefore, profile sampling is re-evaluated for each root span. - The profiler runs as long as there is at least one **sampled** root span. If multiple root spans overlap, profiling continues until the last sampled root span finishes. diff --git a/docs/platforms/android/profiling/index.mdx b/docs/platforms/android/profiling/index.mdx index 4f243fe23ada9..7ec1a4cc161b2 100644 --- a/docs/platforms/android/profiling/index.mdx +++ b/docs/platforms/android/profiling/index.mdx @@ -19,7 +19,7 @@ The transaction-based profiler is available on SDK versions `6.16.0` and higher ## Enabling UI Profiling -UI Profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time. +UI Profiling supports two modes: `manual` and `trace`. These modes are mutually exclusive and cannot be used at the same time. In `manual` mode, the profiling data collection can be managed via calls to `Sentry.profiler.startProfiler` and `Sentry.profiler.stopProfiler`. You are entirely in the in control of when the profiler runs. diff --git a/docs/platforms/java/common/profiling/index.mdx b/docs/platforms/java/common/profiling/index.mdx index 52a38e4b9d0ae..6e6f873d7070d 100644 --- a/docs/platforms/java/common/profiling/index.mdx +++ b/docs/platforms/java/common/profiling/index.mdx @@ -37,7 +37,7 @@ implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sent ## Enabling Continuous Profiling -Continuous profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time. +Continuous Profiling supports two modes: `manual` and `trace`. These modes are mutually exclusive and cannot be used at the same time. In `manual` mode, the profiling data collection can be managed via calls to `Sentry.startProfiler()` and `Sentry.stopProfiler()`. You are entirely in control of when the profiler runs. @@ -61,5 +61,5 @@ Continuous profiling for Java is currently supported on: - macOS - Linux -The profiler uses [async-profiler](https://github.com/async-profiler/async-profiler) under the hood to collect profiling data. +The profiler uses [async-profiler](https://github.com/async-profiler/async-profiler) under the hood to collect profiling data. diff --git a/docs/platforms/javascript/common/configuration/options.mdx b/docs/platforms/javascript/common/configuration/options.mdx index 803953482d120..a27b47d8a0666 100644 --- a/docs/platforms/javascript/common/configuration/options.mdx +++ b/docs/platforms/javascript/common/configuration/options.mdx @@ -548,12 +548,41 @@ The sample rate for replays that are recorded when an error happens. This type o ## Profiling Options + + + A number between `0` and `1` that sets the percentage of how many sessions should have profiling enabled. `1.0` enables profiling in every session, `0.5` enables profiling for 50% of the sessions, and `0` enables it for none. The sampling decision is made once at the beginning of a session. This option is required to enable profiling. + + + In a server environment, a profiling session starts when the Sentry SDK is initialized and stops when the service terminates. + Therefore, the sampling decision is re-evaluated on service restart or redeployment. + + + + In a browser environment, a profiling session corresponds to a user session. A user session starts with a + new SDK initialization on page load and ends when the browser tab is closed. + + + + + + +Determines how profiling sessions are controlled. It has two modes: + +- `'manual'` (default): You control when profiling starts and stops using the `startProfiler()` and `stopProfiler()` functions. In this mode, profile sampling is only affected by `profileSessionSampleRate`. Read more about these functions in the profiling API documentation. +- `'trace'`: Profiling starts and stops automatically with transactions, as long as tracing is enabled. The profiler runs as long as there is at least one sampled transaction. In this mode, profiling is affected by both `profileSessionSampleRate` and your tracing sample rate (`tracesSampleRate` or `tracesSampler`). + + + + -A number between `0` and `1`, controlling the percentage chance a given sampled transaction will be profiled. (`0` represents 0% while `1` represents 100%.) Applies equally to all transactions created in the app. This is relative to the tracing sample rate - e.g. `0.5` means 50% of sampled transactions will be profiled. + **Deprecated:** Use `profileSessionSampleRate` instead to configure continuous profiling from version 10.27.0 onwards. + + A number between `0` and `1`, controlling the percentage chance a given sampled transaction will be profiled. (`0` represents 0% while `1` represents 100%.) Applies equally to all transactions created in the app. This is relative to the tracing sample rate - e.g. `0.5` means 50% of sampled transactions will be profiled. + ## Experimental Options diff --git a/docs/platforms/javascript/guides/astro/index.mdx b/docs/platforms/javascript/guides/astro/index.mdx index 7225a95e40047..eae40d9bd6ada 100644 --- a/docs/platforms/javascript/guides/astro/index.mdx +++ b/docs/platforms/javascript/guides/astro/index.mdx @@ -187,9 +187,8 @@ Sentry.init({ // ___PRODUCT_OPTION_END___ performance // ___PRODUCT_OPTION_START___ profiling - // Set sampling rate for profiling - // This is relative to tracesSampleRate - profilesSampleRate: 1.0, + // Define how many user sessions have profiling enabled. + profileSessionSampleRate: 1.0, // ___PRODUCT_OPTION_END___ profiling }); ``` diff --git a/docs/platforms/python/profiling/index.mdx b/docs/platforms/python/profiling/index.mdx index 06c0fb4594fd8..d559abee02dcd 100644 --- a/docs/platforms/python/profiling/index.mdx +++ b/docs/platforms/python/profiling/index.mdx @@ -20,7 +20,7 @@ Continuous profiling is available starting in SDK version `2.24.1`. -Continuous profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time. +Continuous Profiling supports two modes: `manual` and `trace`. These modes are mutually exclusive and cannot be used at the same time. In `manual` mode, the profiling data collection can be managed via calls to `sentry_sdk.profiler.start_profiler` and `sentry_sdk.profiler.stop_profiler`. You are entirely in control of when the profiler runs. diff --git a/docs/product/explore/profiling/getting-started.mdx b/docs/product/explore/profiling/getting-started.mdx index 30c02752f5d77..1ec9206855778 100644 --- a/docs/product/explore/profiling/getting-started.mdx +++ b/docs/product/explore/profiling/getting-started.mdx @@ -4,7 +4,7 @@ sidebar_order: 2 description: "Get started with Profiling, which allows you to see code-level profiling information for your Sentry apps." --- -Continuous Profiling and UI Profiling are the latest iteration of Sentry’s profiling capabilities, but they are currently only supported in select SDKs as described below. +Continuous Profiling and UI Profiling are the latest iteration of Sentry’s profiling capabilities, but they are currently only supported in select SDKs as described below. Other platforms are supported via the prior transaction-based Profiling product, but these will not benefit from new capabilities introduced by Continuous and UI Profiling (direct start/stop control over the profile lifecycle and removal of duration limits). For more information on the differences between transaction-based Profiling and Continuous/UI Profiling, read [this documentation](/product/explore/profiling/transaction-vs-continuous-profiling). @@ -30,10 +30,11 @@ Continuous Profiling can be used both independently and as a complement to the t -UI Profiling can be used both independently and as a complement to the tracing product. Support for Browser JavaScript is coming soon. +UI Profiling can be used both independently and as a complement to the tracing product. +- [Browser JavaScript](/platforms/javascript/profiling/) [beta] (since version `10.27.0`) - Mobile - [Android](/platforms/android/profiling/#continuous-profiling) - [iOS and macOS](/platforms/apple/guides/ios/profiling/#continuous-profiling) diff --git a/platform-includes/profiling/automatic-instrumentation-setup/_default.mdx b/platform-includes/profiling/automatic-instrumentation-setup/_default.mdx index 730872867b0aa..1cd3c553d7d31 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/_default.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/_default.mdx @@ -16,11 +16,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx index 2052ac5aa68fd..422d6bcbf57ef 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx @@ -16,11 +16,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx index 7a5e311a77582..10fd65101b2a9 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx @@ -15,11 +15,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx index 0f37f1508a265..571139a7c9314 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx @@ -15,11 +15,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx index 6818c34e92911..4e2f5e55507d8 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx @@ -15,11 +15,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx index 1834744a430ed..654a49e177fb5 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx @@ -16,11 +16,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx index 54ae801d254ad..f2b5f52c37b87 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx @@ -16,11 +16,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx index 45a0aab1bdd89..654e34fadb4c2 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx @@ -16,11 +16,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx index 169635ebd092a..88958bde58799 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx @@ -15,11 +15,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.vue.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.vue.mdx index 317f142787d2c..2813d42b70d33 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.vue.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.vue.mdx @@ -16,11 +16,8 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + // Set profileSessionSampleRate to 1.0 to profile during every session. + // The decision, whether to profile or not, is made once per session (when the SDK is initialized). + profileSessionSampleRate: 1.0, }); ``` diff --git a/platform-includes/profiling/browser-profiling/javascript.mdx b/platform-includes/profiling/browser-profiling/javascript.mdx index 006027272058a..cf860b9adbcf2 100644 --- a/platform-includes/profiling/browser-profiling/javascript.mdx +++ b/platform-includes/profiling/browser-profiling/javascript.mdx @@ -14,9 +14,9 @@ Note that since the profiling API is currently only exposed in Chromium, profile To get started with JavaScript browser profiling, you'll need to: -- Install the SDK, minimum version 7.60.0 +- Install the SDK, minimum version `10.27.0` (UI Profiling) or `7.60.0` (deprecated transaction-based Profiling) - Configure the document response header to include `Document-Policy: js-profiling` -- Configure the SDK to use the `BrowserProfilingIntegration` and set `profilesSampleRate` +- Configure the SDK to use the `browserProfilingIntegration` and set `profileSessionSampleRate` (UI Profiling) or `profilesSampleRate` (deprecated transaction-based Profiling) ## Step 1: Install the SDK @@ -48,10 +48,49 @@ Configuration should happen as early as possible in your application's lifecycle -When you enable `browserProfilingIntegration` in your SDK configuration, Chrome will incorrectly attribute regular rendering work as “Profiling Overhead” if you are doing local profiling via the Chrome DevTools Performance panel. To avoid this, disable or remove the integration when profiling with Chrome DevTools. +When you enable `browserProfilingIntegration` in your SDK configuration, Chrome will incorrectly attribute regular rendering work as “Profiling Overhead” if you are doing local profiling via the Chrome DevTools Performance panel. To avoid this, disable or remove the integration when profiling with Chrome DevTools. +## Profiling Modes + +Profiling supports two modes: `manual` and `trace`. These modes are mutually exclusive and cannot be used at the same time. + +In `manual` mode, you can manage the profiling data collection via calls to `Sentry.uiProfiler.startProfiler` and `Sentry.uiProfiler.stopProfiler`. You have full control over when the profiler runs. + +In `trace` mode, the profiler manages its own start and stop calls based on spans. It continues to run while at least one span is active, and stops when there are no active spans. + + +### Manual Lifecycle Profiling + +Manual lifecycle profiling is the default mode and enables you to start and stop the profiler manually. + +After enabling the `browserProfilingIntegration` and setting a `profileSessionSampleRate`, you can start and stop the profiler with the following calls: + +```javascript {9} +// All spans (unless those discarded by sampling) will have profiling data attached to them. +Sentry.uiProfiler.startProfiler(); +// Code executed between these two calls will be profiled +Sentry.uiProfiler.stopProfiler(); +``` + +### Trace Lifecycle Profiling + +To enable trace lifecycle profiling, enable tracing and set `profileLifecycle` to `'trace'` in your SDK configuration. + +```javascript {9} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [ + Sentry.browserTracingIntegration(), // Enables tracing + Sentry.browserProfilingIntegration() + ], + tracesSampleRate: 1.0, // Enables tracing + profileSessionSampleRate: 1.0, + profileLifecycle: 'trace', +}); +``` + ## The Difference Between DevTools & Sentry's JavaScript Browser Profiler What does Sentry's JavaScript browser profile offer that Chrome DevTools does not? diff --git a/platform-includes/profiling/node-profiling/javascript.mdx b/platform-includes/profiling/node-profiling/javascript.mdx index eb2ef86f13b80..9598315f8225e 100644 --- a/platform-includes/profiling/node-profiling/javascript.mdx +++ b/platform-includes/profiling/node-profiling/javascript.mdx @@ -26,7 +26,7 @@ The version of the `@sentry/profiling-node` package must match the version of th ## Enabling Profiling -Profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time. +Profiling supports two modes: `manual` and `trace`. These modes are mutually exclusive and cannot be used at the same time. In `manual` mode, the profiling data collection can be managed via calls to `Sentry.profiler.startProfiler` and `Sentry.profiler.stopProfiler`. You are entirely in the in control of when the profiler runs. From ec4ee7d8aeba4d1f431fc67bdadc37742b273230 Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 27 Nov 2025 14:17:29 +0100 Subject: [PATCH 4/9] Docs for RN metrics (#15646) ## DESCRIBE YOUR PR This PR introduces the "Metrics" docs section for React Native docs. Comes in combination with this PR that introduces Metrics to RN: https://github.com/getsentry/sentry-react-native/pull/5402 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): - [ ] Other deadline: - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## 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. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --- docs/platforms/react-native/metrics/index.mdx | 30 +++++++++++++++++++ .../metrics/requirements/react-native.mdx | 1 + src/middleware.ts | 4 --- 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 docs/platforms/react-native/metrics/index.mdx create mode 100644 platform-includes/metrics/requirements/react-native.mdx diff --git a/docs/platforms/react-native/metrics/index.mdx b/docs/platforms/react-native/metrics/index.mdx new file mode 100644 index 0000000000000..a3c01f855502b --- /dev/null +++ b/docs/platforms/react-native/metrics/index.mdx @@ -0,0 +1,30 @@ +--- +title: Set Up Metrics +sidebar_title: Metrics +description: "Metrics allow you to send, view and query counters, gauges and measurements from your Sentry-configured apps to track application health and drill down into related traces, logs, and errors." +sidebar_order: 5760 +beta: true +--- + +With Sentry Metrics, you can send counters, gauges, distributions, and sets from your applications to Sentry. Once in Sentry, these metrics can be viewed alongside relevant errors, and searched using their individual attributes. + +This feature is currently in open beta. + +## Requirements + + + +## Usage + + + +## Options + + + +## Default Attributes + + diff --git a/platform-includes/metrics/requirements/react-native.mdx b/platform-includes/metrics/requirements/react-native.mdx new file mode 100644 index 0000000000000..e97093a2f0d52 --- /dev/null +++ b/platform-includes/metrics/requirements/react-native.mdx @@ -0,0 +1 @@ + diff --git a/src/middleware.ts b/src/middleware.ts index 60399d9bb687d..f446bb3b67966 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1770,10 +1770,6 @@ const USER_DOCS_REDIRECTS: Redirect[] = [ from: '/platforms/ruby/metrics/', to: '/concepts/key-terms/tracing/span-metrics/', }, - { - from: '/platforms/react-native/metrics/', - to: '/concepts/key-terms/tracing/span-metrics/', - }, { from: '/platforms/java/metrics/', to: '/concepts/key-terms/tracing/span-metrics/', From 00591dc57d31f17fff88f3d5197e2b2c9ba38464 Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Fri, 28 Nov 2025 08:52:30 +0100 Subject: [PATCH 5/9] PR feedback --- .../apple/common/configuration/options.mdx | 12 +++-- .../enriching-events/attachments/index.mdx | 2 +- .../apple/common/integrations/default.mdx | 4 +- .../apple/common/migration/index.mdx | 4 +- .../automatic-instrumentation.mdx | 46 +++++++++++++++++++ .../common/usage/in-app-frames/index.mdx | 10 ++-- 6 files changed, 64 insertions(+), 14 deletions(-) diff --git a/docs/platforms/apple/common/configuration/options.mdx b/docs/platforms/apple/common/configuration/options.mdx index 7e46b62c94189..ff55661ab7bbf 100644 --- a/docs/platforms/apple/common/configuration/options.mdx +++ b/docs/platforms/apple/common/configuration/options.mdx @@ -129,7 +129,9 @@ Sentry differentiates stack frames that are directly related to your application - + + +**Removed in version 9.0.0** - This option had no effect and was removed. 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. @@ -212,13 +214,17 @@ Once enabled, this feature automatically captures HTTP client errors, like bad r For many platform SDKs integrations can be configured alongside it. On some platforms that happen as part of the `init()` call, in some others, different patterns apply. - + + +**Removed in version 9.0.0** - Integrations are now automatically managed by the SDK. Use specific configuration options to control SDK features instead. In some SDKs, the integrations are configured through this parameter on library initialization. For more information, please see our documentation for a specific integration. - + + +**Removed in version 9.0.0** - Integrations are now automatically managed by the SDK. This can be used to disable integrations that are added by default. When set to `false`, no default integrations are added. diff --git a/docs/platforms/apple/common/enriching-events/attachments/index.mdx b/docs/platforms/apple/common/enriching-events/attachments/index.mdx index 455ada4ed3f53..3522f45b88576 100644 --- a/docs/platforms/apple/common/enriching-events/attachments/index.mdx +++ b/docs/platforms/apple/common/enriching-events/attachments/index.mdx @@ -89,7 +89,7 @@ Alternately, attachments also appear in the _Attachments_ tab on the **Issue Det The maximum size for each attachment is set on `SentryOptions.maxAttachmentSize`. -The scale is bytes and the default is `20 MiB`. Please also check the +The scale is bytes and the default is `20 MiB` for versions prior to 9.0.0, and `200 MiB` starting with version 9.0.0. Please also check the [maximum attachment size of Relay](/product/relay/options/) to make sure your attachments don't get discarded there. diff --git a/docs/platforms/apple/common/integrations/default.mdx b/docs/platforms/apple/common/integrations/default.mdx index d2baec5f868c4..516ae32bc8068 100644 --- a/docs/platforms/apple/common/integrations/default.mdx +++ b/docs/platforms/apple/common/integrations/default.mdx @@ -37,7 +37,9 @@ This integration tracks watchdog terminations based on heuristics. This feature ## Disable an Integration -This example removes the default-enabled integration for adding breadcrumbs to the event: +**Note:** The `integrations` property and `defaultIntegrations()` method were removed in version 9.0.0. Integrations are now automatically managed by the SDK and cannot be disabled individually. If you need to disable specific functionality, use the corresponding configuration options instead (e.g., `enableAutoBreadcrumbTracking`). + +For versions prior to 9.0.0, this example shows how to remove the default-enabled integration for adding breadcrumbs to the event: ```swift {tabTitle:Swift} import Sentry diff --git a/docs/platforms/apple/common/migration/index.mdx b/docs/platforms/apple/common/migration/index.mdx index aae4eca8ad3ef..4467ee1122ae8 100644 --- a/docs/platforms/apple/common/migration/index.mdx +++ b/docs/platforms/apple/common/migration/index.mdx @@ -44,7 +44,7 @@ HTTP client errors now mark sessions as errored. This provides better visibility ### Profiling Changes -We removed all deprecated profiling APIs in version 9.0.0. The only supported profiling method is now UI Profiling (also known as continuous V2 profiling), which was introduced in version 8.49.0. +We removed all deprecated profiling APIs in version [9.0.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.0.0). The only supported profiling method is now UI Profiling (also known as continuous V2 profiling), which was introduced in [version 8.49.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.49.0). **Removed deprecated profiling options from `SentryOptions`:** - `profilesSampleRate` - used for transaction-based profiling (deprecated) @@ -105,7 +105,7 @@ For more information, see the feedback API instead) - `Scope.useSpan()` (use `Scope.span` instead) - `SentryDebugMeta.uuid` (use `debugID` instead) - `SentryDebugMeta.name` (use `codeFile` instead) diff --git a/docs/platforms/apple/common/tracing/instrumentation/automatic-instrumentation.mdx b/docs/platforms/apple/common/tracing/instrumentation/automatic-instrumentation.mdx index aa5e37b507343..255fde72c2ce7 100644 --- a/docs/platforms/apple/common/tracing/instrumentation/automatic-instrumentation.mdx +++ b/docs/platforms/apple/common/tracing/instrumentation/automatic-instrumentation.mdx @@ -264,6 +264,28 @@ To use automatic file I/O tracing for `NSFileManager` you need to enable it: ```swift {tabTitle:Swift} import Sentry +SentrySDK.start { options in + options.dsn = "___PUBLIC_DSN___" + options.enableFileIOTracing = true + options.enableFileManagerSwizzling = true +} +``` + +```objc {tabTitle:Objective-C} +@import Sentry; + +[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { + options.dsn = "___PUBLIC_DSN___" + options.enableFileIOTracing = YES; + options.enableFileManagerSwizzling = YES; +}]; +``` + +Before 9.0.0, this option was experimental: + +```swift {tabTitle:Swift} +import Sentry + SentrySDK.start { options in options.dsn = "___PUBLIC_DSN___" options.enableFileIOTracing = true @@ -341,6 +363,30 @@ We recommend you disable the swizzling of `NSData` and `NSFileManager` when usin ```swift {tabTitle:Swift} import Sentry +SentrySDK.start { options in + options.dsn = "___PUBLIC_DSN___"; + options.enableFileIOTracing = true + options.enableDataSwizzling = false + options.enableFileManagerSwizzling = false +} +``` + +```objc {tabTitle:Objective-C} +@import Sentry; + +[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { + options.dsn = @"___PUBLIC_DSN___"; + options.enableFileIOTracing = YES; + options.enableDataSwizzling = NO; + options.enableFileManagerSwizzling = NO; +}]; +``` + +Before 9.0.0, these options were experimental: + +```swift {tabTitle:Swift} +import Sentry + SentrySDK.start { options in options.dsn = "___PUBLIC_DSN___"; options.enableFileIOTracing = true diff --git a/docs/platforms/apple/common/usage/in-app-frames/index.mdx b/docs/platforms/apple/common/usage/in-app-frames/index.mdx index 0f2a4b94c42f4..533e937683957 100644 --- a/docs/platforms/apple/common/usage/in-app-frames/index.mdx +++ b/docs/platforms/apple/common/usage/in-app-frames/index.mdx @@ -19,7 +19,9 @@ If you're not familiar with these terms, you can learn more: ## Dynamic Frameworks -If you use dynamic frameworks such as Sentry, the Sentry SDK will mark them as `not inApp`. If you have a private framework that should be marked as `inApp`, use the SentryOptions [`inAppInclude`](/platforms/apple/configuration/options/#inAppInclude) or [`inAppExclude`](/platforms/apple/configuration/options/#inAppExclude). +If you use dynamic frameworks such as Sentry, the Sentry SDK will mark them as `not inApp`. If you have a private framework that should be marked as `inApp`, use the SentryOptions [`inAppInclude`](/platforms/apple/configuration/options/#inAppInclude). + +**Note:** `inAppExclude` was removed in version 9.0.0 as it had no effect. ```swift {tabTitle:Swift} @@ -30,9 +32,6 @@ SentrySDK.start { options in // The SDK marks all frameworks starting with MyBusinessLogic as inApp options.add(inAppInclude: "MyBusinessLogic") - - // The SDK marks all frameworks starting with MyFramework as not inApp - options.add(inAppExclude: "MyFramework") } ``` @@ -44,9 +43,6 @@ SentrySDK.start { options in // The SDK marks all frameworks starting with MyBusinessLogic as inApp [options addInAppInclude:@"MyBusinessLogic"]; - - // The SDK marks all framework starting with MyFramework as not inApp - [options addInAppExclude:@"MyFramework"]; }]; ``` From 7a7253179d982c629dea61dc462c9622aa676f45 Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Fri, 28 Nov 2025 09:03:52 +0100 Subject: [PATCH 6/9] Apply suggestions from code review Co-authored-by: Philip Niedertscheider --- docs/platforms/apple/common/profiling/index.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/platforms/apple/common/profiling/index.mdx b/docs/platforms/apple/common/profiling/index.mdx index edddae3c60323..cfa30691218b9 100644 --- a/docs/platforms/apple/common/profiling/index.mdx +++ b/docs/platforms/apple/common/profiling/index.mdx @@ -20,7 +20,7 @@ notSupported: -UI Profiling was introduced in SDK version 8.49.0. All prior profiling APIs were removed in version 9.0.0. +UI Profiling was introduced in SDK version [8.49.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.49.0). All prior profiling APIs were removed in version [9.0.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.0.0). @@ -140,7 +140,7 @@ Every time `SentrySDK.startWithOptions` is called with app start profiling confi -Transaction-based profiling configuration, explained below, was originally introduced in SDK version 8.12.0 and was removed in version 9.0.0. Use UI Profiling instead, which was introduced in version 8.49.0. +Transaction-based profiling configuration, explained below, was originally introduced in SDK version [8.12.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.12.0) and was removed in version [9.0.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.0.0). Use UI Profiling instead, which was introduced in version [8.49.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.49.0). @@ -176,7 +176,7 @@ SentrySDK.start { options in -Launch profiling configuration, explained below, was originally introduced in SDK version 8.21.0 and was removed in version 9.0.0. Use UI Profiling instead, which was released in version 8.49.0. +Launch profiling configuration, explained below, was originally introduced in SDK version [8.21.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.21.0) and was removed in version [9.0.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.0.0). Use UI Profiling instead, which was released in version [8.49.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.49.0). @@ -214,7 +214,7 @@ SentrySDK.start { options in -Continuous Profiling Beta, explained below, was originally introduced in SDK version 8.36.0 and was removed in version 9.0.0. Use UI Profiling instead, which was released in version 8.49.0. +Continuous Profiling Beta, explained below, was originally introduced in SDK version [8.36.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.36.0) and was removed in version [9.0.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.0.0). Use UI Profiling instead, which was released in version [8.49.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.49.0). From 3ae8ec346890459eaaed821e6b9c746c9d2dae32 Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Fri, 28 Nov 2025 09:12:19 +0100 Subject: [PATCH 7/9] more feedback --- .../apple/common/migration/index.mdx | 5 +- platform-includes/logs/options/apple.mdx | 48 +++++++++++++++++-- platform-includes/logs/setup/apple.mdx | 23 ++++++++- 3 files changed, 69 insertions(+), 7 deletions(-) diff --git a/docs/platforms/apple/common/migration/index.mdx b/docs/platforms/apple/common/migration/index.mdx index 4467ee1122ae8..a9842fc590e91 100644 --- a/docs/platforms/apple/common/migration/index.mdx +++ b/docs/platforms/apple/common/migration/index.mdx @@ -36,7 +36,9 @@ We now automatically disable app hang tracking for: Widgets, Live Activities, Ac ### Structured Logging -We moved structured logging options out of experimental and made them part of the main API. We added log APIs to `Hub` and `Client`, and logs now include a `sentry.replay_id` attribute. +We moved structured logging out of experimental and made it part of the stable API. The `enableLogs` option moved from `options.experimental.enableLogs` to `options.enableLogs`. We added log APIs to `Hub` and `Client`, and logs now include a `sentry.replay_id` attribute. + +**Migration required:** Update your code from `options.experimental.enableLogs = true` to `options.enableLogs = true`. Logging is not enabled by default; you must explicitly set this option. #### HTTP Client Errors @@ -75,6 +77,7 @@ For more information, see the + +Starting with version 9.0.0, structured logging is no longer experimental. The option moved from `options.experimental.enableLogs` to `options.enableLogs`. + + + ```swift {tabTitle:Swift} import Sentry SentrySDK.start { options in options.dsn = "___PUBLIC_DSN___" - options.experimental.enableLogs = true - + options.enableLogs = true + options.beforeSendLog = { log in if log.level == .info { // Filter out all info logs @@ -22,13 +28,47 @@ SentrySDK.start { options in ```objc {tabTitle:Objective-C} @import Sentry; +[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { + options.dsn = @"___PUBLIC_DSN___"; + options.enableLogs = YES; + + options.beforeSendLog = ^SentryLog* (SentryLog *log) { + if (log.level == SentryLogLevelInfo) { + // Filter out all info logs + return nil; + } + return log; + }; +}]; +``` + +Before 9.0.0: + +```swift {tabTitle:Swift} +import Sentry + +SentrySDK.start { options in + options.dsn = "___PUBLIC_DSN___" + options.experimental.enableLogs = true + + options.beforeSendLog = { log in + if log.level == .info { + return nil + } + return log + } +} +``` + +```objc {tabTitle:Objective-C} +@import Sentry; + [SentrySDK startWithConfigureOptions:^(SentryOptions *options) { options.dsn = @"___PUBLIC_DSN___"; options.experimental.enableLogs = YES; - + options.beforeSendLog = ^SentryLog* (SentryLog *log) { if (log.level == SentryStructuredLogLevelInfo) { - // Filter out all info logs return nil; } return log; diff --git a/platform-includes/logs/setup/apple.mdx b/platform-includes/logs/setup/apple.mdx index 34d1c4a6bfdcd..d2dfd9ea3ed45 100644 --- a/platform-includes/logs/setup/apple.mdx +++ b/platform-includes/logs/setup/apple.mdx @@ -1,4 +1,24 @@ -To enable logging, you need to initialize the SDK with the experimental `enableLogs` option set to `true`. +To enable logging, set the `enableLogs` option to `true`. + +```swift {tabTitle:Swift} +import Sentry + +SentrySDK.start { options in + options.dsn = "___PUBLIC_DSN___" + options.enableLogs = true +} +``` + +```objc {tabTitle:Objective-C} +@import Sentry; + +[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { + options.dsn = @"___PUBLIC_DSN___"; + options.enableLogs = YES; +}]; +``` + +Before 9.0.0, this option was experimental: ```swift {tabTitle:Swift} import Sentry @@ -15,7 +35,6 @@ SentrySDK.start { options in [SentrySDK startWithConfigureOptions:^(SentryOptions *options) { options.dsn = @"___PUBLIC_DSN___"; - // Enable logs to be sent to Sentry options.experimental.enableLogs = YES; }]; ``` From 27af6ffa9e0196dbd2774f1e31a0f7e0817a3fad Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Fri, 28 Nov 2025 09:15:05 +0100 Subject: [PATCH 8/9] more feedback --- platform-includes/logs/options/apple.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/logs/options/apple.mdx b/platform-includes/logs/options/apple.mdx index 99e6e37d79dee..d189186383e98 100644 --- a/platform-includes/logs/options/apple.mdx +++ b/platform-includes/logs/options/apple.mdx @@ -68,7 +68,7 @@ SentrySDK.start { options in options.experimental.enableLogs = YES; options.beforeSendLog = ^SentryLog* (SentryLog *log) { - if (log.level == SentryStructuredLogLevelInfo) { + if (log.level == SentryLogLevelInfo) { return nil; } return log; From 4edff0c94df4208848914732e047f1e98b68643d Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Fri, 28 Nov 2025 10:23:40 +0100 Subject: [PATCH 9/9] drop carthage --- docs/platforms/apple/common/migration/index.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/platforms/apple/common/migration/index.mdx b/docs/platforms/apple/common/migration/index.mdx index a9842fc590e91..2b6c646d68843 100644 --- a/docs/platforms/apple/common/migration/index.mdx +++ b/docs/platforms/apple/common/migration/index.mdx @@ -22,6 +22,10 @@ We now build the precompiled XCFramework with **Xcode 16**. To submit to the App Additionally, the Package.swift sets `swift-tools-version` to 6.0. +### Carthage Support Dropped + +We dropped official support for Carthage in v9. If you're using Carthage, please migrate to CocoaPods or Swift Package Manager (SPM). + ### Features Enabled by Default We now enabled the following features by default: