diff --git a/docs/platforms/javascript/guides/capacitor/configuration/integrations/spotlight.mdx b/docs/platforms/javascript/guides/capacitor/configuration/integrations/spotlight.mdx new file mode 100644 index 0000000000000..bca2552a9f588 --- /dev/null +++ b/docs/platforms/javascript/guides/capacitor/configuration/integrations/spotlight.mdx @@ -0,0 +1,29 @@ +--- +title: Spotlight +description: "The Spotlight integration enables real-time observability for errors, traces, logs, and performance data during local development." +--- + + +The `spotlightIntegration` is only supported in Sentry Capacitor SDK 3.0.0 and newer. + + +[Sentry Spotlight](https://spotlightjs.com/) is a local development tool that provides real-time observability for errors, traces, logs, and performance data during development. It allows you to see Sentry events in real-time without sending them to Sentry's servers, making it perfect for local debugging. + +To set up Spotlight, follow the [Spotlight setup guide](https://spotlightjs.com/). Once Spotlight is running, you can enable the integration in your Capacitor app. + +### Usage + +The `spotlightIntegration` sends a copy of all Sentry events to your local Spotlight instance during development. This allows you to debug issues locally with full visibility into errors, transactions, and other telemetry data. + +```javascript diff +import * as Sentry from '@sentry/capacitor'; + +Sentry.init({ ++ integrations: [ ++ Sentry.spotlightIntegration({ ++ sidecarUrl: 'IP:PORT/stream' //Only required when testing outside of a browser. ++ }), + ] +}, siblingSdk); + +``` \ No newline at end of file diff --git a/docs/platforms/javascript/guides/capacitor/migration/v2-to-v3/index.mdx b/docs/platforms/javascript/guides/capacitor/migration/v2-to-v3/index.mdx new file mode 100644 index 0000000000000..2fd1c65d02cef --- /dev/null +++ b/docs/platforms/javascript/guides/capacitor/migration/v2-to-v3/index.mdx @@ -0,0 +1,108 @@ +--- +title: Migrate from 2.x to 3.x +sidebar_order: 7919 +description: "Learn about migrating from Sentry Capacitor SDK 2.x to 3.x" +--- + + + + +Version 3 is still under development, this documentation may change before the final release. + + + + +Version 3 of the Sentry Capacitor SDK primarily introduces API cleanup and version support changes. + +The main goal of version 3 of Sentry Capacitor SDK is to provide compatibility with Sentry JavaScript version 10. This update includes breaking changes due to the upgrade to JavaScript SDK v10, the removal of deprecated APIs, reorganization of the npm package structure and also the refactoring on how you initialize Sentry Capacitor. + + +## Major Changes in Sentry JS SDK v10 + +This update contains API cleanups related to `BaseClient`, `hasTracingEnabled`, and `logger` from `@sentry/core`. For details and other general JavaScript SDK version 10 changes. +Each Sibling SDK has specific changes in version 10, follow the tutorials below to update the SDK. + +- [Angular SDK 8.x to 9.x migration guide](/platforms/javascript/guides/angular/migration/v9-to-v10/). +- [React SDK 8.x to 9.x migration guide](/platforms/javascript/guides/react/migration/v9-to-v10/). +- [Vue SDK 8.x to 9.x migration guide](/platforms/javascript/guides/vue/migration/v9-to-v10/). +- [Nuxt SDK 8.x to 9.x migration guide](/platforms/javascript/guides/nuxt/migration/v9-to-v10/). + +## Important Capacitor SDK `3.x` changes + +This section describes the changes in Sentry Capacitor SDK, version 3. + +### Changes on how you initialize the SDK on projects using Vue or Nuxt. + +Starting on version `3.0.0`, calling `sentry.init` will break, to fix it, you will need to move the `sibling` parameters from the root option to `siblingOptions` inside the root of `CapacitorOptions`. + +```JavaScript diff {tabTitle: Vue} +import * as Sentry from '@sentry/capacitor'; +import * as SentryVue from '@sentry/vue'; + +Sentry.init({ +- app: app, + attachErrorHandler: false, + dsn: '...', + enableLogs: true, +- attachErrorHandler: false, +- attachProps: true, +- attachErrorHandler: true, +- tracingOptions: ... ++ siblingOptions: { ++ vueOptions: { ++ app: app, ++ attachErrorHandler: false, ++ attachProps: true, ++ attachErrorHandler: true, ++ tracingOptions: ... ++ }, ++ }, +}, SentryVue.init); +``` + +```JavaScript diff {tabTitle: Nuxt} +import * as Sentry from '@sentry/capacitor'; +import * as SentryNuxt from '@sentry/nuxt'; + +Sentry.init({ +- Vue: Vue, + attachErrorHandler: false, + dsn: '...', + enableLogs: true, +- attachErrorHandler: false, +- attachProps: true, +- attachErrorHandler: true, +- tracingOptions: ... ++ siblingOptions: { ++ nuxtOptions: { ++ Vue: Vue, ++ attachErrorHandler: false, ++ attachProps: true, ++ attachErrorHandler: true, ++ tracingOptions: ... ++ }, ++ }, +}, SentryNuxt.init); +``` + +### Logs are out of experimental + +to keep using logs, you need to move your parameters from `Options._experimental.*` into `Options.*`, the `_experimental` field was removed on version `3.0.0` but may return once new experimental fields appear. + + ### Integration Changes + + This version will include more integrations by default and also a new Spotlight integration that works on both Web and Mobile. See the list below with the new integrations: + + | | **Auto Enabled** | **Errors** | **Tracing** | **Replay** | **Additional Context** | +|-------------------------------------------------------|:----------------:|:----------:|:-----------:|:----------:|:----------------------:| +| `breadcrumbsIntegration` | ✓ | | | | ✓ | +| `browserApiErrorsIntegration` | ✓ | ✓ | | | | +| `dedupeIntegration` | ✓ | ✓ | | | | +| `functionToStringIntegration` | ✓ | | | | | +| `globalHandlersIntegration` | ✓ | ✓ | | | | +| `inboundFiltersIntegration` | ✓ | ✓ | | | | +| `linkedErrorsIntegration` | ✓ | ✓ | | | | +| `spotlightIntegration` | | | | | | + + + \ No newline at end of file