diff --git a/.github/workflows/algolia-index.yml b/.github/workflows/algolia-index.yml index ebe5c52cabff2..902e5d73315ac 100644 --- a/.github/workflows/algolia-index.yml +++ b/.github/workflows/algolia-index.yml @@ -8,8 +8,11 @@ jobs: name: Update Algolia index runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0 + - uses: actions/checkout@v4 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + id: setup-node + with: + node-version-file: 'package.json' - uses: dorny/paths-filter@v3 id: filter with: @@ -20,7 +23,7 @@ jobs: - 'platform-includes/**' dev-docs: - 'develop-docs/**' - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@v2 with: bun-version: latest diff --git a/.github/workflows/cleanup-preview-deployments.yml b/.github/workflows/cleanup-preview-deployments.yml index e256bab8e026f..2f13a6d672670 100644 --- a/.github/workflows/cleanup-preview-deployments.yml +++ b/.github/workflows/cleanup-preview-deployments.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v3 - name: Install bun - uses: oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@v2 with: bun-version: latest diff --git a/.github/workflows/lint-404s.yml b/.github/workflows/lint-404s.yml index 35e20ea42f448..f7bbf106b67b0 100644 --- a/.github/workflows/lint-404s.yml +++ b/.github/workflows/lint-404s.yml @@ -10,8 +10,11 @@ jobs: index: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0 + - uses: actions/checkout@v4 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + id: setup-node + with: + node-version-file: 'package.json' - uses: dorny/paths-filter@v3 id: filter with: diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 511455ade75ca..d1ff76c0f2577 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -22,7 +22,11 @@ jobs: pull-requests: write steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0 + + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + id: setup-node + with: + node-version-file: 'package.json' - name: Install github-label-sync run: yarn global add github-label-sync@2.2.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d47cbe7ec5725..c05454110e14b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,10 @@ jobs: app_id: ${{ vars.SENTRY_INTERNAL_APP_ID }} private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }} - - uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + id: setup-node + with: + node-version-file: 'package.json' - uses: actions/cache@v4 id: cache diff --git a/.gitignore b/.gitignore index 5e9d599ef29ba..f9636319c0ef2 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,7 @@ public/page-data tsconfig.tsbuildinfo public/mdx-images/* + +# yalc +.yalc +yalc.lock diff --git a/app/[[...path]]/page.tsx b/app/[[...path]]/page.tsx index bdc4e5d1e8d38..98ae8edae9b51 100644 --- a/app/[[...path]]/page.tsx +++ b/app/[[...path]]/page.tsx @@ -19,7 +19,7 @@ import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs'; import {getDevDocsFrontMatter, getDocsFrontMatter, getFileBySlug} from 'sentry-docs/mdx'; import {mdxComponents} from 'sentry-docs/mdxComponents'; import {setServerContext} from 'sentry-docs/serverContext'; -import {capitilize} from 'sentry-docs/utils'; +import {formatGuideOrPlatformTitle} from 'sentry-docs/utils'; export async function generateStaticParams() { const docs = await (isDeveloperDocs ? getDevDocsFrontMatter() : getDocsFrontMatter()); @@ -141,7 +141,9 @@ export async function generateMetadata({params}: MetadataProps): Promise - - - {children} - + + + + + {children} + + @@ -78,7 +77,6 @@ If you intend to use Raven with Node, [raven-node](https://github.com/getsentry/ To use Raven with CommonJS imports: - ```javascript var Raven = require("raven-js"); @@ -89,7 +87,6 @@ Raven.config("___PUBLIC_DSN___").install(); To use Raven with ES2015 (ES6) imports: - ```javascript import Raven from "raven-js"; @@ -102,7 +99,6 @@ To load Sentry JS SDK asynchronously, you need to do two things. Provide global `SENTRY_SDK` variable with SDK’s URL (for example from our CDN), your DSN and SDK’s configuration. And place the snippet below as soon as possible in your HTML code. For example: - ```html @@ -78,7 +77,6 @@ Pre-built distributions of Raven.js and the Raven.js AngularJS plugin are availa ##### Bower - ```shell bower install raven-js --save @@ -95,7 +93,6 @@ bower install raven-js --save ##### npm - ```shell npm install raven-js --save @@ -120,7 +117,6 @@ Raven.addPlugin(Raven.Plugins.Angular, angular); Raven and the Raven AngularJS plugin can be loaded using a module loader like Browserify or webpack. - ```javascript var angular = require("angular"); @@ -213,7 +209,6 @@ System.config({ Then, in your main module file (where `@NgModule` is called, e.g. app.module.ts): - ```javascript import Raven = require('raven-js'); @@ -250,7 +245,6 @@ Once you’ve completed these two steps, you are done. Angular CLI now uses webpack to build instead of SystemJS. All you need to do is modify your main module file (where `@NgModule` is called, e.g. app.module.ts): - ```javascript import * as Raven from "raven-js"; @@ -298,7 +292,6 @@ Start by adding the `raven.js` script tag to your page. It should be loaded as e Next configure Raven.js to use your Sentry DSN: - ```javascript Raven.config("___PUBLIC_DSN___").install(); @@ -328,7 +321,6 @@ For convenience, our CDN serves a single, minified JavaScript file containing bo Example: - ```html @@ -349,7 +341,6 @@ Pre-built distributions of Raven.js and the Raven.js Ember plugin are available ##### Bower - ```shell bower install raven-js --save @@ -370,7 +361,6 @@ app.import("bower_components/raven-js/dist/plugins/ember.js"); ##### npm - ```shell npm install raven-js --save @@ -414,7 +404,6 @@ Start by adding the `raven.js` script tag to your page. It should be loaded as e Next configure Raven.js to use your Sentry DSN: - ```javascript Raven.config("___PUBLIC_DSN___").install(); @@ -512,7 +501,6 @@ For convenience, our CDN serves a single, minified JavaScript file containing bo Example: - ```html @@ -533,7 +521,6 @@ Both Raven.js and the Raven.js Vue plugin can be installed via npm and Bower. ##### npm - ```shell npm install raven-js --save @@ -550,7 +537,6 @@ npm install raven-js --save ##### Bower - ```shell bower install raven-js --save @@ -575,7 +561,6 @@ Raven.addPlugin(Raven.Plugins.Vue, Vue); In your main application file, import and configure both Raven.js and the Raven.js Vue plugin as follows: - ```javascript import Vue from "vue"; @@ -618,7 +603,6 @@ require("raven-js/plugins/react-native")(Raven); Now we need to set up Raven.js to use your Sentry DSN: - ```javascript Raven.config("___PUBLIC_DSN___", { release: RELEASE_ID }).install(); diff --git a/docs/platforms/javascript/legacy-sdk/usage.mdx b/docs/platforms/javascript/legacy-sdk/usage.mdx index 2a2870d7c5e1d..da0386126944e 100644 --- a/docs/platforms/javascript/legacy-sdk/usage.mdx +++ b/docs/platforms/javascript/legacy-sdk/usage.mdx @@ -203,7 +203,6 @@ To learn more about what types of data can be collected via breadcrumbs, see the Note that you can also disable automatic breadcrumb collection entirely or disable specific collectors: - ```javascript Raven.config("___PUBLIC_DSN___", { diff --git a/docs/platforms/kotlin-multiplatform/initialization-strategies.mdx b/docs/platforms/kotlin-multiplatform/initialization-strategies.mdx index 0cc61f09e3869..a2f65d20b660f 100644 --- a/docs/platforms/kotlin-multiplatform/initialization-strategies.mdx +++ b/docs/platforms/kotlin-multiplatform/initialization-strategies.mdx @@ -104,7 +104,6 @@ Using a shared initializer provides a single source of truth for your SDK's conf To initialize the SDK, create a Kotlin file in your `commonMain` (such as `AppSetup.kt` or whatever you decide to call it), and write an initialization function. You'll then be able to call it in an early lifecycle stage in your platforms. - ```kotlin {filename:AppSetup.kt} import io.sentry.kotlin.multiplatform.Sentry @@ -138,7 +137,6 @@ expect fun initializeSentry() ### androidMain - ```kotlin {filename:androidMain/AppSetup.kt} import io.sentry.kotlin.multiplatform.Sentry @@ -154,7 +152,6 @@ actual fun initializeSentry() { ### iosMain - ```kotlin {filename:iosMain/AppSetup.kt} import io.sentry.kotlin.multiplatform.Sentry diff --git a/docs/platforms/kotlin-multiplatform/user-feedback/index.mdx b/docs/platforms/kotlin-multiplatform/user-feedback/index.mdx index 56c470eb8265f..f551648aa77eb 100644 --- a/docs/platforms/kotlin-multiplatform/user-feedback/index.mdx +++ b/docs/platforms/kotlin-multiplatform/user-feedback/index.mdx @@ -11,5 +11,3 @@ When a user experiences an error, Sentry provides the ability to collect additio The user feedback API allows you to collect user feedback while utilizing your own UI. You can use the same programming language you have in your app to send user feedback. In this case, the SDK creates the HTTP request so you don't have to deal with posting data via HTTP. - -Alternatively, you can use the [User Feedback API endpoint](/api/projects/submit-user-feedback/) directly. diff --git a/docs/platforms/native/user-feedback/index.mdx b/docs/platforms/native/user-feedback/index.mdx index 91c470050738c..8fcb38d2da1db 100644 --- a/docs/platforms/native/user-feedback/index.mdx +++ b/docs/platforms/native/user-feedback/index.mdx @@ -13,5 +13,3 @@ The user feedback API allows you to collect user feedback using your own UI. You Sentry pairs the feedback with the original event, giving you additional insight into issues. In order to do this, Sentry needs the `eventId`. For example, to get the `eventId`, you can use or the return value of the method capturing an event. - -Alternatively, you can use the [User Feedback API endpoint](/api/projects/submit-user-feedback/) directly. diff --git a/docs/platforms/php/common/configuration/options.mdx b/docs/platforms/php/common/configuration/options.mdx index 80fbb18993d93..e14078bb4c3a3 100644 --- a/docs/platforms/php/common/configuration/options.mdx +++ b/docs/platforms/php/common/configuration/options.mdx @@ -243,3 +243,16 @@ A number between 0 and 1, controlling the percentage chance a given transaction A function responsible for determining the percentage chance a given transaction will be sent to Sentry. It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between `0` (0% chance of being sent) and `1` (100% chance of being sent). Can also be used for filtering transactions, by returning 0 for those that are unwanted. Either this or must be defined to enable tracing. + + + +An optional property that controls which downstream services receive tracing data, in the form of a `sentry-trace` and a `baggage` header attached to any outgoing HTTP requests. + +The option may contain a list of strings against which the URLs of outgoing requests are matched. +If one of the entries in the list matches the URL of an outgoing request, trace data will be attached to that request. +Entries do not have to be full matches, meaning the URL of a request is matched when it _contains_ a string provided through the option. + +If is not provided, trace data is attached to every outgoing request from the [instrumented client](../../tracing/instrumentation/requests-module/). +To disable sending trace data to any downstream service, set this option to an empty array (`[]`). + + diff --git a/docs/platforms/php/common/data-management/data-collected.mdx b/docs/platforms/php/common/data-management/data-collected.mdx new file mode 100644 index 0000000000000..f217b2a240575 --- /dev/null +++ b/docs/platforms/php/common/data-management/data-collected.mdx @@ -0,0 +1,59 @@ +--- +title: Data Collected +description: "See what data is collected by the Sentry SDK." +sidebar_order: 1 +--- + +Sentry takes data privacy very seriously and has default settings in place that prioritize data safety, especially when it comes to personally identifiable information (PII) data. When you add the Sentry SDK to your application, you allow it to collect data and send it to Sentry during the runtime of your application. + +The category types and amount of data collected vary, depending on the integrations you've enabled in the Sentry SDK. Here's a list of data categories the Sentry PHP SDK collects: + +## HTTP Headers + +By default, the Sentry SDK doesn't send any HTTP headers. + +To start sending HTTP headers, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Cookies + +By default, the Sentry SDK doesn't send cookies. + +If you want to send cookies, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Users' IP Address + +By default, the Sentry SDK doesn't send the user's IP address. + +To enable sending the user's IP address, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Request URL + +The full request URL of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. + +## Request Query String + +The full request query string of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. + +## Request Body + +The request body of incoming HTTP requests can be sent to Sentry. Whether it's sent or not, depends on the type and size of request body as described below: + +- **The type of the request body:** + -JSON and form bodies are sent + -Raw request bodies are always removed + -Uploaded files in the request bodies are never sent to Sentry +- **The size of the request body:** There's a [`max_request_body_size` option](../configuration/options/#max-request-body-size) that's set to `medium` by default. This means that larger request bodies aren't sent to Sentry. + +If you want to prevent bodies from being sent to Sentry altogether, set `max_request_body_size` to `'never'`. + +## Source Context + +When an unhandled exception is sent to Sentry, a snapshot of the source code surrounding the line where the error originates is sent with it. + +To opt out of sending this source context to Sentry, set the [`context_lines` option](../configuration/options/#context-lines) to `0`. + +## Local Variables In Stack Trace + +When unhandled errors and exceptions are sent to Sentry, the names and values of local variables that were set when the errors occurred, are sent at the same time. + +You can stop sending local variables to Sentry by setting `zend.exception_ignore_args=1` in your `php.ini`. On some distributions, this setting is already set to `1` by default and if you want to include local variables set `zend.exception_ignore_args=0` instead. diff --git a/docs/platforms/php/common/integrations/index.mdx b/docs/platforms/php/common/integrations/index.mdx index 2139ab179090d..d7a95891c6881 100644 --- a/docs/platforms/php/common/integrations/index.mdx +++ b/docs/platforms/php/common/integrations/index.mdx @@ -78,7 +78,6 @@ You can customize the list of integration without disabling the default integrat In the example below, all integrations are enabled except the `ExceptionListenerIntegration`. - ```php \Sentry\init([ diff --git a/docs/platforms/php/common/profiling/index.mdx b/docs/platforms/php/common/profiling/index.mdx index d306e122faa5f..0d3f374ccdad1 100644 --- a/docs/platforms/php/common/profiling/index.mdx +++ b/docs/platforms/php/common/profiling/index.mdx @@ -64,7 +64,6 @@ Sentry's tracing product has to be enabled in order for Profiling to work. To begin capturing profiling data, you first need to start a transaction. Check out the performance setup and custom instrumentation documentation for more detailed information. - ```php \Sentry\init([ @@ -75,7 +74,6 @@ Check out the performance setup and ## Enabling Profiling - ```php \Sentry\init([ diff --git a/docs/platforms/php/guides/laravel/data-management/data-collected.mdx b/docs/platforms/php/guides/laravel/data-management/data-collected.mdx new file mode 100644 index 0000000000000..8cab61282178a --- /dev/null +++ b/docs/platforms/php/guides/laravel/data-management/data-collected.mdx @@ -0,0 +1,65 @@ +--- +title: Data Collected +description: "See what data is collected by the Sentry SDK." +sidebar_order: 1 +--- + +Sentry takes data privacy very seriously and has default settings in place that prioritize data safety, especially when it comes to personally identifiable information (PII) data. When you add the Sentry SDK to your application, you allow it to collect data and send it to Sentry during the runtime of your application. + +The category types and amount of data collected vary, depending on the integrations you've enabled in the Sentry SDK. Here's a list of data categories the Sentry PHP SDK collects: + +## HTTP Headers + +By default, the Sentry SDK doesn't send any HTTP headers. + +To start sending HTTP headers, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Cookies + +By default, the Sentry SDK doesn't send cookies. Sentry tries to remove any cookies that contain sensitive information, (such as the Laravel Session, Remember Token and CSRF Token cookies). + +If you want to send cookies, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Information About Logged-in User + +By default, the Sentry SDK doesn't send any information about the logged-in user, (such as email address, user id, or username). + +To start sending logged-in user information, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Users' IP Address + +By default, the Sentry SDK doesn't send the user's IP address. + +To enable sending the user's IP address, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Request URL + +The full request URL of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. + +## Request Query String + +The full request query string of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. + +## Request Body + +The request body of incoming HTTP requests can be sent to Sentry. Whether it's sent or not, depends on the type and size of request body as described below: + +- **The type of the request body:** + -JSON and form bodies are sent + -Raw request bodies are always removed + -Uploaded files in the request bodies are never sent to Sentry +- **The size of the request body:** There's a [`max_request_body_size` option](../configuration/options/#max-request-body-size) that's set to `medium` by default. This means that larger request bodies aren't sent to Sentry. + +If you want to prevent bodies from being sent to Sentry altogether, set `max_request_body_size` to `'never'`. + +## Source Context + +When an unhandled exception is sent to Sentry, a snapshot of the source code surrounding the line where the error originates is sent with it. + +To opt out of sending this source context to Sentry, set the [`context_lines` option](../configuration/options/#context-lines) to `0`. + +## Local Variables In Stack Trace + +When unhandled errors and exceptions are sent to Sentry, the names and values of local variables that were set when the errors occurred, are sent at the same time. + +You can stop sending local variables to Sentry by setting `zend.exception_ignore_args=1` in your `php.ini`. On some distributions, this setting is already set to `1` by default and if you want to include local variables set `zend.exception_ignore_args=0` instead. diff --git a/docs/platforms/php/guides/laravel/index.mdx b/docs/platforms/php/guides/laravel/index.mdx index 5ab257f9889d6..61024dd2ccb50 100644 --- a/docs/platforms/php/guides/laravel/index.mdx +++ b/docs/platforms/php/guides/laravel/index.mdx @@ -50,7 +50,6 @@ Alternatively, you can configure Sentry in your [Laravel Log Channel](usage/#log Configure the Sentry DSN with this command: - ```shell php artisan sentry:publish --dsn=___PUBLIC_DSN___ @@ -58,7 +57,6 @@ php artisan sentry:publish --dsn=___PUBLIC_DSN___ It creates the config file (`config/sentry.php`) and adds the `DSN` to your `.env` file. - ```shell {filename:.env} SENTRY_LARAVEL_DSN=___PUBLIC_DSN___ diff --git a/docs/platforms/php/guides/laravel/other-versions/laravel4.mdx b/docs/platforms/php/guides/laravel/other-versions/laravel4.mdx index 8ecdbac065ee6..b3ff03a0be7ed 100644 --- a/docs/platforms/php/guides/laravel/other-versions/laravel4.mdx +++ b/docs/platforms/php/guides/laravel/other-versions/laravel4.mdx @@ -45,7 +45,6 @@ php artisan config:publish sentry/sentry-laravel Add your DSN to `config/sentry.php`: - ```php {filename:config/sentry.php} ```shell php artisan sentry:publish --dsn=___PUBLIC_DSN___ @@ -60,7 +59,6 @@ php artisan sentry:publish --dsn=___PUBLIC_DSN___ It creates the config file (`config/sentry.php`) and adds the `DSN` to your `.env` file. - ```shell {filename:.env} SENTRY_LARAVEL_DSN=___PUBLIC_DSN___ diff --git a/docs/platforms/php/guides/laravel/other-versions/laravel6-7.mdx b/docs/platforms/php/guides/laravel/other-versions/laravel6-7.mdx index 17061d0beaa7f..6146f7635b7f4 100644 --- a/docs/platforms/php/guides/laravel/other-versions/laravel6-7.mdx +++ b/docs/platforms/php/guides/laravel/other-versions/laravel6-7.mdx @@ -46,7 +46,6 @@ public function report(Exception $exception) Configure the Sentry DSN with this command: - ```shell php artisan sentry:publish --dsn=___PUBLIC_DSN___ @@ -54,7 +53,6 @@ php artisan sentry:publish --dsn=___PUBLIC_DSN___ It creates the config file (`config/sentry.php`) and adds the `DSN` to your `.env` file. - ```shell {filename:.env} SENTRY_LARAVEL_DSN=___PUBLIC_DSN___ diff --git a/docs/platforms/php/guides/laravel/other-versions/laravel8-10.mdx b/docs/platforms/php/guides/laravel/other-versions/laravel8-10.mdx index a49c09b157d4d..cdd139d20eeb2 100644 --- a/docs/platforms/php/guides/laravel/other-versions/laravel8-10.mdx +++ b/docs/platforms/php/guides/laravel/other-versions/laravel8-10.mdx @@ -39,7 +39,6 @@ Alternatively, you can configure Sentry in your [Laravel Log Channel](/platforms Configure the Sentry DSN with this command: - ```shell php artisan sentry:publish --dsn=___PUBLIC_DSN___ @@ -47,7 +46,6 @@ php artisan sentry:publish --dsn=___PUBLIC_DSN___ It creates the config file (`config/sentry.php`) and adds the `DSN` to your `.env` file. - ```shell {filename:.env} SENTRY_LARAVEL_DSN=___PUBLIC_DSN___ diff --git a/docs/platforms/php/guides/laravel/other-versions/lumen.mdx b/docs/platforms/php/guides/laravel/other-versions/lumen.mdx index cddf0292f6668..a2951246a575d 100644 --- a/docs/platforms/php/guides/laravel/other-versions/lumen.mdx +++ b/docs/platforms/php/guides/laravel/other-versions/lumen.mdx @@ -51,7 +51,6 @@ cp vendor/sentry/sentry-laravel/config/sentry.php config/sentry.php Afterwards, add your DSN to `.env`: - ```shell {filename:.env} SENTRY_LARAVEL_DSN=___PUBLIC_DSN___ diff --git a/docs/platforms/php/guides/symfony/configuration/symfony-options.mdx b/docs/platforms/php/guides/symfony/configuration/symfony-options.mdx index add7e2b453e44..0c4ba4e6e6379 100644 --- a/docs/platforms/php/guides/symfony/configuration/symfony-options.mdx +++ b/docs/platforms/php/guides/symfony/configuration/symfony-options.mdx @@ -8,7 +8,6 @@ In addition to the [configuration available in the PHP SDK](../options/), there All configuration for Symfony is done in `config/packages/sentry.yaml`. - {/* */} ```yaml {filename:config/packages/sentry.yaml} @@ -66,7 +65,7 @@ sentry: max_request_body_size: "medium" class_serializers: App\User: "App\\Sentry\\Serializer\\UserSerializer" - + ``` The DSN option is the only required option: it sets the Sentry DSN, and so reports all events to the related project. If it's diff --git a/docs/platforms/php/guides/symfony/data-management/data-collected.mdx b/docs/platforms/php/guides/symfony/data-management/data-collected.mdx new file mode 100644 index 0000000000000..5150cddf9172d --- /dev/null +++ b/docs/platforms/php/guides/symfony/data-management/data-collected.mdx @@ -0,0 +1,65 @@ +--- +title: Data Collected +description: "See what data is collected by the Sentry SDK." +sidebar_order: 1 +--- + +Sentry takes data privacy very seriously and has default settings in place that prioritize data safety, especially when it comes to personally identifiable information (PII) data. When you add the Sentry SDK to your application, you allow it to collect data and send it to Sentry during the runtime of your application. + +The category types and amount of data collected vary, depending on the integrations you've enabled in the Sentry SDK. Here's a list of data categories the Sentry PHP SDK collects: + +## HTTP Headers + +By default, the Sentry SDK doesn't send any HTTP headers. + +To start sending HTTP headers, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Cookies + +By default, the Sentry SDK doesn't send cookies. + +If you want to send cookies, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Information About Logged-in User + +By default, the Sentry SDK doesn't send any information about the logged-in user, (such as user id, or impersonator username). + +To start sending logged-in user information, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Users' IP Address + +By default, the Sentry SDK doesn't send the user's IP address. + +To enable sending the user's IP address, set the [`send_default_pii` option](../configuration/options/#send-default-pii) to `true`. + +## Request URL + +The full request URL of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. + +## Request Query String + +The full request query string of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. + +## Request Body + +The request body of incoming HTTP requests can be sent to Sentry. Whether it's sent or not, depends on the type and size of request body as described below: + +- **The type of the request body:** + -JSON and form bodies are sent + -Raw request bodies are always removed + -Uploaded files in the request bodies are never sent to Sentry +- **The size of the request body:** There's a [`max_request_body_size` option](../configuration/options/#max-request-body-size) that's set to `medium` by default. This means that larger request bodies aren't sent to Sentry. + +If you want to prevent bodies from being sent to Sentry altogether, set `max_request_body_size` to `'never'`. + +## Source Context + +When an unhandled exception is sent to Sentry, a snapshot of the source code surrounding the line where the error originates is sent with it. + +To opt out of sending this source context to Sentry, set the [`context_lines` option](../configuration/options/#context-lines) to `0`. + +## Local Variables In Stack Trace + +When unhandled errors and exceptions are sent to Sentry, the names and values of local variables that were set when the errors occurred, are sent at the same time. + +You can stop sending local variables to Sentry by setting `zend.exception_ignore_args=1` in your `php.ini`. On some distributions, this setting is already set to `1` by default and if you want to include local variables set `zend.exception_ignore_args=0` instead. diff --git a/docs/platforms/php/guides/symfony/index.mdx b/docs/platforms/php/guides/symfony/index.mdx index 3170539b0e0de..b1552dfc824f2 100644 --- a/docs/platforms/php/guides/symfony/index.mdx +++ b/docs/platforms/php/guides/symfony/index.mdx @@ -21,7 +21,6 @@ composer require sentry/sentry-symfony Add your DSN to your `.env` file: - ```plain {filename:.env} ###> sentry/sentry-symfony ### diff --git a/docs/platforms/php/index.mdx b/docs/platforms/php/index.mdx index cb556bd7ffa52..4507355acbd78 100644 --- a/docs/platforms/php/index.mdx +++ b/docs/platforms/php/index.mdx @@ -48,7 +48,6 @@ The Excimer PHP extension supports PHP 7.2 and up. Excimer requires Linux or mac To capture all errors, even the one during the startup of your application, you should initialize the Sentry PHP SDK as soon as possible. - ```php {"onboardingOptions": {"performance": "3-4", "profiling": "5-6"}} \Sentry\init([ diff --git a/docs/platforms/php/legacy-sdk/index.mdx b/docs/platforms/php/legacy-sdk/index.mdx index 8d291cdb5b387..2e00019e7a983 100644 --- a/docs/platforms/php/legacy-sdk/index.mdx +++ b/docs/platforms/php/legacy-sdk/index.mdx @@ -50,7 +50,6 @@ Alternatively you can manually install it: The most important part is the creation of the raven client. Create it once and reference it from anywhere you want to interface with Sentry: - ```php $client = new Raven_Client('___PUBLIC_DSN___'); diff --git a/docs/platforms/php/legacy-sdk/integrations.mdx b/docs/platforms/php/legacy-sdk/integrations.mdx index 9ddd0ab0f124a..5d3163177b745 100644 --- a/docs/platforms/php/legacy-sdk/integrations.mdx +++ b/docs/platforms/php/legacy-sdk/integrations.mdx @@ -60,7 +60,6 @@ php artisan vendor:publish --provider="Sentry\SentryLaravel\SentryLaravelService Add your DSN to `.env`: - ```bash SENTRY_LARAVEL_DSN=___PUBLIC_DSN___ @@ -102,7 +101,6 @@ class Handler extends ExceptionHandler Next, create `resources/views/errors/500.blade.php`, and embed the feedback code: - ```html
@@ -163,7 +161,6 @@ php artisan config:publish sentry/sentry-laravel Add your DSN to `config/sentry.php`: - ```php ```php ```php 'dsn' => '___PUBLIC_DSN___', @@ -334,7 +329,6 @@ Defaults to `true`. Monolog supports Sentry out of the box, so you’ll just need to configure a handler: - ```php $client = new Raven_Client('___PUBLIC_DSN___'); @@ -373,7 +367,6 @@ $monolog->pushProcessor(function ($record) { Sentry provides a breadcrumb handler to automatically send logs along as crumbs: - ```php $client = new Raven_Client('___PUBLIC_DSN___'); @@ -422,7 +415,6 @@ public function registerBundles() Add your DSN to `app/config/config.yml`: - ```yaml sentry: diff --git a/docs/platforms/php/legacy-sdk/usage.mdx b/docs/platforms/php/legacy-sdk/usage.mdx index 2446db3c84fa2..64f9d84e1df1c 100644 --- a/docs/platforms/php/legacy-sdk/usage.mdx +++ b/docs/platforms/php/legacy-sdk/usage.mdx @@ -20,7 +20,6 @@ Using Sentry with PHP is straightforward. After installation of the library you The most important part is the creation of the raven client. Create it once and reference it from anywhere you want to interface with Sentry: - ```php $sentryClient = new Raven_Client('___PUBLIC_DSN___'); @@ -173,7 +172,6 @@ $sentryClient->getLastEventID(); To enable user feedback for crash reports, you will need to create an error handler which is aware of the last event ID. - ```php ```html @@ -279,7 +276,6 @@ if (!$my_file) { The PHP client includes a simple helper script to test your connection and credentials with the Sentry master server: - ```bash bin/sentry test ___PUBLIC_DSN___ diff --git a/docs/platforms/python/configuration/options.mdx b/docs/platforms/python/configuration/options.mdx index 981aeb38d752b..140d266d2383f 100644 --- a/docs/platforms/python/configuration/options.mdx +++ b/docs/platforms/python/configuration/options.mdx @@ -219,7 +219,7 @@ When set to `False`, no auto-enabling integrations will be enabled by default, e Configures whether [default integrations](/platforms/python/integrations/default-integrations/) should be enabled. The default is `True`. -Setting `default_integrations` to `False` disables all default integrations **as well as all auto-enabling integrations**, unless they are specifically added in the `integrations` option, described above. +Setting `default_integrations` to `False` disables all default integrations **as well as all auto-enabling integrations**, unless they are specifically added in the `integrations` option, described above. ## Hooks @@ -386,3 +386,23 @@ The threshold in milliseconds for adding the source location to database queries Default is `100` ms. + + + +A custom [repr](https://docs.python.org/3/library/functions.html#repr) function to run while serializing an object. Use this to control how your custom objects and classes are visible in Sentry. + +Return a string for that repr value to be used or `None` to continue serializing how Sentry would have done it anyway. + +```python +def custom_repr(obj): + if isinstance(obj, MyCustomClass): + return "" + else + return None + +sentry_sdk.init(custom_repr=custom_repr) +``` + +Default is `None`. + + diff --git a/docs/platforms/python/index.mdx b/docs/platforms/python/index.mdx index 1d9c2970b4293..16785f9a8394c 100644 --- a/docs/platforms/python/index.mdx +++ b/docs/platforms/python/index.mdx @@ -36,7 +36,6 @@ pip install --upgrade sentry-sdk Configuration should happen as early as possible in your application's lifecycle. - ```python {"onboardingOptions": {"performance": "5-7", "profiling": "8-11"}} diff --git a/docs/platforms/python/integrations/airflow/index.mdx b/docs/platforms/python/integrations/airflow/index.mdx index 48e93306c7fdd..d1286882c23a2 100644 --- a/docs/platforms/python/integrations/airflow/index.mdx +++ b/docs/platforms/python/integrations/airflow/index.mdx @@ -15,7 +15,6 @@ pip install 'apache-airflow[sentry]' Then, add your Sentry DSN to your configuration file (ex. `airflow.cfg`) under the `[sentry]` field. - ```ini {filename:airflow.cfg} [sentry] diff --git a/docs/platforms/python/integrations/asgi/index.mdx b/docs/platforms/python/integrations/asgi/index.mdx index 815a8c6da5a8f..2ca7e8dad2910 100644 --- a/docs/platforms/python/integrations/asgi/index.mdx +++ b/docs/platforms/python/integrations/asgi/index.mdx @@ -19,7 +19,10 @@ pip install --upgrade 'sentry-sdk' ## Configure - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. ```docker {tabTitle: Dockerfile} ENV SENTRY_INITIAL_HANDLER="" diff --git a/docs/platforms/python/integrations/aws-lambda/manual-instrumentation/index.mdx b/docs/platforms/python/integrations/aws-lambda/manual-instrumentation/index.mdx index f8edc03ca21fd..df211dc279f26 100644 --- a/docs/platforms/python/integrations/aws-lambda/manual-instrumentation/index.mdx +++ b/docs/platforms/python/integrations/aws-lambda/manual-instrumentation/index.mdx @@ -31,7 +31,10 @@ pip install --target ./package --upgrade sentry-sdk Here's how to use the AWS Lambda integration for the Python SDK: - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. If you're using another web framework inside of AWS Lambda, that framework may catch exceptions before we see them. Make sure to enable the framework-specific integration if it exists. See [_the Python main page_](/platforms/python/) for more information. diff --git a/docs/platforms/python/integrations/beam/index.mdx b/docs/platforms/python/integrations/beam/index.mdx index 998ec3f832dbe..6f1e4971993d5 100644 --- a/docs/platforms/python/integrations/beam/index.mdx +++ b/docs/platforms/python/integrations/beam/index.mdx @@ -11,7 +11,10 @@ A Beam version of 2.12 or later is required. Add `BeamIntegration()` to your `integrations` list: - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. ```python sentry_sdk.init( diff --git a/docs/platforms/python/integrations/cloudresourcecontext/index.mdx b/docs/platforms/python/integrations/cloudresourcecontext/index.mdx index 1bc4ef8c48b79..afeea531557d8 100644 --- a/docs/platforms/python/integrations/cloudresourcecontext/index.mdx +++ b/docs/platforms/python/integrations/cloudresourcecontext/index.mdx @@ -17,7 +17,10 @@ pip install --upgrade 'sentry-sdk' Add `CloudResourceContextIntegration()` to your `integrations` list: - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + This is the successor of the original `DramatiqIntegration` that can be found here: https://github.com/jacobsvante/sentry-dramatiq + + The original maintainer has [donated the integration to Sentry](https://github.com/getsentry/sentry-python/issues/3387), so we can take over maintenance. + + +## Install + +To get started, install `sentry-sdk` from PyPI. + +```bash +pip install --upgrade sentry-sdk +``` + +## Configure + +Add `DramatiqIntegration()` to your `integrations` list: + + +```python +import sentry_sdk +from sentry_sdk.integrations.dramatiq import DramatiqIntegration + +sentry_sdk.init( + dsn="___PUBLIC_DSN___", + integrations=[ + DramatiqIntegration(), + ], +) +``` + +## Verify + +Trigger an error in your code to verify that the integration is sending events to Sentry. + +```python +import dramatiq + +import sentry_sdk +sentry_sdk.init(...) # same as above + +@dramatiq.actor(max_retries=0) +def dummy_actor(x, y): + return x / y + +dummy_actor.send(5, 0) +``` + +Running this will create an error event (`ZeroDivisionError`) that you should be able to see in [sentry.io](https://sentry.io). + +## Supported Versions + +- Dramatiq: 1.13+ +- Python: 3.6+ + + diff --git a/docs/platforms/python/integrations/gcp-functions/index.mdx b/docs/platforms/python/integrations/gcp-functions/index.mdx index 23252ea1b34df..1681bc684eef2 100644 --- a/docs/platforms/python/integrations/gcp-functions/index.mdx +++ b/docs/platforms/python/integrations/gcp-functions/index.mdx @@ -23,7 +23,9 @@ Limited Sentry support is available on newer Python runtimes by directly enablin You can use the Google Cloud Functions integration for the Python SDK like this: - +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. If you are using a web framework inside of your Cloud Function, the framework might catch those exceptions before we get to see them. Make sure to enable the framework specific integration as well, if one exists. See [_the Python main page_](/platforms/python/) for more information. diff --git a/docs/platforms/python/integrations/gnu_backtrace/index.mdx b/docs/platforms/python/integrations/gnu_backtrace/index.mdx index 3eba40e06367e..38fca9de1df96 100644 --- a/docs/platforms/python/integrations/gnu_backtrace/index.mdx +++ b/docs/platforms/python/integrations/gnu_backtrace/index.mdx @@ -19,7 +19,6 @@ pip install --upgrade 'sentry-sdk' Add `GnuBacktraceIntegration()` to your `integrations` list: - ```python import sentry_sdk diff --git a/docs/platforms/python/integrations/grpc/index.mdx b/docs/platforms/python/integrations/grpc/index.mdx index bb91b7604bd04..9dcc37069ab34 100644 --- a/docs/platforms/python/integrations/grpc/index.mdx +++ b/docs/platforms/python/integrations/grpc/index.mdx @@ -22,7 +22,10 @@ Add `GRPCIntegration()` to your `integrations` list, and enable tracing. This will add appropriate intercepters to your server/client to capture errors and performance data. - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. | ✓ | | | ✓ | | | ✓ | +| | | | | ✓ | ### Databases @@ -46,15 +47,17 @@ The Sentry SDK uses integrations to hook into the functionality of popular libra ### Data Processing -| | **Auto-enabled** | -| ---------------------------------------------------------------------------------------------------------------------- | :--------------: | -| | | -| | | -| | | -| | ✓ | -| | ✓ | -| | ✓ | -| | ✓ | +| | **Auto-enabled** | +| ------------------------------------------------------------------------------------------------------------------------ | :--------------: | +| | | +| | | +| | | +| | ✓ | +| | ✓ | +| | | +| | ✓ | +| | ✓ | +| | | ### Cloud Computing @@ -148,7 +151,6 @@ sentry_sdk.init( ) ``` - ### Disabling Integrations To disable an integration, use the [`disabled_integrations`](/platforms/python/configuration/options/#disabled-integrations) config option: @@ -167,11 +169,11 @@ sentry_sdk.init( It's also possible to disable all automatically-added integrations. There are two types: -* **Auto-enabled integrations** like `FlaskIntegration` are automatically added +- **Auto-enabled integrations** like `FlaskIntegration` are automatically added if the SDK detects that you have a corresponding package (like Flask) installed. This happens when the [`auto_enabling_integrations`](/platforms/python/configuration/options/#auto-enabling-integrations) option is set to `True` (default). -* **Default integrations** like `logging` or `excepthook` are always enabled, +- **Default integrations** like `logging` or `excepthook` are always enabled, regardless of what packages you have installed, as long as the [`default_integrations`](/platforms/python/configuration/options/#default-integrations) option is `True` (default). They provide essential SDK functionality like error deduplication or event flushing at interpreter diff --git a/docs/platforms/python/integrations/langchain/index.mdx b/docs/platforms/python/integrations/langchain/index.mdx index 64772c47f3b9b..61a1051a7cf51 100644 --- a/docs/platforms/python/integrations/langchain/index.mdx +++ b/docs/platforms/python/integrations/langchain/index.mdx @@ -30,7 +30,10 @@ If you have the `langchain` package in your dependencies, the Langchain integrat An additional dependency, `tiktoken`, is required to be installed if you want to calculate token usage for streaming chat responses. - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + +```python {"onboardingOptions": {"performance": "6-8", "profiling": "9-12"}} +import sentry_sdk +from sentry_sdk.integrations.litestar import LitestarIntegration + +sentry_sdk.init( + dsn="___PUBLIC_DSN___", + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for tracing. + traces_sample_rate=1.0, + # Set profiles_sample_rate to 1.0 to profile 100% + # of sampled transactions. + # We recommend adjusting this value in production. + profiles_sample_rate=1.0, + integrations=[ + LitestarIntegration(), + ], +) +``` + +## Verify + +```python +from litestar import Litestar, get + +sentry_sdk.init(...) # same as above + +@get("/hello") +async def hello_world() -> str: + 1 / 0 + return "Hello!" + +app = Litestar(route_handlers=[hello_world]) +``` + +Save the file above as `app.py` and start the development server with: + +```bash +uvicorn app:app +``` + +When you point your browser to [http://localhost:8000/hello](http://localhost:8000/hello) a transaction will be created in the Performance section of [sentry.io](https://sentry.io). Additionally, the `ZeroDivisionError` we've snuck into our `hello_world` handler will be sent to [sentry.io](https://sentry.io) and will be connected to the transaction. + +It takes a couple of moments for the data to appear in [sentry.io](https://sentry.io). + +## Supported Versions + + + +Litestar was [renamed from Starlite](https://litestar.dev/about/organization.html#litestar-and-starlite) +with the release of version 2.0. We support different integrations for each one. This guide applies to Litestar. +See [Starlite integration](/platforms/python/integrations/starlite) for the guide that applies to Starlite. + + + +- Litestar: 2.0.0+ +- Python: 3.8+ diff --git a/docs/platforms/python/integrations/logging/index.mdx b/docs/platforms/python/integrations/logging/index.mdx index dde8bdf605ea3..9e6806f12d3cf 100644 --- a/docs/platforms/python/integrations/logging/index.mdx +++ b/docs/platforms/python/integrations/logging/index.mdx @@ -17,7 +17,6 @@ pip install --upgrade sentry-sdk The logging integrations is a default integration so it will be enabled automatically when you initialize the Sentry SDK. - ```python import sentry_sdk diff --git a/docs/platforms/python/integrations/loguru/index.mdx b/docs/platforms/python/integrations/loguru/index.mdx index 82f2b4724f1dc..878a31984726d 100644 --- a/docs/platforms/python/integrations/loguru/index.mdx +++ b/docs/platforms/python/integrations/loguru/index.mdx @@ -19,7 +19,6 @@ pip install --upgrade 'sentry-sdk[loguru]' If you have the `loguru` package in your dependencies, the Loguru integration will be enabled automatically when you initialize the Sentry SDK. - ```python import sentry_sdk diff --git a/docs/platforms/python/integrations/pure_eval/index.mdx b/docs/platforms/python/integrations/pure_eval/index.mdx index d2de3f8ae7bf0..ae5e72f391af9 100644 --- a/docs/platforms/python/integrations/pure_eval/index.mdx +++ b/docs/platforms/python/integrations/pure_eval/index.mdx @@ -17,7 +17,6 @@ pip install --upgrade 'sentry-sdk[pure_eval]' Add `PureEvalIntegration()` to your `integrations` list: - ```python import sentry_sdk diff --git a/docs/platforms/python/integrations/ray/index.mdx b/docs/platforms/python/integrations/ray/index.mdx new file mode 100644 index 0000000000000..bef4855b8bfa9 --- /dev/null +++ b/docs/platforms/python/integrations/ray/index.mdx @@ -0,0 +1,99 @@ +--- +title: Ray +description: "Learn how to import and use the Ray integration." +--- + +The Ray integration adds support for the [Ray](https://www.ray.io/) unified compute framework. + +## Install + +To get started, install `sentry-sdk` from PyPI. + +```bash +pip install --upgrade sentry-sdk +``` + +## Configure + +Add `RayIntegration()` to your `integrations` list: + + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + + + +```python {"onboardingOptions": {"performance": "9-11", "profiling": "12-15"}} +import ray + +import sentry_sdk +from sentry_sdk.integrations.ray import RayIntegration + +def init_sentry(): + sentry_sdk.init( + dsn="___PUBLIC_DSN___", + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for tracing. + traces_sample_rate=1.0, + # Set profiles_sample_rate to 1.0 to profile 100% + # of sampled transactions. + # We recommend adjusting this value in production. + profiles_sample_rate=1.0, + integrations=[ + RayIntegration(), + ], + ) + +init_sentry() + +ray.init( + runtime_env={"worker_process_setup_hook": init_sentry}, +) +``` + +Be sure to call `sentry_sdk.init()` before you call `ray.init()`. + +By setting the `worker_process_setup_hook` we make sure that `sentry_sdk.init()` is called inside Ray worker processes during startup. This allows Sentry to connect code running in the worker with the calling code. + +## Verify + +Trigger an error in your code to verify that the integration is sending events to Sentry. + +```python +def init_sentry(): + sentry_sdk.init(...) # same as above + +init_sentry() + +ray.init( + runtime_env={"worker_process_setup_hook": init_sentry}, +) + +@ray.remote +def divide(a, b): + return a/b + +with sentry_sdk.start_transaction(name="ray-test"): + futures = [ + divide.remote(10, 5), + divide.remote(10, 0), + ] + print(ray.get(futures)) +``` + +Running this will create an error event (`ZeroDivisionError`) that will be sent to [sentry.io](https://sentry.io). Additionally, trace information will be created in the Performance section of [sentry.io](https://sentry.io). + +## Behavior + +- All unhandled exceptions will be captured and can be seen on [sentry.io](https://sentry.io). +- Performance data will be captured and available in the Performance section of [sentry.io](https://sentry.io). +- Performance data from [Ray Tasks](https://docs.ray.io/en/latest/ray-core/tasks.html) will be captured and linked to the calling code. +- **Note**: Capturing performance data from [Ray Actors](https://docs.ray.io/en/latest/ray-core/actors.html) is currently **not supported**. (As always, [PRs are welcome](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md)) + +## Supported Versions + +- Ray: 2.34+ +- Python: 3.8+ diff --git a/docs/platforms/python/integrations/rq/index.mdx b/docs/platforms/python/integrations/rq/index.mdx index f37daa92f87f3..74267737c4200 100644 --- a/docs/platforms/python/integrations/rq/index.mdx +++ b/docs/platforms/python/integrations/rq/index.mdx @@ -19,7 +19,10 @@ If you have the `rq` package in your dependencies, the RQ integration will be en Create a file called `mysettings.py` with the following content: - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. ```python {filename:app.py} {"onboardingOptions": {"performance": "6-8", "profiling": "9-12"}} # app.py diff --git a/docs/platforms/python/integrations/sanic/index.mdx b/docs/platforms/python/integrations/sanic/index.mdx index 7042dcc035eef..82174266027aa 100644 --- a/docs/platforms/python/integrations/sanic/index.mdx +++ b/docs/platforms/python/integrations/sanic/index.mdx @@ -27,7 +27,10 @@ To ensure that errors occuring in background tasks get reported to Sentry, we al The example below demonstrates the simplest recommended setup. - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. ```python {filename:sentry-daemon.py} {"onboardingOptions": {"performance": "8-10", "profiling": "11-14"}} import sentry_sdk diff --git a/docs/platforms/python/integrations/starlite/index.mdx b/docs/platforms/python/integrations/starlite/index.mdx index 1640d8430d3c8..c6c9970bd17da 100644 --- a/docs/platforms/python/integrations/starlite/index.mdx +++ b/docs/platforms/python/integrations/starlite/index.mdx @@ -49,8 +49,8 @@ It takes a couple of moments for the data to appear in [sentry.io](https://sentr Starlite was [renamed to Litestar](https://litestar.dev/about/organization.html#litestar-and-starlite) -with the release of version 2.0. We don't support Litestar yet, so this guide only applies to Starlite 1.51.14 -and below. +with the release of version 2.0. We support different integrations for each one. This guide applies to Starlite. +See [Litestar integration](/platforms/python/integrations/litestar) for the guide that applies to Litestar. diff --git a/docs/platforms/python/integrations/strawberry/index.mdx b/docs/platforms/python/integrations/strawberry/index.mdx index be78d2103f965..69c88db0bb1ff 100644 --- a/docs/platforms/python/integrations/strawberry/index.mdx +++ b/docs/platforms/python/integrations/strawberry/index.mdx @@ -19,7 +19,10 @@ pip install --upgrade sentry-sdk Add `StrawberryIntegration()` to your `integrations` list: - + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. ```html diff --git a/docs/platforms/python/legacy-sdk/usage.mdx b/docs/platforms/python/legacy-sdk/usage.mdx index c1781414e98ea..d9fa5fd0205a2 100644 --- a/docs/platforms/python/legacy-sdk/usage.mdx +++ b/docs/platforms/python/legacy-sdk/usage.mdx @@ -100,7 +100,6 @@ raven test You should get something like the following, assuming you’re configured everything correctly: - ```bash raven test sync+___DSN___ diff --git a/docs/platforms/python/migration/1.x-to-2.x.mdx b/docs/platforms/python/migration/1.x-to-2.x.mdx index ca620c20b6c49..1d22b35e431b2 100644 --- a/docs/platforms/python/migration/1.x-to-2.x.mdx +++ b/docs/platforms/python/migration/1.x-to-2.x.mdx @@ -20,7 +20,6 @@ The deprecated `with_locals` and `request_bodies` options have been removed in f **These are all potential changes you need to apply to your init**: - ```python diff import sentry_sdk @@ -67,7 +66,7 @@ The old APIs will continue to work in 2.0, but we recommend migrating to their n ### Activating a Custom Hub -If you were using a custom hub to isolate event data, we recommend using a custom isolation scope instead. To activate the custom isolation scope, you will need to explicitly pass the isolation scope to the `use_isolation_scope`, which creates a context manager that activates the scope. Here is an example of how to change your code to make it work: +If you were using a custom hub to isolate event data, we recommend using a custom isolation scope instead. To activate the custom isolation scope, you will need to explicitly pass the isolation scope to `use_isolation_scope`, which creates a context manager that activates the scope. Here is an example of how to change your code to make it work: ```python diff import sentry_sdk @@ -106,7 +105,7 @@ If you previously used `with sentry_sdk.Hub(sentry_sdk.Hub.current)` to clone th `sentry_sdk.isolation_scope` is a context manager that creates a new isolation scope by forking the current isolation scope. The forked isolation scope is activated during the context manager's lifetime, providing a similar level of isolation within the context manager as the previous `Hub`-based approach. -Note that using `sentry_sdk.isolation_scope()` is equivalent to `sentry_sdk.scope.use_isolation_scope(sentry_sdk.Scope.get_isolation_scope().fork())`. +Note that using `sentry_sdk.isolation_scope()` is equivalent to `sentry_sdk.scope.use_isolation_scope(sentry_sdk.get_isolation_scope().fork())`. ### Scope Configuring @@ -118,18 +117,18 @@ a task, and so on) or just a specific part of the code. If you want your scope change to affect a smaller unit of code such as a span, use the current scope. ```python diff -- with configure_scope() as scope: +- with sentry_sdk.configure_scope() as scope: - # do something with scope -+ scope = Scope.get_current_scope() ++ scope = sentry_sdk.get_current_scope() + # do something with scope ``` If you want your scope change to affect the whole transaction, use the isolation scope. ```python diff -- with configure_scope() as scope: +- with sentry_sdk.configure_scope() as scope: - # do something with scope -+ scope = Scope.get_isolation_scope() ++ scope = sentry_sdk.get_isolation_scope() + # do something with scope ``` @@ -143,7 +142,7 @@ transaction = sentry_sdk.transaction(...) - with sentry_sdk.configure_scope() as scope: - scope.set_transaction_name("new-transaction-name") -+ scope = sentry_sdk.Scope.get_current_scope() ++ scope = sentry_sdk.get_current_scope() + scope.set_transaction_name("new-transaction-name") ``` @@ -154,18 +153,18 @@ Scope pushing translates to forking a scope in `2.0`. You either want to fork th If you only want to apply something to a smaller, localized part of the code, fork the current scope with `new_scope()`: ```python diff -- with push_scope() as scope: +- with sentry_sdk.push_scope() as scope: - # do something -+ with new_scope() as scope: ++ with sentry_sdk.new_scope() as scope: + # do something ``` If you're wrapping a whole request-response cycle or a whole execution of a task, fork the isolation scope: ```python diff -- with push_scope() as scope: +- with sentry_sdk.push_scope() as scope: - # do something -+ with isolation_scope() as scope: ++ with sentry_sdk.isolation_scope() as scope: + # do something ``` diff --git a/docs/platforms/python/migration/raven-to-sentry-sdk.mdx b/docs/platforms/python/migration/raven-to-sentry-sdk.mdx index 33bb76e2ad262..a12fe2b9287cb 100644 --- a/docs/platforms/python/migration/raven-to-sentry-sdk.mdx +++ b/docs/platforms/python/migration/raven-to-sentry-sdk.mdx @@ -12,7 +12,6 @@ The installation is now the same regardless of framework or library you integrat **Old**: - ```python import raven @@ -21,7 +20,6 @@ client = raven.Client("___PUBLIC_DSN___", release="1.3.0") **New**: - ```python import sentry_sdk diff --git a/docs/platforms/python/profiling/index.mdx b/docs/platforms/python/profiling/index.mdx index 05e3710cf79dd..5a3ee12b813e8 100644 --- a/docs/platforms/python/profiling/index.mdx +++ b/docs/platforms/python/profiling/index.mdx @@ -15,7 +15,6 @@ Python profiling is stable as of SDK version `1.18.0`. - ```python import sentry_sdk diff --git a/docs/platforms/python/profiling/troubleshooting/index.mdx b/docs/platforms/python/profiling/troubleshooting/index.mdx index 0b2feed1c7b23..09bc08df9eb11 100644 --- a/docs/platforms/python/profiling/troubleshooting/index.mdx +++ b/docs/platforms/python/profiling/troubleshooting/index.mdx @@ -16,7 +16,6 @@ If you don't see any profiling data in [sentry.io](https://sentry.io), you can t The feature was experimental prior to version `1.17.0`. To update your SDK to the latest version, remove `profiles_sample_rate` from `_experiments` and set it in the top-level options. - ```python sentry_sdk.init( diff --git a/docs/platforms/python/tracing/index.mdx b/docs/platforms/python/tracing/index.mdx index fe51ee828c5eb..9ccfcbef5d020 100644 --- a/docs/platforms/python/tracing/index.mdx +++ b/docs/platforms/python/tracing/index.mdx @@ -12,7 +12,6 @@ sidebar_order: 4000 To enable tracing in your application, adjust the `traces_sample_rate` based on the number of trace samples you want to send to Sentry by adding the highlighted code snippet below. (Setting a value of `1.0` will send 100% of your traces.) - ```python {diff} import sentry_sdk diff --git a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/caches-module.mdx b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/caches-module.mdx index 550698b26a1f4..29ae19fd7f3b1 100644 --- a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/caches-module.mdx +++ b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/caches-module.mdx @@ -89,7 +89,7 @@ with sentry_sdk.start_span(op="cache.get") as span: # Optionally also add the size of the value you retrieved span.set_data("cache.item_size", len(value)) - else + else: # If you could not retrieve a value, it was a miss span.set_data("cache.hit", False) ``` diff --git a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/index.mdx b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/index.mdx index df047c6142a06..0ae765af70b88 100644 --- a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/index.mdx +++ b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/index.mdx @@ -125,7 +125,6 @@ def eat_slice(slice): To avoid having custom performance instrumentation code scattered all over your code base, pass a parameter to your `sentry_sdk.init()` call. - ```python import sentry_sdk diff --git a/docs/platforms/react-native/index.mdx b/docs/platforms/react-native/index.mdx index 60dcc76db1a13..2d1ef4768d228 100644 --- a/docs/platforms/react-native/index.mdx +++ b/docs/platforms/react-native/index.mdx @@ -1,5 +1,6 @@ --- title: React Native +description: Learn how to set up Sentry's React Native SDK. sdk: sentry.javascript.react-native fallbackPlatform: javascript caseStyle: camelCase @@ -8,7 +9,7 @@ categories: - mobile --- -On this page, we get you up and running with Sentry's React Native SDK, automatically reporting errors and exceptions in your application. If you prefer to follow video instructions, see [How to Install the Sentry React Native SDK in 60 Seconds](https://vimeo.com/899369012). +Read on to find out how to set up Sentry's React Native SDK which will automatically report errors and exceptions in your application. If you prefer to follow video instructions, see [How to Install the Sentry React Native SDK in 60 Seconds](https://vimeo.com/899369012). @@ -16,6 +17,12 @@ If you don't already have an account and Sentry project established, head over t +## Features + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + ## Install ```javascript {filename:App.js} {"onboardingOptions": {"performance": "5-7", "profiling": "8-12"}} import * as Sentry from "@sentry/react-native"; diff --git a/docs/platforms/react-native/integrations/default.mdx b/docs/platforms/react-native/integrations/default.mdx index 420c62c089dc2..791a6ba039590 100644 --- a/docs/platforms/react-native/integrations/default.mdx +++ b/docs/platforms/react-native/integrations/default.mdx @@ -184,7 +184,6 @@ To disable system integrations, set `defaultIntegrations: false` when calling `i To override their settings, provide a new instance with your config to the `integrations` option. For example, to turn off browser capturing console calls: - ```javascript Sentry.init({ @@ -213,4 +212,3 @@ Sentry.init({ }, }); ``` - diff --git a/docs/platforms/react-native/manual-setup/native-init.mdx b/docs/platforms/react-native/manual-setup/native-init.mdx index ebce046f2aa81..f2ae5781bbd97 100644 --- a/docs/platforms/react-native/manual-setup/native-init.mdx +++ b/docs/platforms/react-native/manual-setup/native-init.mdx @@ -8,7 +8,6 @@ By default, the React Native SDK initializes the native SDK underneath the `init To do this, set [autoInitializeNativeSdk](/platforms/react-native/configuration/options/#autoInitializeNativeSdk) to `false` in the init options: - ```javascript Sentry.init({ diff --git a/docs/platforms/react-native/session-replay/index.mdx b/docs/platforms/react-native/session-replay/index.mdx index 515ac86f66d48..374063cb5c160 100644 --- a/docs/platforms/react-native/session-replay/index.mdx +++ b/docs/platforms/react-native/session-replay/index.mdx @@ -58,7 +58,6 @@ Sentry.init({ }); ``` - ## Verify diff --git a/docs/platforms/react-native/tracing/instrumentation/automatic-instrumentation.mdx b/docs/platforms/react-native/tracing/instrumentation/automatic-instrumentation.mdx index 4ebb98b6657ac..3d4b21c104f45 100644 --- a/docs/platforms/react-native/tracing/instrumentation/automatic-instrumentation.mdx +++ b/docs/platforms/react-native/tracing/instrumentation/automatic-instrumentation.mdx @@ -104,7 +104,6 @@ The tracing integration creates a child span for every `XMLHttpRequest` or `fetc To configure the automatic performance instrumentation, you will need to add the `ReactNativeTracing` integration yourself. We provide many options by default, so for the majority of apps you won't need to configure the integration yourself. - ```javascript import * as Sentry from "@sentry/react-native"; @@ -122,7 +121,6 @@ For all possible options, see [ReactNativeTracingOptions](https://github.com/get You can use `beforeNavigate` to modify the transaction from routing instrumentation before the transaction is created. If you prefer not to send the transaction, set `sampled = false`. - ```javascript Sentry.init({ @@ -249,7 +247,6 @@ When bundling for production, React Native will minify class and function names If you want to use tracing without our automatic instrumentation, you can disable it by setting `enableAutoPerformanceTracing` in your Sentry options and removing the `ReactNativeTracing` integration, if you added it: - ```javascript import * as Sentry from "@sentry/react-native"; diff --git a/docs/platforms/react-native/troubleshooting/index.mdx b/docs/platforms/react-native/troubleshooting/index.mdx index 71400e2ef2004..11ab0b0d78465 100644 --- a/docs/platforms/react-native/troubleshooting/index.mdx +++ b/docs/platforms/react-native/troubleshooting/index.mdx @@ -33,7 +33,6 @@ By default we will patch the global `Promise` instance to ensure it matches exac If you use a polyfilling library that patches the global `Promise` instance, you'll need to make sure you run the polyfill **after** `Sentry.init` is called. - ```javascript import allSettled from "promise.allsettled"; diff --git a/docs/platforms/react-native/user-feedback/index.mdx b/docs/platforms/react-native/user-feedback/index.mdx index 850d7d6cb0b15..d3379bd37a4a5 100644 --- a/docs/platforms/react-native/user-feedback/index.mdx +++ b/docs/platforms/react-native/user-feedback/index.mdx @@ -11,5 +11,3 @@ The user feedback API allows you to collect user feedback while utilizing your o Sentry pairs the feedback with the original event, giving you additional insight into issues. Sentry needs the `eventId` to be able to associate the user feedback to the corresponding event. For example, to get the `eventId`, you can use or the return value of the method capturing an event. - -Alternatively, you can use the [User Feedback API endpoint](/api/projects/submit-user-feedback/) directly. diff --git a/docs/platforms/ruby/common/configuration/options.mdx b/docs/platforms/ruby/common/configuration/options.mdx index 854558e86186d..9f387648402ca 100644 --- a/docs/platforms/ruby/common/configuration/options.mdx +++ b/docs/platforms/ruby/common/configuration/options.mdx @@ -1,74 +1,136 @@ --- title: Basic Options sidebar_order: 1 -description: "Learn more about how to configure the SDK." +description: "Learn more about configuration options for the SDK. These options are set when the SDK is first initialized and passed to the init function as an object." --- -Configuration is passed as part of the client initialization: +SDKs are configurable using a variety of options. The options are largely standardized among SDKs, but there are some differences to better accommodate platform peculiarities. Options are set when the SDK is first +initialized. - + + +## Common Options + +The below is a list of common options across SDKs. They work more or less the same in all SDKs with a few subtle differences to better support different platforms. Options that can be read from an environment variable (`SENTRY_DSN`, `SENTRY_ENVIRONMENT`, `SENTRY_RELEASE`) will be read automatically. + + + +The _DSN_ tells the SDK where to send events. If this value isn't provided, the SDK will try to read it from the `SENTRY_DSN` environment variable. If that variable doesn't exist, the SDK won't send any events. + +Learn more about [DSN utilization](/product/sentry-basics/dsn-explainer/#dsn-utilization). + + + + + +This turns debug mode on or off. When enabled, SDK errors will be logged with backtrace. +If you want more output, use `config.logger.level`. `debug` only works for attaching backtraces to the messages. + + + + + +The logger used by Sentry. The default for Rails is `Rails.logger`, otherwise it's `Sentry::Logger`. Make sure to change the logger level if you need debug output. **We don't recommend doing this in production unless absolutely necessary.** ```ruby -Sentry.init do |config| - config.dsn = '___PUBLIC_DSN___' - config.attr = 'value' -end +config.logger = Sentry::Logger.new(STDOUT) +config.logger.level = ::Logger::DEBUG # defaults to INFO ``` -## Optional settings + + + -`async` +Lets you track your application version in Sentry. -**This option has been deprecated and could be removed in the future.** +We intelligently guess the release in the following order of preference: -**For more information, please read [this issue](https://github.com/getsentry/sentry-ruby/issues/1522).** +- The `SENTRY_RELEASE` environment variable +- Commit SHA of the last commit (git) +- Reading from the `REVISION` file in the app root (used by Capistrano) +- Heroku’s dyno metadata via the `HEROKU_SLUG_COMMIT` environment variable (must have been enabled via Heroku Labs) -By default, `sentry-ruby` sends events asynchronously with its own background worker. This option only exists for compatibility reasons, and it's not recommended to new Sentry users. + -`background_worker_threads` + -If `config.async` isn't provided, Sentry will send events in a non-blocking way with its own background worker. By default, the worker holds a thread pool that has [the number of processors] threads. But you can configure it with this configuration option: + + +The sampling factor to apply to events. A value of 0.00 won't send any events, and a value of 1.00 will send 100% of events. ```ruby -config.background_worker_threads = 5 +# send 50% of events +config.sample_rate = 0.5 ``` -Or if you want to send events synchronously, set the value to 0: + + + + +This lets you attach diagnostic client reports about dropped events to an existing envelope max once every 30s. The default is `true`. If you **don't want to send this data**, opt-out by setting: ```ruby -config.background_worker_threads = 0 +config.send_client_reports = false + + +This information isn't currently visible to users, but we're planning on adding it to the user-facing UI in the near future. + +``` + + + + + +When its value is `false` (the default), sensitive information like: + +- user ip +- user cookie +- request body +- query string in the url + +won't be sent to Sentry. You can re-enable it by setting: + +```ruby +config.send_default_pii = true ``` -`backtrace_cleanup_callback` + + + -If you want to clean up exceptions' backtrace before it's sent to Sentry, you can specify a callback with `backtrace_cleanup_callback` to do that. For example: +A boolean to decide whether to send module (dependency) information to Sentry. The default is `true`. ```ruby -config.backtrace_cleanup_callback = lambda do |backtrace| - Rails.backtrace_cleaner.clean(backtrace) -end +config.send_modules = false # if you don't want to send all the dependency info ``` -`before_send` + -Provide a lambda or proc. This will be `called` before sending an error event to Sentry. Receives an `event` and `hint` as parameter. `hint` is a dict `{:exception => ex | nil, :message => message | nil}`. It is possible to mutate the event, also if this function returns `nil` the event will be dropped and not sent. + - +Whether to capture local variables from the raised exceptions frame. The default is `false`. (In older versions, this was called `capture_exception_frame_locals`.) -`before_send_transaction` + -Provide a lambda or proc. This will be `called` before sending a transaction event to Sentry. It receives an `event` and `hint` as a parameter. The `hint` object is currently empty, but might be augmented in the future. It's possible to mutate the event. Also, if this function returns `nil`, the event will be dropped and not sent. + - +The maximum number of breadcrumbs the SDK could hold. The default is `100`. -`breadcrumbs_logger` +```ruby +config.max_breadcrumbs = 30 +``` + + + + Sentry supports different breadcrumbs loggers in the Ruby SDK: - `:sentry_logger` - A general breadcrumbs logger for all Ruby applications. +- `:http_logger` - Captures requests made with the standard `net/http` library. +- `:redis_logger` - Captures breadcrumbs from redis operations. - `:active_support_logger` - Built on top of [ActiveSupport instrumentation](https://guides.rubyonrails.org/active_support_instrumentation.html) and provides many Rails-specific information. - `:monotonic_active_support_logger` - Similar to `:active_support_logger` but breadcrumbs will have monotonic time values. Only available with Rails 6.1+. -- `:http_logger` - It captures requests made with the standard `net/http` library. And you can enable them with the `breadcrumbs_logger` option: @@ -77,39 +139,39 @@ config.breadcrumbs_logger = [:active_support_logger] config.breadcrumbs_logger = [:active_support_logger, :http_logger] ``` -`include_local_variables` - -Whether to capture local variables from the raised exception's frame. Default is `false`. This was called `capture_exception_frame_locals` in older versions. + -`context_lines` + How many lines to display before/after the line where issue occurs. Default is `3`. -`debug` + -Activation of debugging mode. When enabled, SDK errors will be logged with backtrace. Default is `false`. Please use `config.logger.level` for more output; this is merely for attaching backtraces to the messages. + -`enabled_environments` +Sets the environment. This string is freeform and not set by default. A release can be associated with more than one environment so that you can separate them in the UI (think `staging` vs `prod` or similar). -As of v0.10.0, events will be sent to Sentry in all environments. If you do not wish to send events in an environment, we suggest you unset the SENTRY_DSN variable in that environment. +Sentry automatically sets the current environment from the environment variables: `SENTRY_CURRENT_ENV`, `SENTRY_ENVIRONMENT`, `RAILS_ENV`, `RACK_ENV` in that order and defaults to `development`. -Alternately, you can configure Sentry to run only in certain environments by configuring the `enabled_environments` list. For example, to only run Sentry in production: + -```ruby -config.enabled_environments = %w[production] -``` + -`environment` + -Sentry automatically sets the current environment to RAILS_ENV, or if it is not present, RACK_ENV. If you are using Sentry outside of Rack or Rails, or wish to override environment detection, you’ll need to set the current environment by setting SENTRY_CURRENT_ENV or configuring the client yourself: +By default, events will be sent to Sentry in all environments. If you don't want to send events in a specific environment, you can unset the `SENTRY_DSN` variable in that environment. - +You can also set up Sentry to only run in certain environments by configuring the `enabled_environments` list. For example, to only run Sentry in production: + +```ruby +config.enabled_environments = %w[production] +``` -`excluded_exceptions` + -If you never wish to be notified of certain exceptions, specify ‘excluded_exceptions’ in your config file. + -In the example below, the exceptions Rails uses to generate 404 responses will be suppressed. +You can use this option to stop getting notifications about certain exceptions. In the example below, the exceptions Rails uses to generate 404 responses will be suppressed. ```ruby config.excluded_exceptions += ['ActionController::RoutingError', 'ActiveRecord::RecordNotFound'] @@ -117,153 +179,153 @@ config.excluded_exceptions += ['ActionController::RoutingError', 'ActiveRecord:: You can find the list of exceptions that are excluded by default in `Sentry::Configuration::IGNORE_DEFAULT`. It is suggested that you append to these defaults rather than overwrite them with `=`. -`inspect_exception_causes_for_exclusion` + -Inspect an incoming exception's causes when determining whether or not that exception should be excluded. This option works together with `excluded_exceptions`. Default value is `true`. + + +Inspect an incoming exception's causes when determining whether or not that exception should be excluded. This option works together with `excluded_exceptions`. The default value is `true`. ```ruby config.inspect_exception_causes_for_exclusion = true ``` -`logger` + -The logger used by Sentry. Default is `Rails.logger` in Rails, otherwise an instance of `Sentry::Logger`. Make sure to change the logger level if you need debug output. + -```ruby -config.logger = Sentry::Logger.new(STDOUT) -config.logger.level = ::Logger::DEBUG # defaults to INFO -``` +Determine whether to ignore exceptions caused by rake integrations. The default is `false`. + + -`max_breadcrumbs` + -The maximum number of breadcrumbs the SDK would hold. Default is `100`. +These trusted proxies will be skipped when the SDK computes the user's ip address and `sentry-rails` will automatically inject the value of `Rails.application.config.action_dispatch.trusted_proxies` to this option. ```ruby -config.max_breadcrumbs = 30 +config.trusted_proxies = ["2.2.2.2"] ``` -`trace_propagation_targets` + -An optional property that controls which downstream services receive tracing data, in the form of a `sentry-trace` and a `baggage` header attached to any outgoing HTTP requests. +## Tracing Options -The option may contain an array of strings or regex against which the URLs of outgoing requests are matched. -If one of the entries in the list matches the URL of an outgoing request, trace headers will be attached to that request. -String entries do not have to be full matches, meaning the URL of a request is matched when it _contains_ a string provided through the option. + -By default, trace headers are attached to every outgoing request from the instrumented client. +A number between 0 and 1 that determines the percentage of total transaction that will be sent to Sentry (with 0 representing 0% and 1, 100%). This will apply equally to all transactions created in the app. Either this or must be defined to enable tracing. -`propagate_traces` +If is set to 0, no new traces will be created. However, if you have another service (for example a JS frontend) that makes requests to your service and has trace information, those traces will be continued and transactions will be sent to Sentry. -By default, Sentry injects `sentry-trace` and `baggage` headers to outgoing requests made with `Net::HTTP` to connect traces between services. You can disable this behavior with +To disable all tracing, you'll either need to set `=None` or set `=False`. Once this is done, no new traces will be started and no incoming traces will be continued. -```ruby -config.propagate_traces = false -``` + -`release` + -Track the version of your application in Sentry. + -We guess the release intelligently in the following order of preference: +A lambda or proc that's responsible for determining the chance that a given transaction has of being sent to Sentry (from 0-100%). It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between `0` (0% chance of being sent) and `1` (100% chance of being sent). -- Commit SHA of the last commit (git) -- Reading from the REVISION file in the app root -- Heroku’s dyno metadata (must have enabled via Heroku Labs) +It can also be used for filtering transactions, by returning 0 for those that are of no interest. Either this or must be defined to enable tracing. - + -`sample_rate` + -The sampling factor to apply to events. A value of 0.00 will deny sending any events, and a value of 1.00 will send 100% of events. + -```ruby -# send 50% of events -config.sample_rate = 0.5 -``` +A boolean (the default is false) that controls whether a new monitor thread will be spawned to perform health checks on the SDK. If the system is unhealthy, the SDK will keep halving the `traces_sample_rate` set by you in 10 second intervals until recovery. This downsampling helps ensure that the system stays stable and reduces SDK overhead under high load. -`send_client_reports` + -Attach diagnostic client reports about dropped events to an existing envelope max once every 30s. Default is `true`. + -This information will not be visible to users at the moment, but we're planning to add this information to user-facing UI. +An optional property that controls which downstream services receive tracing data, in the form of a `sentry-trace` and a `baggage` header attached to any outgoing HTTP requests. -If you **do not** want to send this data, you can opt-out by setting +The option may contain an array of strings or regex against which the URLs of outgoing requests are matched. +If one of the entries in the list matches the URL of an outgoing request, trace headers will be attached to that request. +String entries don't have to be full matches, (meaning the URL of a request is matched when it _contains_ a string provided through the option). + +By default, trace headers are attached to every outgoing request from the instrumented client. + + + + + +By default, Sentry injects `sentry-trace` and `baggage` headers to outgoing requests made with `Net::HTTP` to connect traces between services. You can disable this behavior with: ```ruby -config.send_client_reports = false +config.propagate_traces = false ``` -`send_default_pii` + -When its value is `false` (default), sensitive information like +## Hooks -- user ip -- user cookie -- request body -- query string in the url +The below options can be used to hook the SDK in various ways and customize how events are being reported. -will not be sent to Sentry. + -You can re-enable it by setting: +Provides a lambda or proc that's called with an SDK-specific message or error event object, and can return a modified event object, or `nil` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending. -```ruby -config.send_default_pii = true -``` +By the time is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect. -`send_modules` + -A boolean to decide whether to send modules (dependencies) information to Sentry (default is `true`). + -```ruby -config.send_modules = false # if you don't want to send all the dependency info -``` + + +Provides a lambda or proc that's called with an SDK-specific transaction event object, and can return a modified transaction event object, or `nil` to skip reporting the event. One way this might be used is for manual PII stripping before sending. -`skip_rake_integration` + -Determine whether to ignore exceptions caused by rake integrations. Default is `false`. + -`trusted_proxies` + -These trusted proxies will be skipped when the SDK computing the user's ip address. `sentry-rails` will automatically inject the value of `Rails.application.config.action_dispatch.trusted_proxie` to this option. +If you want to clean up the backtrace of an exception before it's sent to Sentry, you can specify a callback with `backtrace_cleanup_callback`, for example: ```ruby -config.trusted_proxies = ["2.2.2.2"] +config.backtrace_cleanup_callback = lambda do |backtrace| + Rails.backtrace_cleaner.clean(backtrace) +end ``` -## Tracing Options - -`traces_sample_rate` + -By providing a float between `0.0` and `1.0`, you can control the sampling factor of tracing events. + -- `nil` (default) or `0.0` means the tracing feature is disabled. -- `1.0` means sending all the events. - - - -`traces_sampler` +## Transport Options -You can gain more control on tracing event (transaction)'s sampling decision by providing a callable object (`Proc` or `Lambda`) as a `traces_sampler`: + - +Sentry will send events in a non-blocking way with its own background worker. By default, the worker holds a thread pool that has [the number of available processors](https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent.html#available_processor_count-class_method) threads. But you can override it as follows: -`enable_backpressure_handling` +```ruby +config.background_worker_threads = 5 +``` -A boolean that controls whether a new monitor thread will be spawned to perform health checks on the SDK. If the system is unhealthy, the SDK will keep halving the `traces_sample_rate` set by you in 10 second intervals until recovery. This downsampling helps ensure that the system stays stable and reduces SDK overhead under high load. +Or if you want to send events synchronously, set the value to 0: -This option is disabled by default. +```ruby +config.background_worker_threads = 0 +``` -## Transport Options + -`transport_class` + -By default, the SDK uses `Sentry::HTTPTransport` class for sending events to Sentry, which should work for the majority of users. But if you want to use your own Transport class, you can change it with this option: +By default, the SDK uses the `Sentry::HTTPTransport` class for sending events to Sentry, which should work for the majority of users. But if you want to use your own Transport class, you can change it with this option: ```ruby config.transport.transport_class = MyTransportClass ``` -`proxy` +It would generally be advisable to derive your custom transport class from `Sentry::HTTPTransport` and just override the necessary logic. + + + + Setup a proxy to use to connect to Sentry. This option is respected by the default `Sentry::HTTPTransport` class. You can set `config.transport.proxy` with as a `String` containing a proxy URI, or a `URI` object, or a `Hash` containing `uri`, `user` and `password` keys. @@ -284,22 +346,6 @@ Sentry.init do |config| password: "password" } end - ``` -## Environment Variables - -`SENTRY_DSN` - -After you complete setting up a project, you’ll be given a value which we call a DSN, or Data Source Name. It looks a lot like a standard URL, but it’s actually just a representation of the configuration required by Sentry (the Sentry client). It consists of a few pieces, including the protocol, public and secret keys, the server address, and the project identifier. - -With Sentry, you may either set the SENTRY_DSN environment variable (recommended), or set your DSN manually in a config block: - - - -```ruby -# in Rails, this might be in config/initializers/sentry.rb -Sentry.init do |config| - config.dsn = '___PUBLIC_DSN___' -end -``` + diff --git a/docs/platforms/ruby/common/enriching-events/attachments/index.mdx b/docs/platforms/ruby/common/enriching-events/attachments/index.mdx new file mode 100644 index 0000000000000..16aaade938970 --- /dev/null +++ b/docs/platforms/ruby/common/enriching-events/attachments/index.mdx @@ -0,0 +1,38 @@ +--- +title: Attachments +description: "Learn more about how Sentry can store additional files in the same request as event attachments." +--- + +Sentry can enrich your events for further investigation by storing additional files, such as config or log files, as attachments. + +## Uploading Attachments + + + + + +Sentry allows at most 20MB for a compressed request, and at most 100MB of uncompressed attachments per event, including the crash report file (if applicable). Uploads exceeding this size are rejected with HTTP error `413 Payload Too Large` and the data is dropped immediately. To add larger or more files, consider secondary storage options. + + + +Attachments persist for 30 days; if your total storage included in your quota is exceeded, attachments will not be stored. You can delete attachments or their containing events at any time. Deleting an attachment does not affect your quota - Sentry counts an attachment toward your quota as soon as it is stored. + +Learn more about how attachments impact your [quota](/pricing/quotas/). + +### Access to Attachments + +To limit access to attachments, navigate to your organization's **General Settings**, then select the _Attachments Access_ dropdown to set appropriate access — any member of your organization, the organization billing owner, member, admin, manager, or owner. + + + +By default, access is granted to all members when storage is enabled. If a member does not have access to the project, the ability to download an attachment is not available; the button will be greyed out in Sentry. The member may only view that an attachment is stored. + +## Viewing Attachments + +Attachments display on the bottom of the **Issue Details** page for the event that is shown. + + + +Alternately, attachments also appear in the _Attachments_ tab on the **Issue Details** page, where you can view the _Type_ of attachment, as well as associated events. Click the Event ID to open the **Issue Details** of that specific event. + + diff --git a/docs/platforms/ruby/common/index.mdx b/docs/platforms/ruby/common/index.mdx index 5b0f7439c696a..ae5b1694fe949 100644 --- a/docs/platforms/ruby/common/index.mdx +++ b/docs/platforms/ruby/common/index.mdx @@ -8,6 +8,12 @@ Don't already have an account and Sentry project established? Head over to [sent If you prefer to follow video instructions, see [How to Install the Sentry Ruby SDK in 60 Seconds](https://vimeo.com/899369197). +## Features + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + ## Install ```ruby # config/initializers/sentry.rb diff --git a/docs/platforms/rust/guides/actix-web/index.mdx b/docs/platforms/rust/guides/actix-web/index.mdx index 6c827dc638267..e40def6731138 100644 --- a/docs/platforms/rust/guides/actix-web/index.mdx +++ b/docs/platforms/rust/guides/actix-web/index.mdx @@ -22,7 +22,6 @@ sentry-actix = "{{@inject packages.version('sentry.rust') }}" And your Rust code: - ```rust {filename:main.rs} use std::io; diff --git a/docs/platforms/rust/index.mdx b/docs/platforms/rust/index.mdx index 2b6979a542b6e..2244e745f1844 100644 --- a/docs/platforms/rust/index.mdx +++ b/docs/platforms/rust/index.mdx @@ -32,7 +32,6 @@ The most convenient way to use this library is the `sentry::init` function, whic The `sentry::init` function returns a guard that when dropped, will flush Events that weren't yet sent to Sentry. It has a two-second deadline, so application shutdown may be slightly delayed as a result. Be sure to keep the guard or you won't be able to send events. - ```rust {filename:main.rs} let _guard = sentry::init(("___PUBLIC_DSN___", sentry::ClientOptions { @@ -84,7 +83,6 @@ tokio::runtime::Builder::new_multi_thread() The quickest way to verify Sentry in your Rust application is to cause a panic: - ```rust {filename:main.rs} fn main() { diff --git a/docs/platforms/unity/configuration/event-debouncing/index.mdx b/docs/platforms/unity/configuration/event-debouncing/index.mdx index 4263006973c32..beab2938c5514 100644 --- a/docs/platforms/unity/configuration/event-debouncing/index.mdx +++ b/docs/platforms/unity/configuration/event-debouncing/index.mdx @@ -14,7 +14,6 @@ The time that needs to pass after an event has been triggered to be captured aga - `LogType.Warning` - one second - `LogType.Error`, `LogType.Exception`, `LogType.Assert` and actual exceptions - one second - ```csharp using UnityEngine; diff --git a/docs/platforms/unity/migration/index.mdx b/docs/platforms/unity/migration/index.mdx index fac7e5f9209d5..6f786f71ee014 100644 --- a/docs/platforms/unity/migration/index.mdx +++ b/docs/platforms/unity/migration/index.mdx @@ -49,7 +49,6 @@ The updated Sentry Unity SDK requires Unity version 2019.4 or higher with .NET S - 1. Remove the old `Sentry.cs` and `SentrySdk.cs` files from your project. 2. Remove the old initialization code `gameObject.AddComponent().Dsn = "___PUBLIC_DSN___";`. diff --git a/docs/platforms/unity/user-feedback/index.mdx b/docs/platforms/unity/user-feedback/index.mdx index b4a165fe630ab..be0df50a5f774 100644 --- a/docs/platforms/unity/user-feedback/index.mdx +++ b/docs/platforms/unity/user-feedback/index.mdx @@ -14,7 +14,7 @@ User Feedback for **[ASP.NET](/platforms/dotnet/guides/aspnet/user-feedback/#int -You can create a form to collect the user input in your preferred framework, and use the SDK's API to send the information to Sentry. You can also use the widget, as described below. If you'd prefer an alternative to the widget or do not have a JavaScript frontend, you can use this API or a [Web API](/api/projects/submit-user-feedback/). +You can create a form to collect the user input in your preferred framework, and use the SDK's API to send the information to Sentry. You can also use the widget, as described below. If you'd prefer an alternative to the widget or do not have a JavaScript frontend, you can use this API: ```csharp {tabTitle:C#} using Sentry; diff --git a/docs/platforms/unreal/index.mdx b/docs/platforms/unreal/index.mdx index 525897f0c8b25..aef52db801ba0 100644 --- a/docs/platforms/unreal/index.mdx +++ b/docs/platforms/unreal/index.mdx @@ -77,7 +77,6 @@ PublicDependencyModuleNames.AddRange(new string[] { ..., "Sentry" }); The minimum configuration required is the [DSN](/product/sentry-basics/dsn-explainer/) of your project: - ``` ___PUBLIC_DSN___ diff --git a/docs/platforms/unreal/user-feedback/index.mdx b/docs/platforms/unreal/user-feedback/index.mdx index 56c470eb8265f..f551648aa77eb 100644 --- a/docs/platforms/unreal/user-feedback/index.mdx +++ b/docs/platforms/unreal/user-feedback/index.mdx @@ -11,5 +11,3 @@ When a user experiences an error, Sentry provides the ability to collect additio The user feedback API allows you to collect user feedback while utilizing your own UI. You can use the same programming language you have in your app to send user feedback. In this case, the SDK creates the HTTP request so you don't have to deal with posting data via HTTP. - -Alternatively, you can use the [User Feedback API endpoint](/api/projects/submit-user-feedback/) directly. diff --git a/docs/pricing/quotas/legacy-manage-transaction-quota.mdx b/docs/pricing/quotas/legacy-manage-transaction-quota.mdx new file mode 100644 index 0000000000000..553f41a9a3b86 --- /dev/null +++ b/docs/pricing/quotas/legacy-manage-transaction-quota.mdx @@ -0,0 +1,160 @@ +--- +title: Manage Your Performance Units Quota (before June 11, 2024) +sidebar_hidden: true +sidebar_order: 40 +description: "Learn how to use the tools Sentry provides to control the type and amount of performance units that you pay for." +--- + + +This information only applies to paid plans that were activated **before June 11, 2024** and haven't been upgraded since. + +If you're on a free or paid plan that was activated on June 11, 2024 or later, see the [current page on managing your span quota](/pricing/quotas/manage-transaction-quota/). + + +In most cases, sending all Transaction and Transaction with Profiling events to Sentry could generate more performance data than you'd find useful and might use up your performance units too quickly. Sentry provides tools to control the _type_ and _amount_ of transactions and transactions with profiling that are monitored. This allows you to have performance data that's actionable and meaningful, and to manage your quota. + +Applying the proper SDK configuration is an iterative and on-going process, but these tips will show you how to best use Sentry's tools to get the most out of your transaction and transactions with profiling events. These tips are ordered from easiest or least time-consuming to most challenging or potentially time-consuming. The first two options are things you can do in [sentry.io](https://sentry.io), whereas the remaining ones are things you'll do in the SDK. + +## Before You Begin: Check Your Quota Usage + + + +The "Usage Stats" tab is only visible if you're on a Team, Business, or Enterprise plan. + + + +You can look at your events in aggregate in the "Usage Stats" tab of **Stats**. This information will help you answer key questions about the breakdown of your incoming events or which projects are consuming your quota. The answers to these questions can help you figure out where you need to do further fine-tuning of your SDK filters and configuration. + +This page is accessible to all members of your organization, so Owners in your Sentry org can share this page with the developers directly responsible for a given project. Also, you can come back to this page to check if the changes you've made are having the desired effect. + +### How can I see a breakdown of incoming events? + +The [Usage Stats](/product/stats/#usage-stats) tab displays details about the total amount of data Sentry has received across your entire organization for up to 90 days. The page breaks down the events (by project) into three categories: _accepted_, _dropped_, or _filtered_. Only accepted events affect your quota: + +![Usage Stats page showing transactions](./img/usage-stats-transactions.png) + +### What are my busiest projects? + +The "Project" table in the "Usage Stats" tab of **Stats** breaks down your events by project so you can see which ones are consuming your quota. Clicking on the settings icon next to a project name in the table will open the project's settings, where you can manage its [inbound filters](#2-inbound-data-filters). + +### Which transactions are consuming my quota? + + + +You can only update the columns of the Results table in **Discover** if your organization is on a Business plan. + + + +You can set up [a query]() in **Discover** to see which transactions or transactions with profiling you're receiving the most and if you want to adjust that. When you're building the query, search for `event.type:transaction` and then set the columns to `title`, `project`, and `count`, as shown below: + +![Busiest Projects](./img/manage-trans-quota-01.png) + +Once the changes are applied, sort the "Results" table by the "COUNT()" column to display your busiest transactions: + +![Busiest Issues](./img/manage-trans-quota-02.png) + +You can look for transactions with profiling using `has:profile.id`. Adding a `profile.id` column to the query will give you a link to the profile. + +## Adjusting Quotas + + + +Quotas can only be updated by a Billing or Owner member of your Sentry organization. + + + +Once your performance units volume is approaching or has exceeded the quota, teammates with the "Owner" organization permission level will receive [notification](/product/alerts/notifications/#quota-notifications) emails. You can then choose to [increase](#increasing-quotas) or [decrease](#decreasing-quotas) your quota. + + +### Increasing Quotas + +If you're dropping events that you want to keep because you've exceeded your quota, add to your quota at any time during your billing period by either increasing your [reserved](#reserved-volume) or [on-demand](#on-demand-budget) quota. + +When you exceed your quota threshold, the server will respond with a 429 HTTP status code, which communicates to SDKs and clients to stop sending events. This status code comes with a `Retry-After` header that indicates the time for which this rate limit is active. However, clients are not supposed to retry events, but instead drop events until the rate limit has expired, to prevent queue backlogs. Note, that since event ingestion and rate limiting happen asynchronously, the 429 HTTP status code is always slightly delayed. + +To increase your quota, go to **Settings > Subscription** and click the "Manage Subscription" button to access your subscription options. When you increase your quota, the change goes into effect immediately. + +If you're on a Developer plan and want to increase your quota, you'll need to upgrade to a Team or Business plan. On these plans you can prepay for more performance units volume and purchase on-demand volume, as needed. Learn about Sentry's plans on our [pricing page](https://sentry.io/pricing/). + + + +If you upgrade from Team to Business mid-billing period, your on-demand pricing changes retroactively. + + + +### Reserved Volume + +If the number of events you need is steadily increasing, you may want to increase your reserved capacity or volume. Reserved volume is less expensive than on-demand volume since you prepay for it. It also allows you to choose the number of performance units that you want to have available beforehand, rather than just setting an arbitrary on-demand budget. Learn more about [reserved volume](/pricing/#prepaid-reserved-capacity) in our pricing documentation. + +You shouldn't increase your reserved volume if you think your need for more events is temporary, since [reducing your reserved volume is tied to your billing period](#decreasing-quotas). + +### On-Demand Budget + +If you need to increase your performance units quota temporarily, we recommend that you add or increase on-demand budget. This is ideal for situations like rolling out a new version of your application where you anticipate more events for the month. To add on-demand capacity or volume, you enter a monthly maximum budget on either a shared or per-category (errors, performance units, replays, and attachments) basis. Learn more about [on-demand volume](/pricing/#on-demand-capacity) in our pricing documentation. + +### Decreasing Quotas + +Plan downgrades and decreases in reserved volume are processed at the end of your billing period, and remaining volume cannot be refunded. For example, if you have a monthly billing period that starts on the 5th of the month, and you decrease your reserved volume on June 20th, then this change will be processed on July 4th. Your billing period beginning on July 5th will reflect your new reserved volume. + + + +If you have an annual billing period, plan downgrades and decreases in reserved volume go into effect at the beginning of your **next billing year.** + + + +Changes to on-demand volume typically go into effect immediately and are guaranteed to go into effect within 24 hours. However, you can't decrease your on-demand budget to less than what you've consumed in the current period. + +To decrease your quota, go to **Settings > Subscription** and click "Manage Subscriptions". When you reach the "Review & Confirm" step, the date that these changes go into effect will be displayed: + +![The Review & Confirm step of a subscription update.](./img/review-subscription.png) + + + +We strongly recommend that you make subscription changes **before** the last day of your billing period. Depending on your time zone, in some cases, changes made on the last day of the billing period will not go into effect until the next billing period. + + + +## Inbound Filters + +While SDK configuration requires changes to your source code and depends on your next deployment, server-side filters can be easily configured per project in the "Data Filters" section of **[Project] > Settings > Inbound Filters**. + +Once applied, you can track the filtered events (numbers and cause) using the graph provided at the top of the "Inbound Filters" page. + +![Built-in Inbound Filters](./img/manage-event-stream-03.png) + + + +The **Inbound Data Filters** page in [sentry.io](https://sentry.io) only refers to errors, but it applies to transactions, transactions with profiling, and attachments as well. + + + +Sentry provides several methods to filter all events and attachments server-side, which are applied before checking for potential rate limits. Inbound filters include: + +- Common browser extension errors +- Events coming from `localhost` +- Known legacy browsers errors +- Known web crawlers +- Specific release versions of your code +- Certain IP addresses + +The first four options above are settings that you simply toggle on or off. Setting the others is explained further below. + +After these checks are processed, events and attachments that aren't dropped based on these filters count toward your quota. They're accepted into Sentry, where they're persisted and stored. + +### IP Filters + +If you have a rogue client, Sentry supports blocking an IP from sending data. Navigate to **[Project] > Settings > Inbound Filters** to add the IP addresses (or subnets) in the "IP Addresses" field. + +### Filter by Release + + + +If you discover a problematic release causing excessive noise, Sentry supports ignoring all events and attachments from that release. Navigate to **[Project] > Settings > Inbound Filters**, then add the release to the "Releases" field. + +## SDK Filtering: beforeSendTransaction + +Some Sentry SDKs support the `beforeSendTransaction` callback method. Once implemented, this method is invoked when the SDK captures a transaction event, right before sending it to your Sentry account. Because it receives the transaction event object as a parameter, you can use it to modify the event's data or drop the event completely (by returning `null`) based on your custom logic and the data available on the event, such as _tags_, _environment_, _release version_, _transaction name_, and so on. Note that only transaction events pass through `beforeSendTransaction`. Error and message events have a separate method, `beforeSend`, which is supported in all SDKs. Learn more about both methods in [Filtering Events](/platform-redirect/?next=/configuration/filtering/). + +## SDK Configuration: Tracing Options + +When you configure your the SDK, you can control the number of transactions that are sent to Sentry by setting the [tracing options](/platform-redirect/?next=/configuration/options/%23tracing-options), including either setting a sample rate or providing a function for sampling. You can also set up [custom instrumentation](/platform-redirect/?next=/tracing/instrumentation/custom-instrumentation/) for performance monitoring to capture certain types of transactions. diff --git a/docs/product/alerts/index.mdx b/docs/product/alerts/index.mdx index 0e037c40d2357..4db2b6e31f722 100644 --- a/docs/product/alerts/index.mdx +++ b/docs/product/alerts/index.mdx @@ -36,6 +36,12 @@ Create alerts to monitor metrics, such as: You can find a full list of available metric alerts in [Metric Alerts](/product/alerts/alert-types/#metric-alerts). +## Uptime Monitoring Alerts + +[Uptime alerts](/product/alerts/uptime-monitoring/) are triggered when an uptime HTTP check request fails to meet our +[uptime check criteria](/product/alerts/uptime-monitoring/#uptime-check-criteria). +You can use uptime alerts to make sure a specific URL is constantly available, even during periods of low or no traffic. + ## Creating Alerts When you create a new project in [sentry.io](https://sentry.io), you can select a default issue alert. However, you can also [create your own alerts](/product/alerts/create-alerts/) to suit your team’s needs, using these [best practices](/product/alerts/best-practices/) as a guide. diff --git a/docs/product/alerts/notifications/img/subscription_notifications_settings.png b/docs/product/alerts/notifications/img/subscription_notifications_settings.png new file mode 100644 index 0000000000000..ebfe3932cb96b Binary files /dev/null and b/docs/product/alerts/notifications/img/subscription_notifications_settings.png differ diff --git a/docs/product/alerts/notifications/index.mdx b/docs/product/alerts/notifications/index.mdx index 714f17562a30f..8bddd7a805317 100644 --- a/docs/product/alerts/notifications/index.mdx +++ b/docs/product/alerts/notifications/index.mdx @@ -8,7 +8,7 @@ Sentry sends you notifications regarding workflow activities, [release deploys]( - [Workflow](#workflow-notifications): Activity involving user actions and state changes on issues. This includes activities such as issue resolution, assignment, comments, and regressions. - [Deploy](#deploy-notifications): When a release you have commits on is deployed. -- [Spend](#spend-notifications): When you're getting close to spending your reserved volume, your quotas are depleted, and/or your on-demand budget is being put to use. +- [Spend](#spend-notifications): When you're getting close to spending your reserved volume, your quotas are depleted, and/or your pay-as-you-go budget is being put to use. - [Weekly Reports](#weekly-reports): A summary of your organization's Sentry activity. You can manage these notifications in **User Settings > Notifications**. @@ -49,13 +49,33 @@ Sentry sends deploy notifications to users who have committed to the release tha ## Spend Notifications -By default, Sentry sends spend notifications to all owners of an organization when: +By default, Sentry sends spend notifications to all owners and billing members of an organization when: -- 80% of the organization's reserved volume (for errors, transactions, and/or attachments) has been depleted. -- The entire reserved volume and any on-demand budget for a category (such as errors, transactions, and/or attachments) has been depleted. -- 80% of the organization's on-demand budget has been used. +- 80% of the organization's reserved volume (such as errors, spans, and/or attachments) has been depleted. +- The entire reserved volume and any pay-as-you-go budget for a category (such as errors, spans, and/or attachments) has been depleted. +- 80% of the organization's pay-as-you-go budget has been used. -Learn more in the [full Quotas documentation](/pricing/quotas/). +Learn more in the [Pricing & Billing docs](/pricing/quotas/). + +### Spend Notifications for Your Organization + +Billing or owner members can set up their notification thresholds by going to: **Settings > Subscriptions > Notifications**. + +![Notifications tab of Subscription settings page](./img/subscription_notifications_settings.png) + +From here, you can customize the notification thresholds for your organization for when you're close to reaching one or both of the below: + +- **Subscription Consumption**: Set the percentage of the quota usage threshold(s) that will trigger a notification. + +- **Pay-as-you-go Consumption**: Set the percentage of the Pay-as-you-go usage threshold(s) that will trigger a notification. + +### Personal Spend Notifications + +Owner and billing members of an organization can also customize how they personally receive spend notifications. This can be done from the user's notification settings page: + +1. Go to the [**Notifications**](https://sentry.io/settings/account/notifications/) page (in your **User Settings**). +2. Scroll to the **Spend** row and click on the cog wheel. +3. From the [**Spend Notifications**](https://sentry.io/settings/account/notifications/quota/) page, you'll be able to select the types of notifications you get as well as how you'd like to get them (via Slack, email, and so on). ## Weekly Reports diff --git a/docs/product/alerts/uptime-monitoring/automatic-detection.mdx b/docs/product/alerts/uptime-monitoring/automatic-detection.mdx new file mode 100644 index 0000000000000..132799aad27d8 --- /dev/null +++ b/docs/product/alerts/uptime-monitoring/automatic-detection.mdx @@ -0,0 +1,41 @@ +--- +title: Automatic Detection +sidebar_order: 51 +description: "Learn how automatic detection of uptime monitoring works." +--- + + + +The automatic detection of uptime alerts sets up uptime alerts for the most frequently encountered +hostnames in all URLs of your error data. This helps ensure that critical hostnames are continuously monitored, +enhancing the reliability and availability of your web services. + +## How It Works + +We analyze all the URLs detected in your project's captured error data to find the hostname that appears most frequently. We then create an uptime alert if it passes our [uptime check criteria](/product/alerts/uptime-monitoring/#uptime-check-criteria). + +To avoid creating flaky alerts, the hostname undergoes an "onboarding period" of three days. During this period, we send HTTP requests to the hostname every hour. If the request fails at least three times, the hostname is dropped and re-evaluated after seven days. + + +Sentry will execute uptime checks against the hostname root path of the most frequently seen URLs. For example, if the most seen URL in your events is `GET https://www.example.com/docs/introduction` the check will be `GET https://www.example.com/`. + + +## Disabling Automatic Detection + +If you prefer not to use automatically detected uptime alerts, you have two options to disable them: + +1. **Deleting Uptime Alerts:** You can directly delete existing automatically detected uptime alerts from your [Alerts page](https://sentry.io/orgredirect/organizations/:orgslug/alerts/rules). Once deleted, these alerts will not be re-created automatically in the future. +2. **Blocking Sentry via `robots.txt`:** Another method to prevent automatic detection is by updating your hostname's robots.txt file to block Sentry’s uptime monitoring bot. To do this, add the following lines to your robots.txt file: + +```txt{tabTitle: Example}{filename: robots.txt} +User-agent: SentryUptimeBot +Disallow: * +``` + + +**Note:** The `robots.txt` file will only prevent Sentry from detecting URLs that it encounters in the future. Existing URLs that have already been detected will continue to have uptime alerts unless they are manually deleted. + + +## Current Limitations + +At present, automatically detected uptime alerts have limited editability. You cannot update the URLs associated with these alerts. Only the alert name and owner can be modified. The ability to edit URLs and other alert settings is planned for a future release. Additionally, each organization is limited to one automatically detected hostname. diff --git a/docs/product/alerts/uptime-monitoring/img/uptime-issue-alert-rule.png b/docs/product/alerts/uptime-monitoring/img/uptime-issue-alert-rule.png new file mode 100644 index 0000000000000..f1b21a37ef719 Binary files /dev/null and b/docs/product/alerts/uptime-monitoring/img/uptime-issue-alert-rule.png differ diff --git a/docs/product/alerts/uptime-monitoring/index.mdx b/docs/product/alerts/uptime-monitoring/index.mdx new file mode 100644 index 0000000000000..8fa5d56967f84 --- /dev/null +++ b/docs/product/alerts/uptime-monitoring/index.mdx @@ -0,0 +1,39 @@ +--- +title: Uptime Monitoring +sidebar_order: 50 +description: "Learn how to help maintain uptime for your web services by monitoring relevant URLs with Sentry's Uptime Monitoring." +--- + + + +Sentry's Uptime Monitoring lets you monitor the availability and reliability of your web services effortlessly. +In the current version, uptime is [automatically configured](/product/alerts/uptime-monitoring/automatic-detection/) as a new alert for only the most relevant URL detected in your organization. In future updates, you'll have the flexibility to add and monitor additional URLs. + +## Uptime Check Criteria + +Our uptime monitoring system verifies the availability of your URLs +by performing GET requests at regular 5-minute intervals. +For a URL to be considered up and running, the response must meet the following criteria: + +1. **Successful Response (2xx Status Codes):** +The URL must return an HTTP status code in the 200–299 range, indicating a successful request. +2. **Automatic Handling of Redirects (3xx Status Codes):** Sentry will follow redirects for URLs returning an HTTP status code in the 300–399 range and verify that the final destination URL returns a successful response. This ensures that redirects won't falsely trigger downtime alerts. +3. **Timeout Setting:** Each request has a timeout threshold of 10 seconds. +If the server doesn't respond within this period, the check will be marked as a failure, +indicating a potential downtime or performance issues. +4. **DNS Issue Detection:** Our monitoring also includes the detection of DNS resolution issues. +If a DNS issue is detected, the check will be marked as a failure, +allowing you to address the underlying connectivity problems. + +## Notifications + +An uptime alert continuously monitors the configured URL with the criteria defined above. If a failure is detected, +a new [uptime issue](/product/issues/issue-details/uptime-issues/) with failed check and related errors details will be created. + +To start getting notifications for a new downtime issue, [configure an issue alert](/product/alerts/create-alerts/issue-alert-config/) and choose the issue category "uptime". Then choose how you'd like to be notified (via email, Slack, and so on). + +![Uptime issue alert rule configuration](./img/uptime-issue-alert-rule.png) + +## Learn More About Uptime Monitoring + + diff --git a/docs/product/alerts/uptime-monitoring/troubleshooting.mdx b/docs/product/alerts/uptime-monitoring/troubleshooting.mdx new file mode 100644 index 0000000000000..77756eef4a5c3 --- /dev/null +++ b/docs/product/alerts/uptime-monitoring/troubleshooting.mdx @@ -0,0 +1,33 @@ +--- +title: Troubleshooting +sidebar_order: 52 +description: "Learn how to troubleshoot potential Uptime Monitoring problems." +--- + + + +## Verify Feature Eligibility + +Uptime alerts are only available for organizations that have early adopter features enabled. They must also have URLs that match our [auto detection criteria](/product/alerts/uptime-monitoring/automatic-detection/#how-it-works). In the current version, organizations are limited to a single uptime alert. + +## Verify Firewall Configuration + +Some hosting platforms can block incoming requests from Sentry's Uptime Bot, falsely triggering uptime alerts. We recommend verifying your firewall configuration to ensure incoming requests from Sentry are allowed. + +If you need to configure your firewall allowlist to include Sentry's Uptime Bot, we recommend checking against our `User-Agent`, given that our IP addresses can change without notice. + +### User Agent + +Our uptime check requests use the following `User-Agent`: + +``` +SentryUptimeBot/1.0 (+http://docs.sentry.io/product/alerts/uptime-monitoring/) +``` + +### IP Addresses + +See [IP Ranges](/security-legal-pii/security/ip-ranges/#uptime-monitoring) for a complete list of IP addresses used for uptime checks. + +## Verify That Issue Alerts Match Downtime Issues + +Uptime alerts create downtime issues. If you're not receiving notifications when downtimes are detected, make sure you've properly [configured an issue alert](/product/alerts/create-alerts/issue-alert-config/) with the issue category "uptime". diff --git a/docs/product/crons/getting-started/http/index.mdx b/docs/product/crons/getting-started/http/index.mdx index 2cb8b2b6b89ae..b96ab0b4737c5 100644 --- a/docs/product/crons/getting-started/http/index.mdx +++ b/docs/product/crons/getting-started/http/index.mdx @@ -19,7 +19,6 @@ Optionally, you can skip the first step and [create or update (upsert) a monitor Check-in monitoring allows you to track a job's progress by completing two check-ins: one at the start of your job and another at the end of your job. This two-step process allows Sentry to notify you if your job didn't start when expected (missed) or if it exceeded its maximum runtime (failed). - ```bash {tabTitle: cURL} SENTRY_INGEST="https://___ORG_INGEST_DOMAIN___" @@ -44,7 +43,6 @@ Host: ___ORG_INGEST_DOMAIN___ If your job execution fails: - ```bash {tabTitle: cURL} # 🔴 Notify Sentry your job has failed: @@ -78,7 +76,6 @@ schedule or delete the monitor environment; otherwise, it will be marked as miss - ```bash {tabTitle: cURL} SENTRY_INGEST="https://___ORG_INGEST_DOMAIN___" @@ -97,7 +94,6 @@ curl "${SENTRY_CRONS}?environment=dev&status=ok" Sentry enables the automatic creation or update of a monitor (upsert) through the check-in payload. This can be useful if you have many scheduled tasks or need to create them dynamically. - ```bash {tabTitle: cURL} SENTRY_INGEST="https://___ORG_INGEST_DOMAIN___" @@ -186,7 +182,6 @@ If this happens, you have to provide a stable check-in ID for your execution wit Usage example: - ```bash {tabTitle: cURL} CHECK_IN_ID="$(uuidgen)" @@ -207,7 +202,6 @@ curl "${SENTRY_CRONS}?check_in_id=${CHECK_IN_ID}&status=ok" Heartbeat monitoring notifies Sentry of a job's status through one check-in. This setup will only notify you if your job didn't start when expected (missed). If you need to track a job to see if it exceeded its maximum runtime (failed), use check-ins instead. - ```bash {tabTitle: cURL} SENTRY_INGEST="https://___ORG_INGEST_DOMAIN___" @@ -224,7 +218,6 @@ Host: ___ORG_INGEST_DOMAIN___ If your job execution fails: - ```bash {tabTitle: cURL} # 🔴 Notify Sentry your job has failed: diff --git a/docs/product/insights/llm-monitoring/getting-started/index.mdx b/docs/product/insights/llm-monitoring/getting-started/index.mdx index 3e303f011cc2e..52e406bdb35dc 100644 --- a/docs/product/insights/llm-monitoring/getting-started/index.mdx +++ b/docs/product/insights/llm-monitoring/getting-started/index.mdx @@ -4,6 +4,12 @@ sidebar_order: 0 description: "Learn how to set up Sentry LLM Monitoring" --- + + +This feature is currently only available in the Python SDK. + + + Sentry LLM Monitoring is easiest to use with the Python SDK and an official integration like OpenAI. ![LLM Monitoring User Interface](../img/pipelines-view.png) diff --git a/docs/product/issues/index.mdx b/docs/product/issues/index.mdx index 7a19ab365e9fb..67ab1ca6b169b 100644 --- a/docs/product/issues/index.mdx +++ b/docs/product/issues/index.mdx @@ -43,7 +43,7 @@ There are two categories of issues: [_error issues_](/product/issues/issue-detai From the **Issues** page, you can begin to triage. The page is organized into tabs, each corresponding to a filtered list of issues, and these different lists help you with triaging: - All Unresolved (`is:unresolved`): All unresolved issues, including issues that need review. -- For Review (`is:unresolved is:for_review`): Also called **Review List**. Issues that need to be reviewed; for-review issues are a subset of all unresolved issues. +- For Review (`is:unresolved is:for_review`). Also called **Review List**, for-review issues are a subset of all unresolved issues and can include new issues or regressions that haven't been reviewed yet. - Regressed (`is:regressed`): All regressed issues; resolved issues that have come up again. - Archived (`is:archived`): All archived issues. - Escalating (`is:escalating`): All escalating issues; previously archived issues that have exceeded their forecasted event volume. diff --git a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-drawer.png b/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-drawer.png new file mode 100644 index 0000000000000..80e8f7d6ae295 Binary files /dev/null and b/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-drawer.png differ diff --git a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-filter-by.png b/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-filter-by.png deleted file mode 100644 index be16596c05d85..0000000000000 Binary files a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-filter-by.png and /dev/null differ diff --git a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-relative-time-switch.png b/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-relative-time-switch.png deleted file mode 100644 index f78fcff1079e5..0000000000000 Binary files a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-relative-time-switch.png and /dev/null differ diff --git a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-section.png b/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-section.png deleted file mode 100644 index 7ef8c2fa820c1..0000000000000 Binary files a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-section.png and /dev/null differ diff --git a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-sort.png b/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-sort.png deleted file mode 100644 index 2c639b6252a11..0000000000000 Binary files a/docs/product/issues/issue-details/breadcrumbs/img/breadcrumbs-sort.png and /dev/null differ diff --git a/docs/product/issues/issue-details/breadcrumbs/index.mdx b/docs/product/issues/issue-details/breadcrumbs/index.mdx index 51572ca070779..5077af9adddb2 100644 --- a/docs/product/issues/issue-details/breadcrumbs/index.mdx +++ b/docs/product/issues/issue-details/breadcrumbs/index.mdx @@ -1,61 +1,45 @@ --- title: Using Breadcrumbs -description: "Learn about using breadcrumbs on the Issue Details page to help resolve issues." +description: "Learn about using breadcrumbs on the Issue Details page to help debug faster." sidebar_order: 40 --- Sentry uses _breadcrumbs_ to create a trail of events that happened prior to an issue. These events are very similar to traditional logs, but can record more rich structured data. -SDKs automatically start recording breadcrumbs by enabling integrations. To learn how to do this for your platform, select the platform from the dropdown at the top of the page, then review the breadcrumbs documentation for that platform. +SDKs automatically start recording breadcrumbs by enabling integrations. To learn how to do this for your platform, select it from the dropdown at the top of the left hand nav. You'll be taken to the breadcrumb documentation specific to the platform you use. -If an error event provides a trail, [sentry.io](https://sentry.io) displays the breadcrumbs on the **Issue Details** page: +If an error event provides a trail, you'll see the breadcrumbs on the **Issue Details** page in [Sentry.io](https://sentry.io/orgredirect/organizations/:orgslug/issues/) displays . -![Breadcrumbs section](./img/breadcrumbs-section.png) +![Breadcrumbs section](../img/issue-breadcrumbs.png) ## Breadcrumbs Display -Each part of the breadcrumb displays in a separate row and each row includes the following details: Type, Category, Description, Level, and Time. +You'll see a few of the breadcrumbs that may be available for the event in the issue "Details" tab. To access the rest of them, click the "View All" button at the bottom of the section. This will open a slide out drawer where you can search, filter, sort, and change the time display for all available breadcrumbs. -Type +Here are all the ways you can narrow down what you see: +- **Search**: Shows only breadcrumbs that match the query. Matches can occur on `type`, `category`, `message` and `data`. +- **Filter**: Filters by the associated `type` and `level`. +- **Sort**: Determines whether breadcrumbs are shown by Newest or Oldest first. (Your sort preference will be saved to the browser.) +- **Time Display:** Determines how breadcrumb timestamps are displayed, either as absolute timestamps (respecting user preferences for a 24-hour clocks/timezone), or relative to the first breadcrumb in the list. If a relative timestamp appear negative, it means that it took place before the top-most breadcrumb in the list. (Your time display preference will be saved to the browser.) -A semi-internal attribute `type` can control the type of the breadcrumb. By default, all breadcrumbs are recorded as `default`, which makes them appear as a `Debug` entry, but Sentry provides other [types](https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#breadcrumb-types) that influence how the breadcrumbs are rendered. +![Breadcrumbs drawer](./img/breadcrumbs-drawer.png) -Category -The category of the event. This data is similar to a logger name, and helps you understand the area in which an event took place, such as auth. +## Breadcrumb Attributes -Description +Each breadcrumb is composed of the following: -A description is either: +- **Type**: `type` is a semi-internal attribute that controls how breadcrumbs are categorized. If left unchanged, all breadcrumbs are recorded as `default`, but Sentry provides other [types](https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#breadcrumb-types) that each have their own color/icon in the UI. -- Message: A string describing the event, rendered as text with all whitespace preserved. It's often used as a drop-in for a traditional log message. +- **Category**: The event category. This data is similar to a logger name and helps you understand where an event took place, such as `auth`. -- Data: A key-value mapping of event metadata. This is often used instead of a message, but may be used in addition to one. [sentry.io](https://sentry.io) displays all the data sent. +- **Message**: A string describing the event, rendered as text with all whitespace preserved. It's often used as a drop-in for a traditional log message. -Level +- **Data**: A key-value mapping of a breadcrumb's arbitrary data. This is useful for attaching structured information related to the breadcrumb, like IDs or variable values. -The severity of an event. The level is set to one of five values, which are — in order of severity — fatal, error, warning, info, and debug. +- **Level**: The severity of an event. The level is set to one of five values: fatal, error, warning, info, and debug, in order of severity. -Time +- **Time**: A timestamp showing when the breadcrumb occurred. The format is either a string, as defined in [RFC 3339](https://tools.ietf.org/html/rfc3339), or a numeric value representing the number of seconds that have elapsed since the Unix epoch. -A timestamp representing when the breadcrumb occurred. The format is either a string, as defined in [RFC 3339](https://tools.ietf.org/html/rfc3339), or a numeric (integer or float) value representing the number of seconds that have elapsed since the Unix epoch. By default, [sentry.io](https://sentry.io) displays the timestamp as an absolute time. You can click the toggle to update the display to relative time: - -![Switch time format button](./img/breadcrumbs-relative-time-switch.png) Learn more detailed information about breadcrumb data in the [Breadcrumbs Interface developer documentation](https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/). - -## Filtering the Display - -You can filter the list of breadcrumbs by type and level. The provided types and levels are displayed as options in the filter: - -![Filter By Types/Levels](./img/breadcrumbs-filter-by.png) - -## Full-Text Search - -If you type anything in the filter search field, [sentry.io](https://sentry.io) filters out all fragmented data and attempts to find a match to the search criteria. If it finds one, the match is highlighted. Full-text search also works in conjunction with Filter By. - -## Sorting - -By default, breadcrumbs are sorted from newest to oldest. If you prefer a different ordering, use the dropdown to the right of the search bar. Your sort preference will be saved to the browser. - -![Breadcrumbs sort dropdown](./img/breadcrumbs-sort.png) diff --git a/docs/product/issues/issue-details/img/issue-breadcrumbs.png b/docs/product/issues/issue-details/img/issue-breadcrumbs.png index 7ef8c2fa820c1..0ee90b532d0c7 100644 Binary files a/docs/product/issues/issue-details/img/issue-breadcrumbs.png and b/docs/product/issues/issue-details/img/issue-breadcrumbs.png differ diff --git a/docs/product/issues/issue-details/img/issue-replay.png b/docs/product/issues/issue-details/img/issue-replay.png new file mode 100644 index 0000000000000..fb4ac55a57d81 Binary files /dev/null and b/docs/product/issues/issue-details/img/issue-replay.png differ diff --git a/docs/product/issues/issue-details/index.mdx b/docs/product/issues/issue-details/index.mdx index 522510542546f..9cbbfdf677164 100644 --- a/docs/product/issues/issue-details/index.mdx +++ b/docs/product/issues/issue-details/index.mdx @@ -67,11 +67,11 @@ The trace navigator (which you'll see right below the Event ID), is a timeline v - **Error Issue**: Represented with a solid, closed red dot. The shade varies from lighter to darker, with darker shades representing more events occurring at the same timestamp. - **Performance Issue**: Represented with an open dot. -### Related Issues +### Trace-related Issues ![Trace Related Issue](./img/trace_related_issue.png) -Sometimes the Trace Navigator will be replaced by a Related Issue. A Related Issue is a different issue that occurred during the same trace as the event in view. This is useful for understanding the context of the current issue and may help you identify its root cause. A Related Issue allows the developer to quickly navigate between the two related events. +Sometimes the Trace Navigator will be replaced by a Trace-related Issue. A Trace-related Issue is a different issue that occurred during the same trace as the event in view. This is useful for understanding the context of the current issue and may help you identify its root cause. A Trace-related Issue allows the developer to quickly navigate between the two related events. ## Suspect Commits @@ -97,15 +97,18 @@ The Stack Trace section of the page shows you the line of code that the event er It's the most important piece of information that the Sentry grouping algorithm uses to group events into one issue. You can also customize how events are grouped. Learn more about customized grouping in [Issue Grouping](/concepts/data-management/event-grouping/). -## Breadcrumbs +## Session Replay +If you’ve enabled [Session Replay](/product/explore/session-replay/), you’ll have access to a replay preview on the page (if there’s one associated with the event). Replays can be associated with both frontend and [backend errors](/product/explore/session-replay/getting-started#replays-for-backend-errors), as long as distributed tracing is set up. From here you can navigate to the rest of the replays recorded for this issue, or inspect this replay on the [Replay Details](/product/explore/session-replay/web/replay-details/) page. -[Breadcrumbs](/product/issues/issue-details/breadcrumbs/) provide a history and timeline leading up to the error event. These can include things like HTTP requests, log statements from the console or server, and DOM (document object model) events in JavaScript. +![Session Replay](./img/issue-replay.png) + +## Breadcrumbs ![Breadcrumbs](./img/issue-breadcrumbs.png) -You can set your own breadcrumbs to make them more useful for debugging. +[Breadcrumbs](/product/issues/issue-details/breadcrumbs/) provide a history and timeline leading up to the error event. These can include things like HTTP requests, log statements from the console or server, and DOM (document object model) events in JavaScript. -If you’ve enabled [Session Replay](/product/explore/session-replay/), you’ll see a replay preview under Breadcrumbs if there’s one associated with the event you’re viewing. Replays can be associated with both frontend and [backend errors](/product/explore/session-replay/getting-started#replays-for-backend-errors) (as long as distrubted tracing is set up). Clicking on the replay preview will lead you to the [Replay Details](/product/explore/session-replay/web/replay-details/) page. +You can set your own breadcrumbs to make them more useful for debugging ## Tags diff --git a/docs/product/issues/issue-details/replay-issues/hydration-error.mdx b/docs/product/issues/issue-details/replay-issues/hydration-error.mdx index a241b034796bb..53a8f93ea6b41 100644 --- a/docs/product/issues/issue-details/replay-issues/hydration-error.mdx +++ b/docs/product/issues/issue-details/replay-issues/hydration-error.mdx @@ -4,6 +4,8 @@ sidebar_order: 50 description: "Learn about Session Replay hydration errors." --- + + Hydration errors are a React-specific problem that happen when the initial client UI does not match what was rendered on the server. They can result in extra work for the browser, and a slower pageload experience for users. ## Prerequisites for Seeing Hydration Error Diff Tools diff --git a/docs/product/issues/issue-details/uptime-issues/img/uptime-issue-details.png b/docs/product/issues/issue-details/uptime-issues/img/uptime-issue-details.png new file mode 100644 index 0000000000000..839b075f118fd Binary files /dev/null and b/docs/product/issues/issue-details/uptime-issues/img/uptime-issue-details.png differ diff --git a/docs/product/issues/issue-details/uptime-issues/index.mdx b/docs/product/issues/issue-details/uptime-issues/index.mdx new file mode 100644 index 0000000000000..3d32276482d5d --- /dev/null +++ b/docs/product/issues/issue-details/uptime-issues/index.mdx @@ -0,0 +1,22 @@ +--- +title: Uptime Issues +sidebar_order: 40 +description: "Learn how to use the information on the Issue Details page to debug an error issue." +--- + + + +An uptime issue is a grouping of detected downtime events for a specific URL. A downtime event is generated by +active uptime alerts when HTTP requests fail to meet our +[uptime check criteria](/product/alerts/uptime-monitoring/#uptime-check-criteria). + +![Uptime issue details](./img/uptime-issue-details.png) + +## Traced Errors + +Uptime checks made against web services configured with one of Sentry's supported SDKs contain a +[trace](/concepts/key-terms/tracing/) that can be used to track detected errors resulting from failed HTTP uptime checks. The trace navigator allows you to browse through potential root causes of your downtime and is a powerful tool for quickly identifying and resolving issues. + +## Issue Lifecycle + +Uptime issues are grouped by the monitored URL and created upon the first detected downtime. Sentry automatically resolves an ongoing uptime issue when the monitored URL returns to a healthy status and meets our [uptime check criteria](/product/alerts/uptime-monitoring/#uptime-check-criteria). If the URL experiences subsequent downtime, the issue's status will change to regressed. diff --git a/docs/product/issues/issue-priority/index.mdx b/docs/product/issues/issue-priority/index.mdx index 887aec89378c2..340b2a4a685a0 100644 --- a/docs/product/issues/issue-priority/index.mdx +++ b/docs/product/issues/issue-priority/index.mdx @@ -8,13 +8,23 @@ Issue priority sorts the issues Sentry receives into **High**, **Medium** and ** ## How Priority Works -When Sentry receives an event, it assigns a priority to the issue based on the event's **log level** (for error issues) or **actionability** (for non-error issues like performance). For Python and Javascript projects, Sentry will also consider the error message, whether or not the error is handled, and historical actions taken on similar issues. +When Sentry receives an event, it assigns a priority to the issue based on the event's **log level** (for error issues) or **actionability** (for non-error issues like performance). There are three discrete priority levels for issues in Sentry: -- **High**: Issues that are likely to be actionable and require immediate attention. -- **Medium**: Issues that are likely to be actionable and require attention in the near future. -- **Low**: Issues that don't require immediate attention. +- **High**: Issues that are likely to be actionable and require immediate attention, such as `ERROR` and `FATAL` events. +- **Medium**: Issues that are likely to be actionable and require attention in the near future, including `WARNING` events. +- **Low**: Issues that don't require immediate attention, including `DEBUG` and `INFO` events. + +### Enhanced Issue Priority + + + +This feature is available only if your organization is on either a [Business](https://sentry.io/pricing/) or [Trial](/pricing/#product-trials) Plan. + + + +In addition to the log level or actionability, the enhanced priority calculations will consider factors such as the error message, whether or not the error is handled, and historical actions taken on similar issues, when determining the priority of an issue for Python or JavaScript projects. ### Automatic Priority Updates diff --git a/docs/product/issues/states-triage/index.mdx b/docs/product/issues/states-triage/index.mdx index 0ca34b3625b58..358117ab5ac3d 100644 --- a/docs/product/issues/states-triage/index.mdx +++ b/docs/product/issues/states-triage/index.mdx @@ -25,7 +25,7 @@ One way to limit the issues that you see is by selecting a tab at the top of the ## Manually Triaging Issues -While some issue statuses are added and updated automatically, you can manually `Archive` or `Resolve` an issue, which will also change its status. +While some issue statuses are added and updated automatically, you can manually `Archive` or `Resolve` an issue, which will also change its status and remove it from the `is:for_review` list. Items in the `is:for_review` list are new, regressed, or unresolved issues that haven't been reviewed yet. ### Archive diff --git a/docs/product/sentry-basics/integrate-frontend/configure-scms.mdx b/docs/product/sentry-basics/integrate-frontend/configure-scms.mdx index 2db53bece9df3..bdfb24f1a896e 100644 --- a/docs/product/sentry-basics/integrate-frontend/configure-scms.mdx +++ b/docs/product/sentry-basics/integrate-frontend/configure-scms.mdx @@ -64,7 +64,6 @@ The Sentry webpack plugin can automatically configure release information and se 1. To start associating commits and releases, add the following lines of code to `webpack.config.js` in your Sentry webpack plugin config: - ```javascript {filename:webpack.config.js} sentryWebpackPlugin({ diff --git a/docs/product/sentry-basics/integrate-frontend/upload-source-maps.mdx b/docs/product/sentry-basics/integrate-frontend/upload-source-maps.mdx index 8d7292d4af5a7..5c1d0eff4096f 100644 --- a/docs/product/sentry-basics/integrate-frontend/upload-source-maps.mdx +++ b/docs/product/sentry-basics/integrate-frontend/upload-source-maps.mdx @@ -58,7 +58,6 @@ If your project has a different configuration, use the [Sentry Wizard](/platform 1. Open `webpack.config.js` and add the following lines to add the plugin configuration to webpack. - ```javascript {filename:webpack.config.js} const { sentryWebpackPlugin } = require("@sentry/webpack-plugin"); diff --git a/docs/product/stats/index.mdx b/docs/product/stats/index.mdx index 1afd355ab3d8b..5ae9a6d3eddf5 100644 --- a/docs/product/stats/index.mdx +++ b/docs/product/stats/index.mdx @@ -30,7 +30,7 @@ Events and attachments that were successfully processed and stored. ### Filtered -Filtered events and attachments intentionally excluded based on definied settings. The following reasons are currently defined: +Filtered events and attachments intentionally excluded based on defined settings. The following reasons are currently defined: - **Browser Extensions**: Filtered by browser extension. - **Error Message**: Filtered based on specific error messages. @@ -48,8 +48,10 @@ For more details, please consult the [Inbound Filters](/concepts/data-management ### Rate Limited Events and attachments discarded due to rate limits or quota. The following reasons are currently defined: +- **Disabled**: Data was received for a feature or function that is not available to your organization. +- **DSN Limit**: Traffic exceeded a rate limit defined on the client key (DSN). See [Rate Limits](/pricing/quotas/#rate-limits) for more information. +- **Global Limit**: Traffic exceeded an organization-wider or project-wide rate limit. This setting is no longer available to most organizations. - **Quota**: The monthly quota of your subscription was depleted and there is no pay-as-you-go budget left. See [Adjusting your Quota](/pricing/quotas/#adjusting-your-quota) for more information. -- **Key Limit**: Traffic exceeded a rate limit defined on the client key (DSN). See [Rate Limits](/pricing/quotas/#rate-limits) for more information. - **Spike Protection**: Activated to protect from a sudden spike in event volume. See [Spike Protection](/pricing/quotas/spike-protection/) for more information. - **Internal Limit**: A rate limit for excessive volume was enforced by Sentry. These limits are not configurable. diff --git a/docs/security-legal-pii/security/ip-ranges.mdx b/docs/security-legal-pii/security/ip-ranges.mdx index 9cf3e77859b97..b4c1bb086a091 100644 --- a/docs/security-legal-pii/security/ip-ranges.mdx +++ b/docs/security-legal-pii/security/ip-ranges.mdx @@ -16,7 +16,7 @@ apply to self-hosted or single tenant. Sentry's dashboard and API are both served from different domains, depending on your organization's data storage location. The IP addresses are: -``` +```plaintext sentry.io 35.186.247.156/32 us.sentry.io 35.186.247.156/32 de.sentry.io 34.36.122.224/32, 34.36.87.148/32 @@ -31,26 +31,26 @@ Sentry's Event Ingestion respects two domains within a Data Source Name (DSN): Sentry's apex domain (`sentry.io`) accepts events from the same IP address as the Dashboard and API: -``` +```plaintext 35.186.247.156/32 ``` Sentry's organization subdomains (`o.ingest.sentry.io` and `o.us.ingest.sentry.io`) accept events from a separate IP address: -``` +```plaintext 34.120.195.249/32 ``` Sentry's organization subdomains in the EU (`o.ingest.de.sentry.io`) accept events from: -``` +```plaintext 34.120.62.213/32 130.211.36.74/32 ``` Sentry's legacy ingestion hostname (`app.getsentry.com`) accepts events from a separate IP address: -``` +```plaintext 34.96.102.34/32 ``` @@ -66,7 +66,8 @@ In some circumstances the Hosted Sentry infrastructure might send HTTP requests Sentry uses the following IP addresses to make outbound requests: US Data Storage Location -``` + +```plaintext 35.184.238.160/32 104.155.159.182/32 104.155.149.19/32 @@ -74,7 +75,8 @@ US Data Storage Location ``` EU Data Storage Location -``` + +```plaintext 34.141.31.19/32 34.141.4.162/32 35.234.78.236/32 @@ -115,10 +117,26 @@ To allow access to source maps with Apache you can use this example. It can eith All email is delivered from [SendGrid](https://sendgrid.com/) from the following dedicated, static IP addresses: -``` +```plaintext 167.89.86.73 167.89.84.75 167.89.84.14 ``` These IP addresses are only for Sentry use. + +## Uptime Monitoring + +Sentry uses the following IP addresses for uptime checks: + +US +```plaintext +34.123.33.225 +34.41.121.171 +``` + +EU +```plaintext +34.159.197.47 +35.242.231.10 +``` diff --git a/docs/security-legal-pii/security/security-policy-reporting.mdx b/docs/security-legal-pii/security/security-policy-reporting.mdx index 5cee98b841542..b9a2e63d39639 100644 --- a/docs/security-legal-pii/security/security-policy-reporting.mdx +++ b/docs/security-legal-pii/security/security-policy-reporting.mdx @@ -14,7 +14,6 @@ The integration process consists of configuring the appropriate header with your To configure CSP reports in Sentry, you’ll need to send a header from your server describing your policy and specifying the authenticated Sentry endpoint: - ``` Content-Security-Policy: ...; @@ -32,7 +31,6 @@ Though the `report-to` directive is intended to replace the deprecated `report-u Alternatively, you can set up CSP reports to simply send reports rather than enforcing the policy: - ``` Content-Security-Policy-Report-Only: ...; @@ -52,7 +50,6 @@ For more information, see the article on [MDN](https://developer.mozilla.org/en- To configure reports in Sentry, you’ll need to configure the Expect-CT header from your server: - ``` Expect-CT: ..., report-uri="https://___ORG_INGEST_DOMAIN___/api/___PROJECT_ID___/security/?sentry_key=___PUBLIC_KEY___" @@ -66,7 +63,6 @@ For more information, see the article on [MDN](https://developer.mozilla.org/en- To configure HPKP reports in Sentry, you’ll need to send a header from your server describing your policy and specify the authenticated Sentry endpoint: - ``` Public-Key-Pins: ...; report-uri="https://___ORG_INGEST_DOMAIN___/api/___PROJECT_ID___/security/?sentry_key=___PUBLIC_KEY___" diff --git a/includes/feature-stage-alpha-uptime.mdx b/includes/feature-stage-alpha-uptime.mdx new file mode 100644 index 0000000000000..087ada3a50776 --- /dev/null +++ b/includes/feature-stage-alpha-uptime.mdx @@ -0,0 +1,3 @@ + + This feature is only available if your organization has enabled [early adopter features](/organization/early-adopter-features/). Early adopter features are still in-progress and may have bugs. We recognize the irony. If you’re interested in participating, enable early adopter features in [organization settings](https://sentry.io/orgredirect/organizations/:orgslug/settings/organization). + diff --git a/includes/migration/javascript-v8/browser-other-changes.mdx b/includes/migration/javascript-v8/browser-other-changes.mdx index 3fbeabfbe2501..d81756673ce76 100644 --- a/includes/migration/javascript-v8/browser-other-changes.mdx +++ b/includes/migration/javascript-v8/browser-other-changes.mdx @@ -34,7 +34,7 @@ Sentry.init({ The xhr transport via `makeXHRTransport` transport has been removed. Only `makeFetchTransport` is available now. This means that the Sentry SDK requires the `fetch` API to be available in the environment. - + ### Removal of the `Offline` integration The `Offline` integration has been removed in favor of the offline transport wrapper diff --git a/includes/migration/javascript-v8/general-other-changes.mdx b/includes/migration/javascript-v8/general-other-changes.mdx index 1012d2de71c33..ab52d9c4dc23b 100644 --- a/includes/migration/javascript-v8/general-other-changes.mdx +++ b/includes/migration/javascript-v8/general-other-changes.mdx @@ -35,7 +35,7 @@ should be set in the `Sentry.init()` options, or in your custom `Client`s option ```TypeScript Sentry.init({ - dsn: "__DSN__", + dsn: "___DSN___", integrations: [Sentry.browserTracingIntegration()], tracePropagationTargets: ["localhost", "example.com"], }); diff --git a/includes/only-error-issues-note.mdx b/includes/only-error-issues-note.mdx index 36042607dbc0b..516becaa12a01 100644 --- a/includes/only-error-issues-note.mdx +++ b/includes/only-error-issues-note.mdx @@ -1,5 +1,5 @@ -This feature is only applicable for [error issues](/product/issues/issue-details/error-issues/). Other categories of issues (such as [performance issues](/product/issues/issue-details/performance-issues/)) do not support this feature. +This feature is only applicable for [error issues](/product/issues/issue-details/error-issues/) with debug information files, excluding source maps. Other categories of issues (such as [performance issues](/product/issues/issue-details/performance-issues/)) do not support this feature. diff --git a/includes/platforms/configuration/integrations/redux.mdx b/includes/platforms/configuration/integrations/redux.mdx index 3166ae15eba07..7dc8b82f8a31b 100644 --- a/includes/platforms/configuration/integrations/redux.mdx +++ b/includes/platforms/configuration/integrations/redux.mdx @@ -19,8 +19,6 @@ Because Sentry uses a redux **enhancer**, you should pass it as indicated above By default, Sentry SDKs normalize any context to a depth of 3. You may want to increase this for sending Redux states by passing `normalizeDepth` to the `Sentry.init` call: - - ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/includes/sentry-cli-sourcemaps.mdx b/includes/sentry-cli-sourcemaps.mdx index 737274ec9eb6a..6aedeab445f3a 100644 --- a/includes/sentry-cli-sourcemaps.mdx +++ b/includes/sentry-cli-sourcemaps.mdx @@ -60,8 +60,25 @@ sentry-cli sourcemaps upload /path/to/directory Open up Sentry and navigate to **Project Settings > Source Maps**. If you choose “Artifact Bundles” in the tabbed navigation, you'll see all the artifact bundles that have been successfully uploaded to Sentry. +### 5. Deploy your Application + +If you're following this guide from your local machine, then you've successfully: + +1. Generated minified source and source map files (artifacts) by running your application's build process +2. Injected Debug IDs into the artifacts you've just generated +3. Uploaded those artifacts to Sentry with our upload command + +The last step is deploying a new version of your application using the generated artifacts you created in step one. **We strongly recommend that you integrate `sentry-cli` into your CI/CD Pipeline**, to ensure each subsequent deploy will automatically inject debug IDs into each artifact and upload them directly to Sentry. + ### Optional Steps + + +Only follow these optional steps if you have concluded that you absolutely need them. +Using `release` and `dist` values will make your artifact upload more specific, but will also make the entire process less forgiving, which may lead to your code not being unminified by Sentry. + + + #### Associating `release` with Artifact Bundle Provide a `release` property in your SDK options. @@ -91,18 +108,19 @@ Either wait until the first event with the new release set in `Sentry.init` is s In addition to `release`, you can also add a `dist` to your uploaded artifacts, to set the distribution identifier for uploaded files. To do so, run the `sourcemaps upload` command with the additional `--dist` option. +Provide `release` and `dist` properties in your SDK options. + +```javascript +Sentry.init({ + // These values must be identical to the release and dist names specified during upload + // with the `sentry-cli`. + release: "", + dist: "", +}); +``` + The distribution identifier is used to distinguish between multiple files of the same name within a single release. `dist` can be used to disambiguate build or deployment variants. ```bash sentry-cli sourcemaps upload --release= --dist= /path/to/directory ``` - -### 5. Deploy your Application - -If you're following this guide from your local machine, then you've successfully: - -1. Generated minified source and source map files (artifacts) by running your application's build process -2. Injected Debug IDs into the artifacts you've just generated -3. Uploaded those artifacts to Sentry with our upload command - -The last step is deploying a new version of your application using the generated artifacts you created in step one. **We strongly recommend that you integrate `sentry-cli` into your CI/CD Pipeline**, to ensure each subsequent deploy will automatically inject debug IDs into each artifact and upload them directly to Sentry. diff --git a/mdx-components.tsx b/mdx-components.tsx deleted file mode 100644 index e9a9cc4362a5a..0000000000000 --- a/mdx-components.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import type { MDXComponents } from 'mdx/types' -import { PageGrid } from 'src/components/pageGrid'; - -export function useMDXComponents(components: MDXComponents): MDXComponents { - return { - PageGrid, - ...components, - } -} diff --git a/next.config.js b/next.config.js index 82736d9edc1dc..bb3124301af2e 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,5 @@ const {redirects} = require('./redirects.js'); -const createMDX = require('@next/mdx'); -const remarkPrism = require('remark-prism'); const {codecovWebpackPlugin} = require('@codecov/webpack-plugin'); const {withSentryConfig} = require('@sentry/nextjs'); @@ -13,6 +11,9 @@ const nextConfig = { experimental: { serverComponentsExternalPackages: ['rehype-preset-minify'], + outputFileTracingExcludes: { + '/**/*': ['./.git/**/*', './apps/**/*'], + }, }, webpack: (config, _options) => { @@ -33,15 +34,7 @@ const nextConfig = { redirects, }; -const withMDX = createMDX({ - options: { - remarkPlugins: [remarkPrism], - }, -}); - -module.exports = withMDX(nextConfig); - -module.exports = withSentryConfig(module.exports, { +module.exports = withSentryConfig(nextConfig, { org: 'sentry', project: 'docs', diff --git a/package.json b/package.json index 1886cce85c2cc..95b9a09ef2977 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toolbar": "^1.0.4", "@radix-ui/themes": "^2.0.3", - "@sentry-internal/global-search": "^1.0.0", + "@sentry-internal/global-search": "^1.1.0", "@sentry/nextjs": "8.20.0", "@types/mdx": "^2.0.9", "algoliasearch": "^4.23.3", @@ -72,11 +72,11 @@ "mdx-bundler": "^10.0.1", "micromark": "^4.0.0", "next": "14.2.4", - "next-auth": "^4.24.5", "next-mdx-remote": "^4.4.1", + "next-themes": "^0.3.0", "nextjs-toploader": "^1.6.6", "parse-numeric-range": "^1.3.0", - "platformicons": "^5.10.9", + "platformicons": "^6.0.2", "prism-sentry": "^1.0.2", "prismjs": "^1.27.0", "query-string": "^6.13.1", @@ -90,7 +90,6 @@ "rehype-preset-minify": "^7.0.0", "rehype-prism-diff": "^1.1.2", "rehype-prism-plus": "^1.6.3", - "rehype-slug": "^6.0.0", "rehype-stringify": "^10.0.0", "remark-gfm": "^4.0.0", "remark-mdx-images": "^3.0.0", diff --git a/platform-includes/capture-error/javascript.angular.mdx b/platform-includes/capture-error/javascript.angular.mdx index db42656796879..0e711c0c2e0c0 100644 --- a/platform-includes/capture-error/javascript.angular.mdx +++ b/platform-includes/capture-error/javascript.angular.mdx @@ -1,4 +1,4 @@ -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```typescript {filename:some.component.ts} {1,6} import * as Sentry from "@sentry/angular"; diff --git a/platform-includes/capture-error/javascript.cloudflare.mdx b/platform-includes/capture-error/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..214ceaf4ca8a9 --- /dev/null +++ b/platform-includes/capture-error/javascript.cloudflare.mdx @@ -0,0 +1,11 @@ +You can pass an `Error` object to `captureException()` to have it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. + +```javascript +import * as Sentry from "@sentry/cloudflare"; + +try { + aFunctionThatMightFail(); +} catch (e) { + Sentry.captureException(e); +} +``` diff --git a/platform-includes/capture-error/javascript.cordova.mdx b/platform-includes/capture-error/javascript.cordova.mdx index ccb591425c7ce..ee41b1c9438a8 100644 --- a/platform-includes/capture-error/javascript.cordova.mdx +++ b/platform-includes/capture-error/javascript.cordova.mdx @@ -1,4 +1,4 @@ -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```javascript import * as Sentry from "sentry-cordova"; diff --git a/platform-includes/capture-error/javascript.ember.mdx b/platform-includes/capture-error/javascript.ember.mdx index d2d56ea733353..30124c2eac074 100644 --- a/platform-includes/capture-error/javascript.ember.mdx +++ b/platform-includes/capture-error/javascript.ember.mdx @@ -1,4 +1,4 @@ -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```javascript import * as Sentry from "@sentry/ember"; diff --git a/platform-includes/capture-error/javascript.gatsby.mdx b/platform-includes/capture-error/javascript.gatsby.mdx index c3657875fc80e..be09998ee6f54 100644 --- a/platform-includes/capture-error/javascript.gatsby.mdx +++ b/platform-includes/capture-error/javascript.gatsby.mdx @@ -1,4 +1,4 @@ -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```javascript import * as Sentry from "@sentry/gatsby"; diff --git a/platform-includes/capture-error/javascript.mdx b/platform-includes/capture-error/javascript.mdx index 75c67e5384691..61943b6fcebaf 100644 --- a/platform-includes/capture-error/javascript.mdx +++ b/platform-includes/capture-error/javascript.mdx @@ -1,4 +1,4 @@ -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```javascript import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/capture-error/javascript.nextjs.mdx b/platform-includes/capture-error/javascript.nextjs.mdx index d12e226db743c..bd719fc8f9266 100644 --- a/platform-includes/capture-error/javascript.nextjs.mdx +++ b/platform-includes/capture-error/javascript.nextjs.mdx @@ -1,4 +1,4 @@ -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```javascript import * as Sentry from "@sentry/nextjs"; diff --git a/platform-includes/capture-error/javascript.nuxt.mdx b/platform-includes/capture-error/javascript.nuxt.mdx new file mode 100644 index 0000000000000..aaabafe0727df --- /dev/null +++ b/platform-includes/capture-error/javascript.nuxt.mdx @@ -0,0 +1,11 @@ +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. + +```javascript +import * as Sentry from "@sentry/nuxt"; + +try { + aFunctionThatMightFail(); +} catch (err) { + Sentry.captureException(err); +} +``` diff --git a/platform-includes/capture-error/javascript.react.mdx b/platform-includes/capture-error/javascript.react.mdx index 1029d8fecfd2d..a8ba6c1803a6f 100644 --- a/platform-includes/capture-error/javascript.react.mdx +++ b/platform-includes/capture-error/javascript.react.mdx @@ -1,6 +1,6 @@ By including and configuring Sentry, our React SDK automatically attaches global handlers to _capture_ uncaught exceptions and unhandled promise rejections, as described in the official ECMAScript 6 standard. You can disable this default behavior by changing the `onunhandledrejection` option to `false` in your GlobalHandlers integration and manually hook into each event handler, then call `Sentry.captureException` or `Sentry.captureMessage` directly. -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```javascript import * as Sentry from "@sentry/react"; diff --git a/platform-includes/capture-error/javascript.solid.mdx b/platform-includes/capture-error/javascript.solid.mdx new file mode 100644 index 0000000000000..52ac9f30af871 --- /dev/null +++ b/platform-includes/capture-error/javascript.solid.mdx @@ -0,0 +1,11 @@ +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. + +```javascript +import * as Sentry from "@sentry/solid"; + +try { + aFunctionThatMightFail(); +} catch (err) { + Sentry.captureException(err); +} +``` diff --git a/platform-includes/capture-error/javascript.solidstart.mdx b/platform-includes/capture-error/javascript.solidstart.mdx new file mode 100644 index 0000000000000..edd11afe0fcc2 --- /dev/null +++ b/platform-includes/capture-error/javascript.solidstart.mdx @@ -0,0 +1,11 @@ +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. + +```javascript +import * as Sentry from "@sentry/solidstart"; + +try { + aFunctionThatMightFail(); +} catch (err) { + Sentry.captureException(err); +} +``` diff --git a/platform-includes/capture-error/javascript.sveltekit.mdx b/platform-includes/capture-error/javascript.sveltekit.mdx index d7c694ac7d63f..7661bc56ea571 100644 --- a/platform-includes/capture-error/javascript.sveltekit.mdx +++ b/platform-includes/capture-error/javascript.sveltekit.mdx @@ -1,4 +1,4 @@ -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```javascript import * as Sentry from "@sentry/sveltekit"; diff --git a/platform-includes/capture-error/javascript.vue.mdx b/platform-includes/capture-error/javascript.vue.mdx index 240288c114e5c..875d29d6c32ad 100644 --- a/platform-includes/capture-error/javascript.vue.mdx +++ b/platform-includes/capture-error/javascript.vue.mdx @@ -1,4 +1,4 @@ -You can pass an `Error` object to `captureException()` to get it captured as event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. ```javascript import * as Sentry from "@sentry/vue"; diff --git a/platform-includes/configuration/auto-session-tracking/apple.mdx b/platform-includes/configuration/auto-session-tracking/apple.mdx index b54f6c1bb9b01..b072669078621 100644 --- a/platform-includes/configuration/auto-session-tracking/apple.mdx +++ b/platform-includes/configuration/auto-session-tracking/apple.mdx @@ -2,7 +2,6 @@ To benefit from the health data, you must use _at least_ version 5.0.0 of the Co By default, the session is terminated once the application is in the background for more than 30 seconds. You can change the time out with the option named `sessionTrackingIntervalMillis`. It takes the amount in milliseconds. For example, to configure it to be 60 seconds: - ```swift {tabTitle:Swift} import Sentry @@ -24,7 +23,6 @@ SentrySDK.start { options in If you'd like to opt out of this feature, you can do so using options: - ```swift {tabTitle:Swift} import Sentry diff --git a/platform-includes/configuration/auto-session-tracking/react-native.mdx b/platform-includes/configuration/auto-session-tracking/react-native.mdx index a9c76cc0c7e4c..275b4cad64a3e 100644 --- a/platform-includes/configuration/auto-session-tracking/react-native.mdx +++ b/platform-includes/configuration/auto-session-tracking/react-native.mdx @@ -12,7 +12,6 @@ Sentry.init({ The session terminates once the application is in the background for more than 30 seconds. To change the timeout, use the option `sessionTrackingIntervalMillis`. For example: - ```javascript import * as Sentry from "@sentry/react-native"; diff --git a/platform-includes/configuration/before-send-check-in/php.mdx b/platform-includes/configuration/before-send-check-in/php.mdx index 9abfd606df371..4a7c759ae5931 100644 --- a/platform-includes/configuration/before-send-check-in/php.mdx +++ b/platform-includes/configuration/before-send-check-in/php.mdx @@ -1,6 +1,5 @@ In PHP, a closure can be used to modify the event or return a completely new one. If you return `null`, the event will be discarded. - ```php \Sentry\init([ diff --git a/platform-includes/configuration/before-send-fingerprint/apple.mdx b/platform-includes/configuration/before-send-fingerprint/apple.mdx index 75532172413c7..56460e137f7c1 100644 --- a/platform-includes/configuration/before-send-fingerprint/apple.mdx +++ b/platform-includes/configuration/before-send-fingerprint/apple.mdx @@ -1,5 +1,3 @@ - - ```swift {tabTitle:Swift} import Sentry diff --git a/platform-includes/configuration/before-send-fingerprint/php.mdx b/platform-includes/configuration/before-send-fingerprint/php.mdx index 064dff2ed0685..a2033eeef8467 100644 --- a/platform-includes/configuration/before-send-fingerprint/php.mdx +++ b/platform-includes/configuration/before-send-fingerprint/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/configuration/before-send-hint/php.mdx b/platform-includes/configuration/before-send-hint/php.mdx index 796556e0ce324..0187875b82eeb 100644 --- a/platform-includes/configuration/before-send-hint/php.mdx +++ b/platform-includes/configuration/before-send-hint/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/configuration/before-send-span/apple.mdx b/platform-includes/configuration/before-send-span/apple.mdx index c100c21c00909..982be8de5844e 100644 --- a/platform-includes/configuration/before-send-span/apple.mdx +++ b/platform-includes/configuration/before-send-span/apple.mdx @@ -1,5 +1,3 @@ - - ```swift {tabTitle:Swift} import Sentry diff --git a/platform-includes/configuration/before-send-span/javascript.mdx b/platform-includes/configuration/before-send-span/javascript.mdx index 7b60a0d7fb4b0..bcbba89531bec 100644 --- a/platform-includes/configuration/before-send-span/javascript.mdx +++ b/platform-includes/configuration/before-send-span/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/configuration/before-send-transaction/javascript.mdx b/platform-includes/configuration/before-send-transaction/javascript.mdx index bb344dfc570f3..f67628ea5193c 100644 --- a/platform-includes/configuration/before-send-transaction/javascript.mdx +++ b/platform-includes/configuration/before-send-transaction/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/configuration/before-send-transaction/php.mdx b/platform-includes/configuration/before-send-transaction/php.mdx index 6361ed10b13ba..e713190bda4ee 100644 --- a/platform-includes/configuration/before-send-transaction/php.mdx +++ b/platform-includes/configuration/before-send-transaction/php.mdx @@ -1,6 +1,5 @@ In PHP, a closure can be used to modify the event or return a completely new one. If you return `null`, the event will be discarded. - ```php \Sentry\init([ diff --git a/platform-includes/configuration/before-send/apple.mdx b/platform-includes/configuration/before-send/apple.mdx index 137a3d36083e7..f9fec2233fef3 100644 --- a/platform-includes/configuration/before-send/apple.mdx +++ b/platform-includes/configuration/before-send/apple.mdx @@ -1,5 +1,3 @@ - - ```swift {tabTitle:Swift} import Sentry diff --git a/platform-includes/configuration/before-send/javascript.mdx b/platform-includes/configuration/before-send/javascript.mdx index dbe98307da92b..67b19baefe570 100644 --- a/platform-includes/configuration/before-send/javascript.mdx +++ b/platform-includes/configuration/before-send/javascript.mdx @@ -2,7 +2,6 @@ In JavaScript, you can use a function to modify the event or return a completely You can either return `null` or an event payload - no other return value (including `void`) is allowed. If you return `null`, the event will be discarded. - ```javascript Sentry.init({ diff --git a/platform-includes/configuration/before-send/php.mdx b/platform-includes/configuration/before-send/php.mdx index f7b87cbc9740c..0cbf5b53318be 100644 --- a/platform-includes/configuration/before-send/php.mdx +++ b/platform-includes/configuration/before-send/php.mdx @@ -1,6 +1,5 @@ In PHP, a closure can be used to modify the event or return a completely new one. If you return `null`, the event will be discarded. - ```php \Sentry\init([ diff --git a/platform-includes/configuration/capture-console/javascript.bun.mdx b/platform-includes/configuration/capture-console/javascript.bun.mdx index cb3cabe5fb488..71f4c64f708f6 100644 --- a/platform-includes/configuration/capture-console/javascript.bun.mdx +++ b/platform-includes/configuration/capture-console/javascript.bun.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/bun"; diff --git a/platform-includes/configuration/capture-console/javascript.cloudflare.mdx b/platform-includes/configuration/capture-console/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..898de533c4494 --- /dev/null +++ b/platform-includes/configuration/capture-console/javascript.cloudflare.mdx @@ -0,0 +1,8 @@ +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.captureConsoleIntegration()], +}); +``` diff --git a/platform-includes/configuration/capture-console/javascript.deno.mdx b/platform-includes/configuration/capture-console/javascript.deno.mdx index b867eae5e576e..486148c8b7d61 100644 --- a/platform-includes/configuration/capture-console/javascript.deno.mdx +++ b/platform-includes/configuration/capture-console/javascript.deno.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "https://deno.land/x/sentry/index.mjs"; diff --git a/platform-includes/configuration/capture-console/javascript.mdx b/platform-includes/configuration/capture-console/javascript.mdx index 23b4c5b98f14f..38ab80d757c11 100644 --- a/platform-includes/configuration/capture-console/javascript.mdx +++ b/platform-includes/configuration/capture-console/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/capture-console/javascript.node.mdx b/platform-includes/configuration/capture-console/javascript.node.mdx index df1cfbac007c4..bf46f3a30beff 100644 --- a/platform-includes/configuration/capture-console/javascript.node.mdx +++ b/platform-includes/configuration/capture-console/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/config-intro/android.mdx b/platform-includes/configuration/config-intro/android.mdx index 40f070801e1ba..e09f0579939d6 100644 --- a/platform-includes/configuration/config-intro/android.mdx +++ b/platform-includes/configuration/config-intro/android.mdx @@ -1,6 +1,5 @@ Options on Android can be set by setting the values on the `AndroidManifest.xml` file: - ```xml diff --git a/platform-includes/configuration/config-intro/apple.mdx b/platform-includes/configuration/config-intro/apple.mdx index 56f543c654387..6bdfe05da1a94 100644 --- a/platform-includes/configuration/config-intro/apple.mdx +++ b/platform-includes/configuration/config-intro/apple.mdx @@ -1,5 +1,3 @@ - - ```swift {tabTitle:Swift} import Sentry // Make sure you import Sentry diff --git a/platform-includes/configuration/config-intro/dart.mdx b/platform-includes/configuration/config-intro/dart.mdx index 093a19b50b25e..89f4b18084edf 100644 --- a/platform-includes/configuration/config-intro/dart.mdx +++ b/platform-includes/configuration/config-intro/dart.mdx @@ -1,6 +1,5 @@ Options are passed to the `Sentry.init` method: - ```dart import 'package:sentry/sentry.dart'; diff --git a/platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx b/platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx index dff6564f4f218..0a9c63fdebfde 100644 --- a/platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx +++ b/platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx @@ -3,7 +3,6 @@ pass the option object along for modifications: ASP.NET Core 2.x: - ```csharp public static IWebHost BuildWebHost(string[] args) => @@ -19,7 +18,6 @@ public static IWebHost BuildWebHost(string[] args) => ASP.NET Core 3.0: - ```csharp public static IHostBuilder CreateHostBuilder(string[] args) => @@ -38,7 +36,6 @@ public static IHostBuilder CreateHostBuilder(string[] args) => Additionally, you can set your options on `appsettings.json` when using `UseSentry()`: - ```json {filename:appsettings.json} "Sentry": { diff --git a/platform-includes/configuration/config-intro/dotnet.google-cloud-functions.mdx b/platform-includes/configuration/config-intro/dotnet.google-cloud-functions.mdx index c133df07818b1..2f80bbb1c94df 100644 --- a/platform-includes/configuration/config-intro/dotnet.google-cloud-functions.mdx +++ b/platform-includes/configuration/config-intro/dotnet.google-cloud-functions.mdx @@ -19,7 +19,6 @@ With that in mind, you'll be able to configure your options using two options: u See both methods below: - ```json {tabTitle:appsettings.json} "Sentry": { diff --git a/platform-includes/configuration/config-intro/dotnet.mdx b/platform-includes/configuration/config-intro/dotnet.mdx index 3e947961daad3..278a0942e3caf 100644 --- a/platform-includes/configuration/config-intro/dotnet.mdx +++ b/platform-includes/configuration/config-intro/dotnet.mdx @@ -1,6 +1,5 @@ For example, initialize with `SentrySdk.Init` in your `Program.cs` file: - ```csharp using Sentry; diff --git a/platform-includes/configuration/config-intro/dotnet.nlog.mdx b/platform-includes/configuration/config-intro/dotnet.nlog.mdx index 8c024e8d17f80..7f406b6e56b6b 100644 --- a/platform-includes/configuration/config-intro/dotnet.nlog.mdx +++ b/platform-includes/configuration/config-intro/dotnet.nlog.mdx @@ -6,7 +6,6 @@ For more information on how to dynamically set event data via `NLog.config`, see You can configure the Sentry NLog target via `NLog.config` or by code as follows: - ```xml {tabTitle:NLog.config} diff --git a/platform-includes/configuration/config-intro/dotnet.xamarin.mdx b/platform-includes/configuration/config-intro/dotnet.xamarin.mdx index 63f0d204aacdc..5d163c086343a 100644 --- a/platform-includes/configuration/config-intro/dotnet.xamarin.mdx +++ b/platform-includes/configuration/config-intro/dotnet.xamarin.mdx @@ -1,7 +1,6 @@ Options can be set by passing a callback to the `Init()` method which will pass the option object along for modifications: - ```csharp using Sentry; diff --git a/platform-includes/configuration/config-intro/elixir.mdx b/platform-includes/configuration/config-intro/elixir.mdx index 002ec231d5691..e8771f78b8c46 100644 --- a/platform-includes/configuration/config-intro/elixir.mdx +++ b/platform-includes/configuration/config-intro/elixir.mdx @@ -2,7 +2,6 @@ In Elixir, configuration is handled using the standard Elixir configuration ([`C Add configuration to the `:sentry` application in the your config file. - ```elixir {filename:config/prod.exs} config :sentry, diff --git a/platform-includes/configuration/config-intro/flutter.mdx b/platform-includes/configuration/config-intro/flutter.mdx index 4725d928a4d09..bad6291ac1e2f 100644 --- a/platform-includes/configuration/config-intro/flutter.mdx +++ b/platform-includes/configuration/config-intro/flutter.mdx @@ -1,6 +1,5 @@ Options are passed to the `SentryFlutter.init` method: - ```dart import 'package:flutter/widgets.dart'; diff --git a/platform-includes/configuration/config-intro/go.mdx b/platform-includes/configuration/config-intro/go.mdx index 2b0d537827809..e8bd7cf3b2dec 100644 --- a/platform-includes/configuration/config-intro/go.mdx +++ b/platform-includes/configuration/config-intro/go.mdx @@ -1,6 +1,5 @@ Options are passed to the `Init()` method as an instance of `sentry.ClientOptions`: - ```go sentry.Init(sentry.ClientOptions{ diff --git a/platform-includes/configuration/config-intro/java.mdx b/platform-includes/configuration/config-intro/java.mdx index 8d79d31084fce..d28481fb8845d 100644 --- a/platform-includes/configuration/config-intro/java.mdx +++ b/platform-includes/configuration/config-intro/java.mdx @@ -1,7 +1,6 @@ Options can be set by passing a callback to the `init()` method which will pass the option object along for modifications: - ```java {tabTitle:Java} import io.sentry.Sentry; diff --git a/platform-includes/configuration/config-intro/java.spring-boot.mdx b/platform-includes/configuration/config-intro/java.spring-boot.mdx index 8bd4ea8032287..161cb699979a6 100644 --- a/platform-includes/configuration/config-intro/java.spring-boot.mdx +++ b/platform-includes/configuration/config-intro/java.spring-boot.mdx @@ -1,6 +1,5 @@ Basic options properties can be set in `application.properties` using `sentry` prefix: - ```properties {tabTitle: application.properties} sentry.dsn=___PUBLIC_DSN___ diff --git a/platform-includes/configuration/config-intro/javascript.ember.mdx b/platform-includes/configuration/config-intro/javascript.ember.mdx index 13993c59735e4..948333d7f5069 100644 --- a/platform-includes/configuration/config-intro/javascript.ember.mdx +++ b/platform-includes/configuration/config-intro/javascript.ember.mdx @@ -1,6 +1,5 @@ Options are passed to `sentry` inside your environment: - ```javascript import * as Sentry from "@sentry/ember"; diff --git a/platform-includes/configuration/config-intro/javascript.mdx b/platform-includes/configuration/config-intro/javascript.mdx index bbe590c189326..0e2fff204fde7 100644 --- a/platform-includes/configuration/config-intro/javascript.mdx +++ b/platform-includes/configuration/config-intro/javascript.mdx @@ -1,6 +1,5 @@ Options are passed to the `init()` function as object: - ```javascript Sentry.init({ diff --git a/platform-includes/configuration/config-intro/kotlin-multiplatform.mdx b/platform-includes/configuration/config-intro/kotlin-multiplatform.mdx index e00a485410527..f7c394b0274c4 100644 --- a/platform-includes/configuration/config-intro/kotlin-multiplatform.mdx +++ b/platform-includes/configuration/config-intro/kotlin-multiplatform.mdx @@ -1,5 +1,3 @@ - - ```kotlin import io.sentry.kotlin.multiplatform.Sentry diff --git a/platform-includes/configuration/config-intro/native.mdx b/platform-includes/configuration/config-intro/native.mdx index 14e6fad84b6e9..58b79b31e10ba 100644 --- a/platform-includes/configuration/config-intro/native.mdx +++ b/platform-includes/configuration/config-intro/native.mdx @@ -2,7 +2,6 @@ Options are passed into `sentry_init` as a pointer to an options object created via `sentry_options_new()`. There are functions that allow to set all options individually. - ```c #include diff --git a/platform-includes/configuration/config-intro/php.mdx b/platform-includes/configuration/config-intro/php.mdx index 8a0d378efe3fd..5106cbc1e4cf1 100644 --- a/platform-includes/configuration/config-intro/php.mdx +++ b/platform-includes/configuration/config-intro/php.mdx @@ -1,6 +1,5 @@ Options are passed to the `init()` method as an array: - ```php \Sentry\init([ diff --git a/platform-includes/configuration/config-intro/powershell.mdx b/platform-includes/configuration/config-intro/powershell.mdx index d4cc800452a93..e03ce3699d6fa 100644 --- a/platform-includes/configuration/config-intro/powershell.mdx +++ b/platform-includes/configuration/config-intro/powershell.mdx @@ -1,6 +1,5 @@ For example, initialize with `Start-Sentry` in your PowerShell script: - ```powershell Start-Sentry { diff --git a/platform-includes/configuration/config-intro/python.mdx b/platform-includes/configuration/config-intro/python.mdx index 0874c7b09aef6..c873dcdbb658a 100644 --- a/platform-includes/configuration/config-intro/python.mdx +++ b/platform-includes/configuration/config-intro/python.mdx @@ -1,6 +1,5 @@ Options are passed to the `init()` function as optional keyword arguments: - ```python import sentry_sdk diff --git a/platform-includes/configuration/config-intro/ruby.mdx b/platform-includes/configuration/config-intro/ruby.mdx index a17aaf9f2f7f3..4ef54d3d9a93c 100644 --- a/platform-includes/configuration/config-intro/ruby.mdx +++ b/platform-includes/configuration/config-intro/ruby.mdx @@ -1,10 +1,10 @@ -Options are passed within the `init` block: +Options are passed as attributes to the `config` object within the `init` block: - ```ruby Sentry.init do |config| config.dsn = '___PUBLIC_DSN___' - config.context_lines = 5 + config.max_breadcrumbs = 5 + config.debug = true end ``` diff --git a/platform-includes/configuration/config-intro/rust.mdx b/platform-includes/configuration/config-intro/rust.mdx index 58e9aacc59729..a45cf71d5232a 100644 --- a/platform-includes/configuration/config-intro/rust.mdx +++ b/platform-includes/configuration/config-intro/rust.mdx @@ -2,7 +2,6 @@ Options are passed to the `init()` function as tuple where the first argument is Additionally, the `release_name` macro automatically generates the expected release based on the cargo metadata. - ```rust let _guard = sentry::init(("___PUBLIC_DSN___", sentry::ClientOptions { diff --git a/platform-includes/configuration/contextlines/javascript.bun.mdx b/platform-includes/configuration/contextlines/javascript.bun.mdx index 97932da7b8b57..90b5db874851a 100644 --- a/platform-includes/configuration/contextlines/javascript.bun.mdx +++ b/platform-includes/configuration/contextlines/javascript.bun.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/bun"; diff --git a/platform-includes/configuration/contextlines/javascript.cloudflare.mdx b/platform-includes/configuration/contextlines/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..966c34237406c --- /dev/null +++ b/platform-includes/configuration/contextlines/javascript.cloudflare.mdx @@ -0,0 +1,8 @@ +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.contextLinesIntegration()], +}); +``` diff --git a/platform-includes/configuration/contextlines/javascript.deno.mdx b/platform-includes/configuration/contextlines/javascript.deno.mdx index a50ca2e8b9ae7..1008061bccb53 100644 --- a/platform-includes/configuration/contextlines/javascript.deno.mdx +++ b/platform-includes/configuration/contextlines/javascript.deno.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "https://deno.land/x/sentry/index.mjs"; diff --git a/platform-includes/configuration/contextlines/javascript.mdx b/platform-includes/configuration/contextlines/javascript.mdx index 62f7a233340b3..36ac8d1107c33 100644 --- a/platform-includes/configuration/contextlines/javascript.mdx +++ b/platform-includes/configuration/contextlines/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/contextlines/javascript.node.mdx b/platform-includes/configuration/contextlines/javascript.node.mdx index bcbd9a0cfb669..b7c9fc1d52c75 100644 --- a/platform-includes/configuration/contextlines/javascript.node.mdx +++ b/platform-includes/configuration/contextlines/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/debug/javascript.bun.mdx b/platform-includes/configuration/debug/javascript.bun.mdx index 0c432dca1e359..e0cc58ee3fb6f 100644 --- a/platform-includes/configuration/debug/javascript.bun.mdx +++ b/platform-includes/configuration/debug/javascript.bun.mdx @@ -1,7 +1,5 @@ - - ```javascript {tabTitle: JavaScript} -import * as Sentry from "@sentry/node"; +import * as Sentry from "@sentry/bun"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/configuration/debug/javascript.cloudflare.mdx b/platform-includes/configuration/debug/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..2b224acf70344 --- /dev/null +++ b/platform-includes/configuration/debug/javascript.cloudflare.mdx @@ -0,0 +1,8 @@ +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.debugIntegration()], +}); +``` diff --git a/platform-includes/configuration/debug/javascript.deno.mdx b/platform-includes/configuration/debug/javascript.deno.mdx index 64ed8250b85fc..e21afcbd59e8e 100644 --- a/platform-includes/configuration/debug/javascript.deno.mdx +++ b/platform-includes/configuration/debug/javascript.deno.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "https://deno.land/x/sentry/index.mjs"; diff --git a/platform-includes/configuration/debug/javascript.mdx b/platform-includes/configuration/debug/javascript.mdx index 28cef1c7cf232..2e92a3dfd7574 100644 --- a/platform-includes/configuration/debug/javascript.mdx +++ b/platform-includes/configuration/debug/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/debug/javascript.node.mdx b/platform-includes/configuration/debug/javascript.node.mdx index 0c432dca1e359..89d8d149e9c07 100644 --- a/platform-includes/configuration/debug/javascript.node.mdx +++ b/platform-includes/configuration/debug/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/dedupe/javascript.bun.mdx b/platform-includes/configuration/dedupe/javascript.bun.mdx index 7eb7a67423a94..29520810f8991 100644 --- a/platform-includes/configuration/dedupe/javascript.bun.mdx +++ b/platform-includes/configuration/dedupe/javascript.bun.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/bun"; diff --git a/platform-includes/configuration/dedupe/javascript.cloudflare.mdx b/platform-includes/configuration/dedupe/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..41bc95696fc0d --- /dev/null +++ b/platform-includes/configuration/dedupe/javascript.cloudflare.mdx @@ -0,0 +1,8 @@ +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.dedupeIntegration()], +}); +``` diff --git a/platform-includes/configuration/dedupe/javascript.deno.mdx b/platform-includes/configuration/dedupe/javascript.deno.mdx index 6eacb782d8420..a553dc4155749 100644 --- a/platform-includes/configuration/dedupe/javascript.deno.mdx +++ b/platform-includes/configuration/dedupe/javascript.deno.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "https://deno.land/x/sentry/index.mjs"; diff --git a/platform-includes/configuration/dedupe/javascript.mdx b/platform-includes/configuration/dedupe/javascript.mdx index 7ca5037c78f6c..5e9db0474bd9b 100644 --- a/platform-includes/configuration/dedupe/javascript.mdx +++ b/platform-includes/configuration/dedupe/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/dedupe/javascript.node.mdx b/platform-includes/configuration/dedupe/javascript.node.mdx index e8c37c082408f..f5260f4ca8c35 100644 --- a/platform-includes/configuration/dedupe/javascript.node.mdx +++ b/platform-includes/configuration/dedupe/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/dedupe/react-native.mdx b/platform-includes/configuration/dedupe/react-native.mdx index acfb5b59662a8..b3dbb5464a8f0 100644 --- a/platform-includes/configuration/dedupe/react-native.mdx +++ b/platform-includes/configuration/dedupe/react-native.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/react-native"; import { Dedupe as DedupeIntegration } from "@sentry/integrations"; diff --git a/platform-includes/configuration/diagnostic-logger/dotnet.mdx b/platform-includes/configuration/diagnostic-logger/dotnet.mdx index 790d3d9564fce..9596719dd6de0 100644 --- a/platform-includes/configuration/diagnostic-logger/dotnet.mdx +++ b/platform-includes/configuration/diagnostic-logger/dotnet.mdx @@ -1,6 +1,5 @@ Sentry's SDK includes its own internal logger to report diagnostics that may be useful when troubleshooting your Sentry configuration. To enable logging, set the `Debug` option to `true`: - ```csharp options => diff --git a/platform-includes/configuration/drain-example/javascript.node.mdx b/platform-includes/configuration/drain-example/javascript.node.mdx index 45a88bfa9b496..265d8ecee242b 100644 --- a/platform-includes/configuration/drain-example/javascript.node.mdx +++ b/platform-includes/configuration/drain-example/javascript.node.mdx @@ -2,6 +2,8 @@ The `close` method optionally takes a timeout in milliseconds and returns a promise that resolves when all pending events are flushed, or the timeout kicks in. +Note that you can call this method on `SIGTERM` to gracefully shut down a service or container. + ```javascript Sentry.close(2000).then(function () { process.exit(); diff --git a/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.mdx b/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.mdx index aa6eb3816ea81..fdce52fcec63a 100644 --- a/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.mdx +++ b/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.node.mdx b/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.node.mdx index b08d0035dd398..b92613cc2f0f6 100644 --- a/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.node.mdx +++ b/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/enable-pluggable-integrations/javascript.mdx b/platform-includes/configuration/enable-pluggable-integrations/javascript.mdx index 00fe4a5182d54..8081cb4145d26 100644 --- a/platform-includes/configuration/enable-pluggable-integrations/javascript.mdx +++ b/platform-includes/configuration/enable-pluggable-integrations/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/enable-pluggable-integrations/javascript.node.mdx b/platform-includes/configuration/enable-pluggable-integrations/javascript.node.mdx index 8de59aaeef0fc..e10d63e286eda 100644 --- a/platform-includes/configuration/enable-pluggable-integrations/javascript.node.mdx +++ b/platform-includes/configuration/enable-pluggable-integrations/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/enable-pluggable-integrations/react-native.mdx b/platform-includes/configuration/enable-pluggable-integrations/react-native.mdx index acfb5b59662a8..b3dbb5464a8f0 100644 --- a/platform-includes/configuration/enable-pluggable-integrations/react-native.mdx +++ b/platform-includes/configuration/enable-pluggable-integrations/react-native.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/react-native"; import { Dedupe as DedupeIntegration } from "@sentry/integrations"; diff --git a/platform-includes/configuration/extra-error-data/javascript.bun.mdx b/platform-includes/configuration/extra-error-data/javascript.bun.mdx index 43800e789627d..2be84d8cb9a00 100644 --- a/platform-includes/configuration/extra-error-data/javascript.bun.mdx +++ b/platform-includes/configuration/extra-error-data/javascript.bun.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/bun"; diff --git a/platform-includes/configuration/extra-error-data/javascript.cloudflare.mdx b/platform-includes/configuration/extra-error-data/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..3566c2b80a897 --- /dev/null +++ b/platform-includes/configuration/extra-error-data/javascript.cloudflare.mdx @@ -0,0 +1,8 @@ +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.extraErrorDataIntegration()], +}); +``` diff --git a/platform-includes/configuration/extra-error-data/javascript.deno.mdx b/platform-includes/configuration/extra-error-data/javascript.deno.mdx index 0741bcce2c928..c8fe550fb0216 100644 --- a/platform-includes/configuration/extra-error-data/javascript.deno.mdx +++ b/platform-includes/configuration/extra-error-data/javascript.deno.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "https://deno.land/x/sentry/index.mjs"; diff --git a/platform-includes/configuration/extra-error-data/javascript.mdx b/platform-includes/configuration/extra-error-data/javascript.mdx index 9d6b15a78f000..24efdd84f9b48 100644 --- a/platform-includes/configuration/extra-error-data/javascript.mdx +++ b/platform-includes/configuration/extra-error-data/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/extra-error-data/javascript.node.mdx b/platform-includes/configuration/extra-error-data/javascript.node.mdx index 98a979e4e8963..3abc090a19e06 100644 --- a/platform-includes/configuration/extra-error-data/javascript.node.mdx +++ b/platform-includes/configuration/extra-error-data/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/http-client/javascript.mdx b/platform-includes/configuration/http-client/javascript.mdx index 882f81926bac3..ebb3b5674cb78 100644 --- a/platform-includes/configuration/http-client/javascript.mdx +++ b/platform-includes/configuration/http-client/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/http-client/react-native.mdx b/platform-includes/configuration/http-client/react-native.mdx index 2b3ec155955c4..dbbb871e27658 100644 --- a/platform-includes/configuration/http-client/react-native.mdx +++ b/platform-includes/configuration/http-client/react-native.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/react-native"; import { HttpClient as HttpClientIntegration } from "@sentry/integrations"; diff --git a/platform-includes/configuration/ignore-errors/dart.mdx b/platform-includes/configuration/ignore-errors/dart.mdx new file mode 100644 index 0000000000000..1196b49e59d78 --- /dev/null +++ b/platform-includes/configuration/ignore-errors/dart.mdx @@ -0,0 +1,10 @@ +```dart + await SentryFlutter.init( + (options) { + options.dsn = '___PUBLIC_DSN___'; + options.ignoreErrors = ["my-error", "^error-.*\$"]; + ... + }, + appRunner: () => runApp(MyApp()), + ); +``` diff --git a/platform-includes/configuration/ignore-errors/javascript.mdx b/platform-includes/configuration/ignore-errors/javascript.mdx index 6b067619837e9..1d8238f7a664b 100644 --- a/platform-includes/configuration/ignore-errors/javascript.mdx +++ b/platform-includes/configuration/ignore-errors/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/configuration/ignore-transactions/dart.mdx b/platform-includes/configuration/ignore-transactions/dart.mdx new file mode 100644 index 0000000000000..607847272da60 --- /dev/null +++ b/platform-includes/configuration/ignore-transactions/dart.mdx @@ -0,0 +1,10 @@ +```dart + await SentryFlutter.init( + (options) { + options.dsn = '___PUBLIC_DSN___'; + options.ignoreTransactions = ["my-transaction", "^transaction-.*\$" ]; + ... + }, + appRunner: () => runApp(MyApp()), + ); +``` diff --git a/platform-includes/configuration/ignore-transactions/javascript.mdx b/platform-includes/configuration/ignore-transactions/javascript.mdx index f3f9be564fbb1..1aa8541e84719 100644 --- a/platform-includes/configuration/ignore-transactions/javascript.mdx +++ b/platform-includes/configuration/ignore-transactions/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/configuration/integrations/javascript.astro.mdx b/platform-includes/configuration/integrations/javascript.astro.mdx index 3fdaa2b50cb9e..371820d4c923f 100644 --- a/platform-includes/configuration/integrations/javascript.astro.mdx +++ b/platform-includes/configuration/integrations/javascript.astro.mdx @@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r | [`anrIntegration`](./anr) | | ✓ | | | | [`localVariablesIntegration`](./localvariables) | | ✓ | | | | [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.aws-lambda.mdx b/platform-includes/configuration/integrations/javascript.aws-lambda.mdx index 4eff803d43b41..64cfd0b560086 100644 --- a/platform-includes/configuration/integrations/javascript.aws-lambda.mdx +++ b/platform-includes/configuration/integrations/javascript.aws-lambda.mdx @@ -33,4 +33,5 @@ | [`requestDataIntegration`](./requestdata) | | | ✓ | | | [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.bun.mdx b/platform-includes/configuration/integrations/javascript.bun.mdx index f400e3b7d7fca..911aeab271a63 100644 --- a/platform-includes/configuration/integrations/javascript.bun.mdx +++ b/platform-includes/configuration/integrations/javascript.bun.mdx @@ -29,4 +29,5 @@ | [`extraErrorDataIntegration`](./extraerrordata) | | | | ✓ | | [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.cloudflare.mdx b/platform-includes/configuration/integrations/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..c3c7588a4d3d0 --- /dev/null +++ b/platform-includes/configuration/integrations/javascript.cloudflare.mdx @@ -0,0 +1,15 @@ +### Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Cron** | **Additional Context** | +| ---------------------------------------------------- | :--------------: | :--------: | :-------------: | :------: | :--------------------: | +| [`dedupeIntegration`](./dedupe) | ✓ | ✓ | | | | +| [`fetchIntegration`](./fetchIntegration) | ✓ | ✓ | ✓ | | | +| [`functionToStringIntegration`](./functiontostring) | ✓ | | | | | +| [`inboundFiltersIntegration`](./inboundfilters) | ✓ | ✓ | | | | +| [`linkedErrorsIntegration`](./linkederrors) | ✓ | ✓ | | | | +| [`requestDataIntegration`](./requestDataIntegration) | ✓ | | | | ✓ | +| [`captureConsoleIntegration`](./captureconsole) | | | | | ✓ | +| [`debugIntegration`](./debug) | | | | | | +| [`extraErrorDataIntegration`](./extraerrordata) | | | | | ✓ | +| [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | +| [`sessionTimingIntegration`](./sessiontiming) | | | | | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.fastify.mdx b/platform-includes/configuration/integrations/javascript.fastify.mdx index 13cd53913221d..41119f6aee48f 100644 --- a/platform-includes/configuration/integrations/javascript.fastify.mdx +++ b/platform-includes/configuration/integrations/javascript.fastify.mdx @@ -30,4 +30,5 @@ | [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | | [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.gcp-functions.mdx b/platform-includes/configuration/integrations/javascript.gcp-functions.mdx index 9f6a107921a01..1739fd983eb27 100644 --- a/platform-includes/configuration/integrations/javascript.gcp-functions.mdx +++ b/platform-includes/configuration/integrations/javascript.gcp-functions.mdx @@ -33,4 +33,5 @@ | [`requestDataIntegration`](./requestdata) | | | ✓ | | | [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.nestjs.mdx b/platform-includes/configuration/integrations/javascript.nestjs.mdx index 9d77b34fc2da0..383a243faa291 100644 --- a/platform-includes/configuration/integrations/javascript.nestjs.mdx +++ b/platform-includes/configuration/integrations/javascript.nestjs.mdx @@ -31,4 +31,5 @@ | [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | | [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.nextjs.mdx b/platform-includes/configuration/integrations/javascript.nextjs.mdx index a467f0da84316..83bd9b7202c83 100644 --- a/platform-includes/configuration/integrations/javascript.nextjs.mdx +++ b/platform-includes/configuration/integrations/javascript.nextjs.mdx @@ -67,6 +67,7 @@ Depending on whether an integration enhances the functionality of a particular r | [`anrIntegration`](./anr) | | ✓ | | | | [`localVariablesIntegration`](./localvariables) | | ✓ | | | | [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | ### Edge Integrations diff --git a/platform-includes/configuration/integrations/javascript.node.mdx b/platform-includes/configuration/integrations/javascript.node.mdx index 9d77b34fc2da0..383a243faa291 100644 --- a/platform-includes/configuration/integrations/javascript.node.mdx +++ b/platform-includes/configuration/integrations/javascript.node.mdx @@ -31,4 +31,5 @@ | [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | | [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.nuxt.mdx b/platform-includes/configuration/integrations/javascript.nuxt.mdx new file mode 100644 index 0000000000000..e13c715497e3f --- /dev/null +++ b/platform-includes/configuration/integrations/javascript.nuxt.mdx @@ -0,0 +1,65 @@ +The Nuxt SDK initializes the SDK in two runtimes: Browser and Node.js. +However, it's important to note that not all integrations are compatible with all of these runtimes. + +Depending on whether an integration enhances the functionality of a particular runtime, such as the `BrowserTracing` integration for the browser runtime or the `RequestData` integration for the Node.js runtime, you can only include these integrations in their respective configuration files: + +- For the browser runtime integrations, add integrations to `Sentry.init` in `sentry.client.config.(js|ts)` +- For the Node.js runtime integrations, add integrations to `Sentry.init` in `public/instrument.server.mjs` + +### Common Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Additional Context** | +| --------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------------------: | +| [`dedupeIntegration`](./dedupe) | ✓ | ✓ | | | +| [`functionToStringIntegration`](./functiontostring) | ✓ | | | | +| [`inboundFiltersIntegration`](./inboundfilters) | ✓ | ✓ | | | +| [`linkedErrorsIntegration`](./linkederrors) | ✓ | ✓ | | | +| [`captureConsoleIntegration`](./captureconsole) | | | | ✓ | +| [`debugIntegration`](./debug) | | | | | +| [`extraErrorDataIntegration`](./extraerrordata) | | | | ✓ | +| [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | +| [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | + +### Browser Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Replay** | **Additional Context** | +| ----------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------: | :--------------------: | +| [`breadcrumbsIntegration`](./breadcrumbs) | ✓ | | | | ✓ | +| [`browserApiErrorsIntegration`](./browserapierrors) | ✓ | ✓ | | | | +| [`browserTracingIntegration`](./browsertracing) | ✓ | | ✓ | | ✓ | +| [`globalHandlersIntegration`](./globalhandlers) | ✓ | ✓ | | | | +| [`httpContextIntegration`](./httpcontext) | ✓ | | | | ✓ | +| [`browserProfilingIntegration`](./browserprofiling) | | | ✓ | | | +| [`contextLinesIntegration`](./contextlines) | | ✓ | | | | +| [`httpClientIntegration`](./httpclient) | | ✓ | | | | +| [`moduleMetadataIntegration`](./modulemetadata) | | | | | ✓ | +| [`replayIntegration`](./replay) | | | | ✓ | ✓ | +| [`replayCanvasIntegration`](./replaycanvas) | | | | ✓ | | +| [`reportingObserverIntegration`](./reportingobserver) | | ✓ | | | | + +### Node.js Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Additional Context** | +| --------------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------------------: | +| [`consoleIntegration`](./console) | ✓ | | | ✓ | +| [`contextLinesIntegration`](./contextlines) | ✓ | ✓ | | | +| [`httpIntegration`](./http) | ✓ | ✓ | ✓ | ✓ | +| [`graphqlIntegration`](./graphql) | ✓ | | ✓ | | +| [`modulesIntegration`](./modules) | ✓ | | | ✓ | +| [`mongoIntegration`](./mongo) | ✓ | | ✓ | | +| [`mongooseIntegration`](./mongoose) | ✓ | | ✓ | | +| [`mysqlIntegration`](./mysql) | ✓ | | ✓ | | +| [`mysql2Integration`](./mysql2) | ✓ | | ✓ | | +| [`nodeContextIntegration`](./nodecontext) | ✓ | | | ✓ | +| [`nativeNodeFetchIntegration`](./nodefetch) | ✓ | | ✓ | ✓ | +| [`onUncaughtExceptionIntegration`](./onuncaughtexception) | ✓ | ✓ | | | +| [`onUnhandledRejectionIntegration`](./unhandledrejection) | ✓ | ✓ | | | +| [`postgresIntegration`](./postgres) | ✓ | | ✓ | | +| [`prismaIntegration`](./prisma) | | | ✓ | | +| [`redisIntegration`](./redis) | ✓ | | ✓ | | +| [`requestDataIntegration`](./requestdata) | ✓ | | ✓ | | +| [`anrIntegration`](./anr) | | ✓ | | | +| [`localVariablesIntegration`](./localvariables) | | ✓ | | | +| [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | +| [`fsIntegration`](./fs) | | | ✓ | | +| [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.remix.mdx b/platform-includes/configuration/integrations/javascript.remix.mdx index 0c963275a014b..fc3b337f309d9 100644 --- a/platform-includes/configuration/integrations/javascript.remix.mdx +++ b/platform-includes/configuration/integrations/javascript.remix.mdx @@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r | [`anrIntegration`](./anr) | | ✓ | | | | [`localVariablesIntegration`](./localvariables) | | ✓ | | | | [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.solidstart.mdx b/platform-includes/configuration/integrations/javascript.solidstart.mdx new file mode 100644 index 0000000000000..387999c4595fb --- /dev/null +++ b/platform-includes/configuration/integrations/javascript.solidstart.mdx @@ -0,0 +1,64 @@ +The SolidStart SDK initializes the SDK in two runtimes: Browser and Node.js. +However, it's important to note that not all integrations are compatible with all of these runtimes. + +Depending on whether an integration enhances the functionality of a particular runtime, such as the `BrowserTracing` integration for the browser runtime or the `RequestData` integration for the Node.js runtime, you can only include these integrations in their respective configuration files: + +- For the browser runtime integrations, add integrations to `Sentry.init` in `entry..client.config.(js|ts)` +- For the Node.js runtime integrations, add integrations to `Sentry.init` in `instrument.server.mjs` + +### Common Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Additional Context** | +| --------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------------------: | +| [`dedupeIntegration`](./dedupe) | ✓ | ✓ | | | +| [`functionToStringIntegration`](./functiontostring) | ✓ | | | | +| [`inboundFiltersIntegration`](./inboundfilters) | ✓ | ✓ | | | +| [`linkedErrorsIntegration`](./linkederrors) | ✓ | ✓ | | | +| [`captureConsoleIntegration`](./captureconsole) | | | | ✓ | +| [`debugIntegration`](./debug) | | | | | +| [`extraErrorDataIntegration`](./extraerrordata) | | | | ✓ | +| [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | +| [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | + +### Browser Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Replay** | **Additional Context** | +| ----------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------: | :--------------------: | +| [`breadcrumbsIntegration`](./breadcrumbs) | ✓ | | | | ✓ | +| [`browserApiErrorsIntegration`](./browserapierrors) | ✓ | ✓ | | | | +| [`browserTracingIntegration`](./browsertracing) | ✓ | | ✓ | | ✓ | +| [`globalHandlersIntegration`](./globalhandlers) | ✓ | ✓ | | | | +| [`httpContextIntegration`](./httpcontext) | ✓ | | | | ✓ | +| [`browserProfilingIntegration`](./browserprofiling) | | | ✓ | | | +| [`contextLinesIntegration`](./contextlines) | | ✓ | | | | +| [`httpClientIntegration`](./httpclient) | | ✓ | | | | +| [`moduleMetadataIntegration`](./modulemetadata) | | | | | ✓ | +| [`replayIntegration`](./replay) | | | | ✓ | ✓ | +| [`replayCanvasIntegration`](./replaycanvas) | | | | ✓ | | +| [`reportingObserverIntegration`](./reportingobserver) | | ✓ | | | | + +### Node.js Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Additional Context** | +| --------------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------------------: | +| [`consoleIntegration`](./console) | ✓ | | | ✓ | +| [`contextLinesIntegration`](./contextlines) | ✓ | ✓ | | | +| [`httpIntegration`](./http) | ✓ | ✓ | ✓ | ✓ | +| [`graphqlIntegration`](./graphql) | ✓ | | ✓ | | +| [`modulesIntegration`](./modules) | ✓ | | | ✓ | +| [`mongoIntegration`](./mongo) | ✓ | | ✓ | | +| [`mongooseIntegration`](./mongoose) | ✓ | | ✓ | | +| [`mysqlIntegration`](./mysql) | ✓ | | ✓ | | +| [`mysql2Integration`](./mysql2) | ✓ | | ✓ | | +| [`nodeContextIntegration`](./nodecontext) | ✓ | | | ✓ | +| [`nativeNodeFetchIntegration`](./nodefetch) | ✓ | | ✓ | ✓ | +| [`onUncaughtExceptionIntegration`](./onuncaughtexception) | ✓ | ✓ | | | +| [`onUnhandledRejectionIntegration`](./unhandledrejection) | ✓ | ✓ | | | +| [`postgresIntegration`](./postgres) | ✓ | | ✓ | | +| [`prismaIntegration`](./prisma) | | | ✓ | | +| [`redisIntegration`](./redis) | ✓ | | ✓ | | +| [`requestDataIntegration`](./requestdata) | ✓ | | ✓ | | +| [`anrIntegration`](./anr) | | ✓ | | | +| [`localVariablesIntegration`](./localvariables) | | ✓ | | | +| [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | +| [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/integrations/javascript.sveltekit.mdx b/platform-includes/configuration/integrations/javascript.sveltekit.mdx index df04b4094c098..1f43774a212f6 100644 --- a/platform-includes/configuration/integrations/javascript.sveltekit.mdx +++ b/platform-includes/configuration/integrations/javascript.sveltekit.mdx @@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r | [`anrIntegration`](./anr) | | ✓ | | | | [`localVariablesIntegration`](./localvariables) | | ✓ | | | | [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | +| [`fsIntegration`](./fs) | | | ✓ | | | [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/configuration/module-metadata/javascript.mdx b/platform-includes/configuration/module-metadata/javascript.mdx index 18bc92c8746ec..cc48c275471bc 100644 --- a/platform-includes/configuration/module-metadata/javascript.mdx +++ b/platform-includes/configuration/module-metadata/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/offline/javascript.mdx b/platform-includes/configuration/offline/javascript.mdx index 5511772b1c609..a4bbddeced2a5 100644 --- a/platform-includes/configuration/offline/javascript.mdx +++ b/platform-includes/configuration/offline/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/reporting-observer/javascript.mdx b/platform-includes/configuration/reporting-observer/javascript.mdx index 745f538d6d56d..42a02ebaf2c4f 100644 --- a/platform-includes/configuration/reporting-observer/javascript.mdx +++ b/platform-includes/configuration/reporting-observer/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/requestdata/javascript.mdx b/platform-includes/configuration/requestdata/javascript.mdx index e37352545c332..3d2b7c3926658 100644 --- a/platform-includes/configuration/requestdata/javascript.mdx +++ b/platform-includes/configuration/requestdata/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/rewrite-frames/javascript.bun.mdx b/platform-includes/configuration/rewrite-frames/javascript.bun.mdx index cc8e795603039..ea96d3c1ba044 100644 --- a/platform-includes/configuration/rewrite-frames/javascript.bun.mdx +++ b/platform-includes/configuration/rewrite-frames/javascript.bun.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/bun"; diff --git a/platform-includes/configuration/rewrite-frames/javascript.cloudflare.mdx b/platform-includes/configuration/rewrite-frames/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..6d7da1a86beb9 --- /dev/null +++ b/platform-includes/configuration/rewrite-frames/javascript.cloudflare.mdx @@ -0,0 +1,19 @@ +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.rewriteFramesIntegration( + { + // root path that will be stripped from the current frame's filename by the default iteratee if the filename is an absolute path + root: string; + + // a custom prefix that will be used by the default iteratee (default: `app://`) + prefix: string; + + // function that takes the frame, applies a transformation, and returns it + iteratee: (frame) => frame; + } + )], +}); +``` diff --git a/platform-includes/configuration/rewrite-frames/javascript.deno.mdx b/platform-includes/configuration/rewrite-frames/javascript.deno.mdx index e961b8face7c4..cd62766b818bf 100644 --- a/platform-includes/configuration/rewrite-frames/javascript.deno.mdx +++ b/platform-includes/configuration/rewrite-frames/javascript.deno.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "https://deno.land/x/sentry/index.mjs"; diff --git a/platform-includes/configuration/rewrite-frames/javascript.mdx b/platform-includes/configuration/rewrite-frames/javascript.mdx index f164a732f6220..b23fabcac227a 100644 --- a/platform-includes/configuration/rewrite-frames/javascript.mdx +++ b/platform-includes/configuration/rewrite-frames/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/rewrite-frames/javascript.node.mdx b/platform-includes/configuration/rewrite-frames/javascript.node.mdx index d7cc8ac93be05..a174fabb3d3df 100644 --- a/platform-includes/configuration/rewrite-frames/javascript.node.mdx +++ b/platform-includes/configuration/rewrite-frames/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/configuration/rewrite-frames/react-native.mdx b/platform-includes/configuration/rewrite-frames/react-native.mdx index 8abb00d933899..556fad6b45af5 100644 --- a/platform-includes/configuration/rewrite-frames/react-native.mdx +++ b/platform-includes/configuration/rewrite-frames/react-native.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/react-native"; import { RewriteFrames as RewriteFramesIntegration } from "@sentry/integrations"; diff --git a/platform-includes/configuration/sample-rate/php.mdx b/platform-includes/configuration/sample-rate/php.mdx index 9183133cea0d6..d7aba23219305 100644 --- a/platform-includes/configuration/sample-rate/php.mdx +++ b/platform-includes/configuration/sample-rate/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/configuration/sessiontiming/javascript.bun.mdx b/platform-includes/configuration/sessiontiming/javascript.bun.mdx index 9c734574b6ac2..addb51dfd1c01 100644 --- a/platform-includes/configuration/sessiontiming/javascript.bun.mdx +++ b/platform-includes/configuration/sessiontiming/javascript.bun.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/bun"; diff --git a/platform-includes/configuration/sessiontiming/javascript.cloudflare.mdx b/platform-includes/configuration/sessiontiming/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..758f13b3a2fae --- /dev/null +++ b/platform-includes/configuration/sessiontiming/javascript.cloudflare.mdx @@ -0,0 +1,8 @@ +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.sessionTimingIntegration()], +}); +``` diff --git a/platform-includes/configuration/sessiontiming/javascript.deno.mdx b/platform-includes/configuration/sessiontiming/javascript.deno.mdx index f11532b9343da..6fd7a94f10a13 100644 --- a/platform-includes/configuration/sessiontiming/javascript.deno.mdx +++ b/platform-includes/configuration/sessiontiming/javascript.deno.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "https://deno.land/x/sentry/index.mjs"; diff --git a/platform-includes/configuration/sessiontiming/javascript.mdx b/platform-includes/configuration/sessiontiming/javascript.mdx index 94f63d87faeae..f1be3f324826c 100644 --- a/platform-includes/configuration/sessiontiming/javascript.mdx +++ b/platform-includes/configuration/sessiontiming/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/configuration/sessiontiming/javascript.node.mdx b/platform-includes/configuration/sessiontiming/javascript.node.mdx index 29b9c44e37f5a..5ac254f7398b3 100644 --- a/platform-includes/configuration/sessiontiming/javascript.node.mdx +++ b/platform-includes/configuration/sessiontiming/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/crons/setup/javascript.cloudflare.mdx b/platform-includes/crons/setup/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..c51440a988a45 --- /dev/null +++ b/platform-includes/crons/setup/javascript.cloudflare.mdx @@ -0,0 +1,11 @@ +## Job Monitoring + + + +## Check-Ins + + + +## Upserting Cron Monitors + + diff --git a/platform-includes/distributed-tracing/custom-instrumentation/javascript.mdx b/platform-includes/distributed-tracing/custom-instrumentation/javascript.mdx index f2184f33aefde..a27adc4b2cd0a 100644 --- a/platform-includes/distributed-tracing/custom-instrumentation/javascript.mdx +++ b/platform-includes/distributed-tracing/custom-instrumentation/javascript.mdx @@ -169,7 +169,7 @@ In this example, we create a new transaction that is attached to the trace speci -### Inject Tracing Information to Outgoing Requests +### Inject Tracing Information into Outgoing Requests For distributed tracing to work, the two headers that you extracted and stored in the active root span, `sentry-trace` and `baggage`, must be added to outgoing HTTP requests. @@ -205,6 +205,51 @@ In this example, tracing information is propagated to the project running at `ht The two services are now connected with your custom distributed tracing implementation. + + +### Injecting Tracing Information into HTML + +If you're server-side rendering HTML and you use a Sentry SDK in your browser application, you can connect the backend and frontend traces by injecting your server's tracing information as `` tags into the HTML that's initially served to the browser. When the frontend SDK is initialized, it will automatically pick up the tracing information from the `` tags and continue the trace. Note, that your browser SDK needs to register `browserTracingIntegration` for this to work. + +The easiest and recommended way to do this is to use the `Sentry.getTraceMetaTags()`: + +```javascript {5} {filename:index.js} +function renderHtml() { + return ` + + + ${Sentry.getTraceMetaTags()} + + + + + + `; +} +``` + +Alternatively, if you need more control over how meta tags are generated, you can use `Sentry.getTraceData()` to get only the meta tag values and generate the meta tags yourself: + +```javascript {2, 7-8} {filename:index.js} +function renderHtml() { + const metaTagValues = Sentry.getTraceData(); + + return ` + + + + + + + + + + `; +} +``` + + + ### Starting a New Trace Available since SDK version `8.5.0`. @@ -214,7 +259,7 @@ This means that spans or errors collected by the SDK during this new trace will To start a new trace that remains valid throughout the duration of a callback, use `startNewTrace`: -```javascript {2-6} +```javascript {2-9} myButton.addEventListener("click", async () => { Sentry.startNewTrace(() => { Sentry.startSpan( diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.cloudflare.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..c9216191c31e2 --- /dev/null +++ b/platform-includes/distributed-tracing/how-to-use/javascript.cloudflare.mdx @@ -0,0 +1,18 @@ +The Sentry Cloudflare SDK has out of the box support for distributed tracing if you've setup the SDK to send traces. + +### Custom Instrumentation + +If you don't want to use tracing, you can set up Custom Instrumentation for distributed tracing. + +### Disabling Distributed Tracing + +If you want to disable distributed tracing, set the `tracePropagationTargets` option to be an empty array. This will ensure no trace headers are sent. + +```javascript +Sentry.init({ + dsn: "___PUBLIC_DSN___", + + // Overwrite the defaults to ensure no trace headers are sent + tracePropagationTargets: [], +}); +``` diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx index 3b61052cb6309..1bd53fe1f439b 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx @@ -1,6 +1,5 @@ In version `8.0.0` and above of the Sentry Node SDK, distributed tracing will work out of the box. - ```javascript Sentry.init({ diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx new file mode 100644 index 0000000000000..396bdc6ec280d --- /dev/null +++ b/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx @@ -0,0 +1,9 @@ +If you're using the current version of our Nuxt SDK, distributed tracing will work out of the box for the client and server runtimes. To get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues, you should define `tracePropagationTargets` for client-side. + +```javascript {filename:sentry.client.config.(js|ts)} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.browserTracingIntegration()], + tracePropagationTargets: ["https://myproject.org", /^\/api\//], +}); +``` diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx new file mode 100644 index 0000000000000..eba37ae021768 --- /dev/null +++ b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx @@ -0,0 +1,37 @@ +To set up distributed tracing, use Sentry's middleware to inject tracing information into meta tags. + +Create or modify the `middleware.ts` file and import and add `sentryBeforeResponseMiddleware` + +```typescript {filename: middleware.ts} +import { sentryBeforeResponseMiddleware } from '@sentry/solidstart/middleware'; +import { createMiddleware } from '@solidjs/start/middleware'; + +export default createMiddleware({ + onBeforeResponse: [ + sentryBeforeResponseMiddleware(), + // Add your other middleware handlers after `sentryBeforeResponseMiddleware` + ], +}); +```` + +If you didn't use a middleware before, don't forget to specify it in `app.config.ts` + +```typescript {filename: app.config.ts} +import { defineConfig } from '@solidjs/start/config'; + +export default defineConfig({ + // ... + middleware: './src/middleware.ts', +}); +``` + +To get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues, you should define `tracePropagationTargets` for client-side. + +```javascript +// hooks.client.js +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.solidRouterBrowserTracingIntegration()], + tracePropagationTargets: ["https://myproject.org", /^\/api\//], +}); +``` diff --git a/platform-includes/distributed-tracing/limiting-traces/flutter.mdx b/platform-includes/distributed-tracing/limiting-traces/flutter.mdx index ea5501f83323b..cf6b9c020d962 100644 --- a/platform-includes/distributed-tracing/limiting-traces/flutter.mdx +++ b/platform-includes/distributed-tracing/limiting-traces/flutter.mdx @@ -1,5 +1,3 @@ - - ```dart await SentryFlutter.init((options) { options.dsn = '___PUBLIC_DSN___'; diff --git a/platform-includes/distributed-tracing/limiting-traces/javascript.mdx b/platform-includes/distributed-tracing/limiting-traces/javascript.mdx index 42070022db851..b0a61b75fddcb 100644 --- a/platform-includes/distributed-tracing/limiting-traces/javascript.mdx +++ b/platform-includes/distributed-tracing/limiting-traces/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/distributed-tracing/limiting-traces/javascript.node.mdx b/platform-includes/distributed-tracing/limiting-traces/javascript.node.mdx index 03a4468787e58..26fdcd42348e8 100644 --- a/platform-includes/distributed-tracing/limiting-traces/javascript.node.mdx +++ b/platform-includes/distributed-tracing/limiting-traces/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/distributed-tracing/limiting-traces/python.mdx b/platform-includes/distributed-tracing/limiting-traces/python.mdx index a487b35613145..63e189d10cd0e 100644 --- a/platform-includes/distributed-tracing/limiting-traces/python.mdx +++ b/platform-includes/distributed-tracing/limiting-traces/python.mdx @@ -1,5 +1,3 @@ - - ```python import sentry_sdk diff --git a/platform-includes/distributed-tracing/limiting-traces/ruby.mdx b/platform-includes/distributed-tracing/limiting-traces/ruby.mdx index 50955cbe628db..1641398f5e97f 100644 --- a/platform-includes/distributed-tracing/limiting-traces/ruby.mdx +++ b/platform-includes/distributed-tracing/limiting-traces/ruby.mdx @@ -1,5 +1,3 @@ - - ```ruby Sentry.init do |config| config.dsn = '___PUBLIC_DSN___' diff --git a/platform-includes/enriching-events/add-attachment/javascript.mdx b/platform-includes/enriching-events/add-attachment/javascript.mdx index e421f2b60fc8b..7b6c3cf4ab8a0 100644 --- a/platform-includes/enriching-events/add-attachment/javascript.mdx +++ b/platform-includes/enriching-events/add-attachment/javascript.mdx @@ -33,7 +33,6 @@ It's possible to add, remove, or modify attachments before an event is sent by w the hook or a global event processor. - ```javascript Sentry.init({ diff --git a/platform-includes/enriching-events/add-attachment/ruby.mdx b/platform-includes/enriching-events/add-attachment/ruby.mdx new file mode 100644 index 0000000000000..a63336c9b4ad0 --- /dev/null +++ b/platform-includes/enriching-events/add-attachment/ruby.mdx @@ -0,0 +1,33 @@ +```ruby +Sentry.add_attachment(path: '/path/to/attachment/file.txt') +Sentry.add_attachment(filename: 'payload.json', bytes: '{"value": 42}')) +``` + +These attachments live on the current `Scope` and will be sent with all events. +You can also add them directly on the scope as follows: + +```ruby +Sentry.configure_scope do |scope| + scope.add_attachment(path: '/path/to/attachment/file.txt') + scope.add_attachment(filename: 'payload.json', bytes: '{"value": 42}')) +end +``` + + +An attachment has the following fields: + +`path` + +The path to the attachment file. The `filename` will be inferred if not explicitly provided when using this mode. + +`bytes` + +The content of the attachment as bytes. + +`filename` + +The filename is required if using `bytes` and will be displayed in [sentry.io](https://sentry.io). + +`content_type` + +The type of content stored in this attachment. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used. diff --git a/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx b/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx index 59f6ae19c8206..d9e120946dcf4 100644 --- a/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx +++ b/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx @@ -1,5 +1,3 @@ - - ```csharp var builder = MauiApp.CreateBuilder() .UseMauiApp() diff --git a/platform-includes/enriching-events/attach-screenshots/dotnet.xamarin.mdx b/platform-includes/enriching-events/attach-screenshots/dotnet.xamarin.mdx index 24d81cfda6853..14395e80f60d7 100644 --- a/platform-includes/enriching-events/attach-screenshots/dotnet.xamarin.mdx +++ b/platform-includes/enriching-events/attach-screenshots/dotnet.xamarin.mdx @@ -1,5 +1,3 @@ - - ```csharp SentryXamarin.Init(options => { diff --git a/platform-includes/enriching-events/attach-screenshots/flutter.mdx b/platform-includes/enriching-events/attach-screenshots/flutter.mdx index 7b93104106298..df8e38da76ceb 100644 --- a/platform-includes/enriching-events/attach-screenshots/flutter.mdx +++ b/platform-includes/enriching-events/attach-screenshots/flutter.mdx @@ -1,5 +1,3 @@ - - ```dart import 'package:flutter/widgets.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; @@ -48,4 +46,3 @@ Future main() async { ); } ``` - diff --git a/platform-includes/enriching-events/attach-screenshots/javascript.electron.mdx b/platform-includes/enriching-events/attach-screenshots/javascript.electron.mdx index 131cea08a0658..c33b463df8971 100644 --- a/platform-includes/enriching-events/attach-screenshots/javascript.electron.mdx +++ b/platform-includes/enriching-events/attach-screenshots/javascript.electron.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/electron/main"; diff --git a/platform-includes/enriching-events/attach-screenshots/react-native.mdx b/platform-includes/enriching-events/attach-screenshots/react-native.mdx index a7e9ce6ca1337..fa89b768c6a38 100644 --- a/platform-includes/enriching-events/attach-screenshots/react-native.mdx +++ b/platform-includes/enriching-events/attach-screenshots/react-native.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/react-native"; diff --git a/platform-includes/enriching-events/attach-viewhierarchy/apple.mdx b/platform-includes/enriching-events/attach-viewhierarchy/apple.mdx index b54552ed51e67..308c004975de2 100644 --- a/platform-includes/enriching-events/attach-viewhierarchy/apple.mdx +++ b/platform-includes/enriching-events/attach-viewhierarchy/apple.mdx @@ -13,3 +13,38 @@ SentrySDK.start { options in options.attachViewHierarchy = YES; }]; ``` + +### Customize View Hierarchy Capturing + + + +Requires Cocoa SDK version `8.33.0` or higher. + + + + +The `beforeCaptureViewHierarchy` also allows you to customize the behavior based on event data, so you can decide when to capture a view hierarchy and when not to. The callback doesn't work for crash events. + +```swift {tabTitle:Swift} +import Sentry + +SentrySDK.start { options in + options.dsn = "___PUBLIC_DSN___" + options.beforeCaptureViewHierarchy = { event in + // Return false to not capture a view hierarchy for the event. + return false + } +} +``` + +```objc {tabTitle:Objective-C} +@import Sentry; + +[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { + options.dsn = @"___PUBLIC_DSN___"; + options.beforeCaptureViewHierarchy = ^BOOL(SentryEvent * _Nonnull event) { + // Return NO to not capture a view hierarchy for the event. + return NO; + }; +}]; +``` diff --git a/platform-includes/enriching-events/attach-viewhierarchy/flutter.mdx b/platform-includes/enriching-events/attach-viewhierarchy/flutter.mdx index ba39da8b90c0c..260f182eb14bb 100644 --- a/platform-includes/enriching-events/attach-viewhierarchy/flutter.mdx +++ b/platform-includes/enriching-events/attach-viewhierarchy/flutter.mdx @@ -1,5 +1,3 @@ - - ```dart import 'package:flutter/widgets.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; diff --git a/platform-includes/enriching-events/attach-viewhierarchy/kotlin-multiplatform.mdx b/platform-includes/enriching-events/attach-viewhierarchy/kotlin-multiplatform.mdx index d3b1b3af36716..0b33a1c91cf71 100644 --- a/platform-includes/enriching-events/attach-viewhierarchy/kotlin-multiplatform.mdx +++ b/platform-includes/enriching-events/attach-viewhierarchy/kotlin-multiplatform.mdx @@ -4,7 +4,6 @@ Currently only available on iOS and Android. - ```kotlin import io.sentry.kotlin.multiplatform.sentry diff --git a/platform-includes/enriching-events/attach-viewhierarchy/react-native.mdx b/platform-includes/enriching-events/attach-viewhierarchy/react-native.mdx index 30cb4d2252afc..735f8ae46dc80 100644 --- a/platform-includes/enriching-events/attach-viewhierarchy/react-native.mdx +++ b/platform-includes/enriching-events/attach-viewhierarchy/react-native.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/react-native"; diff --git a/platform-includes/enriching-events/breadcrumbs/before-breadcrumb/php.mdx b/platform-includes/enriching-events/breadcrumbs/before-breadcrumb/php.mdx index 8c090a4ba8b6c..ec8d7ab0759cf 100644 --- a/platform-includes/enriching-events/breadcrumbs/before-breadcrumb/php.mdx +++ b/platform-includes/enriching-events/breadcrumbs/before-breadcrumb/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/enriching-events/import/javascript.cloudflare.mdx b/platform-includes/enriching-events/import/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..28acd8ed075bd --- /dev/null +++ b/platform-includes/enriching-events/import/javascript.cloudflare.mdx @@ -0,0 +1,3 @@ +```javascript +import * as Sentry from "@sentry/cloudflare"; +``` diff --git a/platform-includes/enriching-events/import/javascript.nuxt.mdx b/platform-includes/enriching-events/import/javascript.nuxt.mdx new file mode 100644 index 0000000000000..30ef3ccbe7450 --- /dev/null +++ b/platform-includes/enriching-events/import/javascript.nuxt.mdx @@ -0,0 +1,3 @@ +```javascript +import * as Sentry from "@sentry/nuxt"; +``` diff --git a/platform-includes/enriching-events/import/javascript.solidstart.mdx b/platform-includes/enriching-events/import/javascript.solidstart.mdx new file mode 100644 index 0000000000000..a99d29af0bbed --- /dev/null +++ b/platform-includes/enriching-events/import/javascript.solidstart.mdx @@ -0,0 +1,3 @@ +```javascript +import * as Sentry from "@sentry/solidstart"; +``` diff --git a/platform-includes/enriching-events/scopes/configure-scope/python.mdx b/platform-includes/enriching-events/scopes/configure-scope/python.mdx index a87a78d575ea8..79eb6cf512f39 100644 --- a/platform-includes/enriching-events/scopes/configure-scope/python.mdx +++ b/platform-includes/enriching-events/scopes/configure-scope/python.mdx @@ -1,8 +1,7 @@ ```python import sentry_sdk -from sentry_sdk.scope import Scope -scope = Scope.get_current_scope() +scope = sentry_sdk.get_current_scope() scope.set_tag("my-tag", "my value") scope.user = {"id": 42, "email": "john.doe@example.com"} diff --git a/platform-includes/enriching-events/scopes/configure-scope/react-native.mdx b/platform-includes/enriching-events/scopes/configure-scope/react-native.mdx index 59794f7e59e83..a9a4e3d158028 100644 --- a/platform-includes/enriching-events/scopes/configure-scope/react-native.mdx +++ b/platform-includes/enriching-events/scopes/configure-scope/react-native.mdx @@ -12,7 +12,6 @@ Sentry.configureScope(function (scope) { If you want to set context data in the JS layer and then receive that context data when a native (C/C++) crash happens, you need to synchronize the JS `Scope` with the native `Scope`. This feature was introduced in version `2.0.0` of the React-Native SDK and requires an opt-in: - ```javascript {filename:App.js} import * as Sentry from "@sentry/react-native"; diff --git a/platform-includes/enriching-events/set-tag/dotnet.nlog.mdx b/platform-includes/enriching-events/set-tag/dotnet.nlog.mdx index 8e29f4149a44a..09acba1e9a7ac 100644 --- a/platform-includes/enriching-events/set-tag/dotnet.nlog.mdx +++ b/platform-includes/enriching-events/set-tag/dotnet.nlog.mdx @@ -4,7 +4,6 @@ For more information on how to dynamically set event tags via `NLog.config`, see - ```xml {tabTitle:NLog.config} diff --git a/platform-includes/enriching-events/set-user/dotnet.nlog.mdx b/platform-includes/enriching-events/set-user/dotnet.nlog.mdx index 7589ff1028091..38fadff9ab0fe 100644 --- a/platform-includes/enriching-events/set-user/dotnet.nlog.mdx +++ b/platform-includes/enriching-events/set-user/dotnet.nlog.mdx @@ -5,7 +5,6 @@ - ```xml {tabTitle:NLog.config} diff --git a/platform-includes/getting-started-config/apple.mdx b/platform-includes/getting-started-config/apple.mdx index 20f6c505b9c03..0ff00452ca3e2 100644 --- a/platform-includes/getting-started-config/apple.mdx +++ b/platform-includes/getting-started-config/apple.mdx @@ -1,6 +1,5 @@ We recommend initializing the SDK on the main thread as soon as possible, such as in your AppDelegate `application:didFinishLaunchingWithOptions` method: - ```swift {tabTitle:Swift} import Sentry // Make sure you import Sentry @@ -40,7 +39,6 @@ func application(_ application: UIApplication, When using SwiftUI and your app doesn't implement an app delegate, initialize the SDK within the [App conformer's initializer](): - ```swift import Sentry diff --git a/platform-includes/getting-started-config/dotnet.aspnetcore.mdx b/platform-includes/getting-started-config/dotnet.aspnetcore.mdx index 9b21dac73351a..0cc970cf4a90c 100644 --- a/platform-includes/getting-started-config/dotnet.aspnetcore.mdx +++ b/platform-includes/getting-started-config/dotnet.aspnetcore.mdx @@ -2,7 +2,6 @@ Add Sentry to `Program.cs` through the `WebHostBuilder`: ASP.NET Core 2.x: - ```csharp public static IWebHost BuildWebHost(string[] args) => @@ -20,7 +19,6 @@ let BuildWebHost args = ASP.NET Core 3.0: - ```csharp public static IHostBuilder CreateHostBuilder(string[] args) => diff --git a/platform-includes/getting-started-config/dotnet.mdx b/platform-includes/getting-started-config/dotnet.mdx index 3e947961daad3..278a0942e3caf 100644 --- a/platform-includes/getting-started-config/dotnet.mdx +++ b/platform-includes/getting-started-config/dotnet.mdx @@ -1,6 +1,5 @@ For example, initialize with `SentrySdk.Init` in your `Program.cs` file: - ```csharp using Sentry; diff --git a/platform-includes/getting-started-config/dotnet.xamarin.mdx b/platform-includes/getting-started-config/dotnet.xamarin.mdx index 744606729c53b..85abdcfbdaf32 100644 --- a/platform-includes/getting-started-config/dotnet.xamarin.mdx +++ b/platform-includes/getting-started-config/dotnet.xamarin.mdx @@ -1,7 +1,6 @@ You should initialize the SDK as early as possible, for an example, the start of OnCreate on MainActivity for Android, and, the top of FinishedLaunching on AppDelegate for iOS). - ```csharp using Sentry; diff --git a/platform-includes/getting-started-config/elixir.mdx b/platform-includes/getting-started-config/elixir.mdx index ede63a02aa0d6..2cda0307d545b 100644 --- a/platform-includes/getting-started-config/elixir.mdx +++ b/platform-includes/getting-started-config/elixir.mdx @@ -1,6 +1,5 @@ Sentry has a range of configuration options, but most applications will have a configuration that looks like the following: - ```elixir {filename:config/config.exs} config :sentry, diff --git a/platform-includes/getting-started-config/go.mdx b/platform-includes/getting-started-config/go.mdx index f43b776650460..b9f85f5987957 100644 --- a/platform-includes/getting-started-config/go.mdx +++ b/platform-includes/getting-started-config/go.mdx @@ -1,5 +1,3 @@ - - ```go package main diff --git a/platform-includes/getting-started-config/java.jul.mdx b/platform-includes/getting-started-config/java.jul.mdx index f740776cd0518..1f956cdbdd096 100644 --- a/platform-includes/getting-started-config/java.jul.mdx +++ b/platform-includes/getting-started-config/java.jul.mdx @@ -29,7 +29,6 @@ java -Djava.util.logging.config.file=/path/to/app.properties MyClass Sentry reads the DSN from the system property `sentry.dsn`, environment variable `SENTRY_DSN` or the `dsn` property in `sentry.properties` file. [See the configuration page](/platforms/java/configuration/) for more details on external configuration. - ```properties {tabTitle:sentry.properties} dsn=___PUBLIC_DSN___ diff --git a/platform-includes/getting-started-config/java.log4j2.mdx b/platform-includes/getting-started-config/java.log4j2.mdx index 53caefef653a6..396370971bb92 100644 --- a/platform-includes/getting-started-config/java.log4j2.mdx +++ b/platform-includes/getting-started-config/java.log4j2.mdx @@ -6,7 +6,6 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se - ```xml @@ -33,7 +32,6 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se Note that **you need to configure your DSN** (client key) only if you wish to initialize the SDK through the log4j2 integration. If you're planning to use `Sentry.init` to provide configuration, such as by using the `beforeSend` callback, you **should not** provide the DSN in both `Sentry.init` and the appender configuration; just leave it out of the appender configuration in this case. - ```xml ```xml diff --git a/platform-includes/getting-started-config/java.logback.mdx b/platform-includes/getting-started-config/java.logback.mdx index 111beb3dfee06..3b2ea25cf2531 100644 --- a/platform-includes/getting-started-config/java.logback.mdx +++ b/platform-includes/getting-started-config/java.logback.mdx @@ -6,7 +6,6 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se - ```xml @@ -38,7 +37,6 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se Note that **you need to configure your DSN** (client key). - ```xml @@ -66,7 +64,6 @@ Setting `minimumEventLevel` or `minimumBreadcrumbLevel` in `logback.xml` only af Breadcrumbs are kept in memory (by default the last 100 records) and are sent with events. For example, by default, if you log 100 entries with `logger.info` or `logger.warn`, no event is sent to Sentry. If you then log with `logger.error`, an event is sent to Sentry which includes those 100 `info` or `warn` messages. For this to work, `SentryAppender` needs to receive **all** log entries to decide what to keep as breadcrumb or sent as event. Set the `SentryAppender` log level configuration to a value lower than what is set for the `minimumBreadcrumbLevel` and `minimumEventLevel` so that `SentryAppender` receives these log messages. - ```xml diff --git a/platform-includes/getting-started-config/java.mdx b/platform-includes/getting-started-config/java.mdx index de098c38e0073..eed3df972814f 100644 --- a/platform-includes/getting-started-config/java.mdx +++ b/platform-includes/getting-started-config/java.mdx @@ -1,5 +1,3 @@ - - ```java {tabTitle: Java} {"onboardingOptions": {"performance": "5-9"}} import io.sentry.Sentry; diff --git a/platform-includes/getting-started-config/java.servlet.mdx b/platform-includes/getting-started-config/java.servlet.mdx index a7e19cf80cfbc..08df06899dc2e 100644 --- a/platform-includes/getting-started-config/java.servlet.mdx +++ b/platform-includes/getting-started-config/java.servlet.mdx @@ -1,6 +1,5 @@ The following example configures a `SentryInitializer` servlet container initializer that initializes Sentry on application startup. - ```java package sentry.sample; @@ -40,7 +39,6 @@ class SentryInitializer : ServletContainerInitializer { Create a file in `src/main/resources/META-INF/services` named `javax.servlet.ServletContainerInitializer`, with a full name of your custom `SentryInitializer` class as a content: - ```properties sentry.sample.SentryInitializer diff --git a/platform-includes/getting-started-config/java.spring-boot.mdx b/platform-includes/getting-started-config/java.spring-boot.mdx index 6def7cf4ab72c..29cc382c6ca0a 100644 --- a/platform-includes/getting-started-config/java.spring-boot.mdx +++ b/platform-includes/getting-started-config/java.spring-boot.mdx @@ -2,7 +2,6 @@ Sentry's Spring Boot integration auto-configures `sentry.in-app-packages` proper Provide a `sentry.dsn` property using either `application.properties` or `application.yml`: - ```properties {filename:application.properties} {"onboardingOptions": {"performance": "2-6"}} sentry.dsn=___PUBLIC_DSN___ diff --git a/platform-includes/getting-started-config/java.spring.mdx b/platform-includes/getting-started-config/java.spring.mdx index e8f95851adc37..589b21fe2c9e3 100644 --- a/platform-includes/getting-started-config/java.spring.mdx +++ b/platform-includes/getting-started-config/java.spring.mdx @@ -1,6 +1,5 @@ The `sentry-spring` and `sentry-spring-jakarta` libraries provide an `@EnableSentry` annotation that registers all required Spring beans. `@EnableSentry` can be placed on any class annotated with [@Configuration](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/Configuration.html) including the main entry class in Spring Boot applications annotated with [@SpringBootApplication](https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/SpringBootApplication.html). - ```java {tabTitle:Java (Spring 5)} import io.sentry.spring.EnableSentry; @@ -46,7 +45,6 @@ Once this integration is configured you can _also_ use Sentry’s static API, [a By default, only unhandled exceptions are sent to Sentry. This behavior can be tuned through configuring the `exceptionResolverOrder` property. For example, setting it to `Ordered#HIGHEST_PRECEDENCE` ensures exceptions that have been handled by exception resolvers with higher order are sent to Sentry - including ones handled by `@ExceptionHandler` annotated methods. - ```java {tabTitle:Java (Spring 5)} import io.sentry.spring.EnableSentry; diff --git a/platform-includes/getting-started-config/javascript.angular.mdx b/platform-includes/getting-started-config/javascript.angular.mdx index 353f9666b33ab..4b27bff6e3584 100644 --- a/platform-includes/getting-started-config/javascript.angular.mdx +++ b/platform-includes/getting-started-config/javascript.angular.mdx @@ -1,6 +1,5 @@ Once this is done, Sentry's Angular SDK captures all unhandled exceptions and transactions. - ```typescript {filename: main.ts} {3, 6-30} {"onboardingOptions": {"performance": "9-12, 17-24", "session-replay": "13-15, 25-29"}} import { enableProdMode } from "@angular/core"; diff --git a/platform-includes/getting-started-config/javascript.astro.mdx b/platform-includes/getting-started-config/javascript.astro.mdx index a29437fc18589..ccec3814bd01d 100644 --- a/platform-includes/getting-started-config/javascript.astro.mdx +++ b/platform-includes/getting-started-config/javascript.astro.mdx @@ -1,6 +1,5 @@ Get started by adding your DSN to your Astro config file (`astro.config.mjs`): - ```javascript {filename:astro.config.mjs} import { defineConfig } from "astro/config"; diff --git a/platform-includes/getting-started-config/javascript.aws-lambda.mdx b/platform-includes/getting-started-config/javascript.aws-lambda.mdx index 192d5a1bdde19..68c323ca6c748 100644 --- a/platform-includes/getting-started-config/javascript.aws-lambda.mdx +++ b/platform-includes/getting-started-config/javascript.aws-lambda.mdx @@ -1,6 +1,3 @@ - - - ```javascript {tabTitle:async} {"onboardingOptions": {"performance": "9-13", "profiling": "2, 6-8, 14-16"}} const Sentry = require("@sentry/aws-serverless"); const { nodeProfilingIntegration } = require("@sentry/profiling-node"); diff --git a/platform-includes/getting-started-config/javascript.azure-functions.mdx b/platform-includes/getting-started-config/javascript.azure-functions.mdx index 8215a4801cb99..439aabe930f0b 100644 --- a/platform-includes/getting-started-config/javascript.azure-functions.mdx +++ b/platform-includes/getting-started-config/javascript.azure-functions.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:async} {"onboardingOptions": {"performance": "9-13", "profiling": "2, 6-8, 14-16"}} const Sentry = require("@sentry/node"); const { nodeProfilingIntegration } = require("@sentry/profiling-node"); diff --git a/platform-includes/getting-started-config/javascript.bun.mdx b/platform-includes/getting-started-config/javascript.bun.mdx index 42161cfb94493..5a1a32b4aeb3e 100644 --- a/platform-includes/getting-started-config/javascript.bun.mdx +++ b/platform-includes/getting-started-config/javascript.bun.mdx @@ -1,5 +1,3 @@ - - Sentry should be initialized as early in your app as possible. It is essential that you call `Sentry.init` before you require any other modules in your application—otherwise, auto-instrumentation of these modules will _not_ work. Once this is done, Sentry's Bun SDK captures unhandled exceptions as well as tracing data for your application. @@ -12,7 +10,7 @@ import * as Sentry from "@sentry/bun"; // Ensure to call this before importing any other modules! Sentry.init({ dsn: "___PUBLIC_DSN___", - + // Add Performance Monitoring by setting tracesSampleRate // Set tracesSampleRate to 1.0 to capture 100% of transactions // We recommend adjusting this value in production diff --git a/platform-includes/getting-started-config/javascript.capacitor.mdx b/platform-includes/getting-started-config/javascript.capacitor.mdx index 71d5378f4a27c..39cd6dab04015 100644 --- a/platform-includes/getting-started-config/javascript.capacitor.mdx +++ b/platform-includes/getting-started-config/javascript.capacitor.mdx @@ -1,6 +1,5 @@ Then forward the `init` method from the sibling Sentry SDK for the framework you use, such as Angular in this example: - ```typescript {tabTitle: Angular} {filename: app.module.ts} {"onboardingOptions": {"performance": "13-16, 21-28, 46-55", "session-replay": "17-19, 29-33"}} import * as Sentry from "@sentry/capacitor"; diff --git a/platform-includes/getting-started-config/javascript.cloudflare.mdx b/platform-includes/getting-started-config/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..ee7974fdff688 --- /dev/null +++ b/platform-includes/getting-started-config/javascript.cloudflare.mdx @@ -0,0 +1,56 @@ +To use the SDK, you'll need to set either the `nodejs_compat` or `nodejs_als` compatibility flags in your `wrangler.toml`. This is because the SDK +needs access to the `AsyncLocalStorage` API to work correctly. + +```toml {filename:wrangler.toml} +compatibility_flags = ["nodejs_compat"] +# compatibility_flags = ["nodejs_als"] +``` + +Then you can install the SDK and add it to your project: + +You can either setup up the SDK for [Cloudflare Pages](#setup-cloudflare-pages) or +[Cloudflare Workers](#setup-cloudflare-workers). + +### Setup (Cloudflare Pages) + +To use this SDK, add the `sentryPagesPlugin` as +[middleware to your Cloudflare Pages application](https://developers.cloudflare.com/pages/functions/middleware/). + +We recommend adding a `functions/_middleware.js` for the middleware setup so that Sentry is initialized for your entire +app. + +```javascript {filename:functions/_middleware.js} +import * as Sentry from "@sentry/cloudflare"; + +export const onRequest = [ + // Make sure Sentry is the first middleware + Sentry.sentryPagesPlugin((context) => ({ + dsn: "___PUBLIC_DSN___", + // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing. + tracesSampleRate: 1.0, + })), + // Add more middlewares here +]; +``` + +### Setup (Cloudflare Workers) + +To use this SDK, wrap your handler with the `withSentry` function. This will initialize the SDK and hook into the +environment. Note that you can turn off almost all side effects using the respective options. + +```javascript +import * as Sentry from '@sentry/cloudflare'; + +export default withSentry( + env => ({ + dsn: "___PUBLIC_DSN___", + // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing. + tracesSampleRate: 1.0, + }), + { + async fetch(request, env, ctx) { + return new Response('Hello World!'); + }, + } satisfies ExportedHandler, +); +``` diff --git a/platform-includes/getting-started-config/javascript.cordova.mdx b/platform-includes/getting-started-config/javascript.cordova.mdx index 95dfd46e63e0e..7c088d9c0eec9 100644 --- a/platform-includes/getting-started-config/javascript.cordova.mdx +++ b/platform-includes/getting-started-config/javascript.cordova.mdx @@ -1,6 +1,5 @@ You should `init` the SDK in the `deviceReady` function, to make sure the native integrations runs. - ```javascript onDeviceReady: function() { diff --git a/platform-includes/getting-started-config/javascript.deno.mdx b/platform-includes/getting-started-config/javascript.deno.mdx index 9f64662e84495..10931d60b185a 100644 --- a/platform-includes/getting-started-config/javascript.deno.mdx +++ b/platform-includes/getting-started-config/javascript.deno.mdx @@ -1,3 +1,8 @@ + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + ```javascript {tabTitle: Deno} {"onboardingOptions": {"performance": "5-9" }} diff --git a/platform-includes/getting-started-config/javascript.electron.mdx b/platform-includes/getting-started-config/javascript.electron.mdx index e044e605e9493..6c2de34c83065 100644 --- a/platform-includes/getting-started-config/javascript.electron.mdx +++ b/platform-includes/getting-started-config/javascript.electron.mdx @@ -1,6 +1,5 @@ You should `init` the SDK in the `main` process and every `renderer` process you spawn. - In the Electron `main` process: diff --git a/platform-includes/getting-started-config/javascript.ember.mdx b/platform-includes/getting-started-config/javascript.ember.mdx index 9e2735071ad38..1051bf69184b0 100644 --- a/platform-includes/getting-started-config/javascript.ember.mdx +++ b/platform-includes/getting-started-config/javascript.ember.mdx @@ -1,6 +1,5 @@ This snippet includes automatic instrumentation to monitor the performance of your application, which registers and configures the Tracing integration, including custom [Ember instrumentation](./configuration/ember-options/). - ```javascript {"onboardingOptions": {"performance": "11-15", "session-replay": "10, 16-20"}} import Application from "@ember/application"; diff --git a/platform-includes/getting-started-config/javascript.gcp-functions.mdx b/platform-includes/getting-started-config/javascript.gcp-functions.mdx index b251dd9825fbd..c35abf4395264 100644 --- a/platform-includes/getting-started-config/javascript.gcp-functions.mdx +++ b/platform-includes/getting-started-config/javascript.gcp-functions.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:Http functions} {"onboardingOptions": {"performance": "9-13", "profiling": "2, 6-8, 14-16"}} const Sentry = require("@sentry/google-cloud-serverless"); const { nodeProfilingIntegration } = require("@sentry/profiling-node"); diff --git a/platform-includes/getting-started-config/javascript.mdx b/platform-includes/getting-started-config/javascript.mdx index 964665e6c5c8a..2435056639ef9 100644 --- a/platform-includes/getting-started-config/javascript.mdx +++ b/platform-includes/getting-started-config/javascript.mdx @@ -1,8 +1,7 @@ -Once this is done, Sentry's JavaScript SDK captures all unhandled exceptions, transactions, and Session Replays, based on the sample rates set. +Once this is done, Sentry's JavaScript SDK will capture all unhandled exceptions, transactions, and Session Replays, based on the sample rates set. -Note that configuration differs slightly depending on how you installed the Sentry SDK. Make sure to follow the instructions in the correct tab, depending on if you installed the Sentry SDK via NPM, using the Loader Script, or via CDN. +Note, that configuration differs slightly depending on how you installed the Sentry SDK. Make sure to follow the instructions in the correct tab, depending on if you installed the Sentry SDK via NPM, using the Loader Script, or via CDN. - ```javascript {tabTitle:npm} import * as Sentry from "@sentry/browser"; diff --git a/platform-includes/getting-started-config/javascript.node.mdx b/platform-includes/getting-started-config/javascript.node.mdx index 1b26f4eab79b7..359e5087e7f6b 100644 --- a/platform-includes/getting-started-config/javascript.node.mdx +++ b/platform-includes/getting-started-config/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle:CommonJS} {filename: instrument.js} {"onboardingOptions": {"performance": "11-14", "profiling": "2, 7-10, 15-18"}} const Sentry = require("@sentry/node"); const { nodeProfilingIntegration } = require("@sentry/profiling-node"); diff --git a/platform-includes/getting-started-config/javascript.nuxt.mdx b/platform-includes/getting-started-config/javascript.nuxt.mdx new file mode 100644 index 0000000000000..e9dc200e6be20 --- /dev/null +++ b/platform-includes/getting-started-config/javascript.nuxt.mdx @@ -0,0 +1,63 @@ +To set up the Sentry SDK, register the Sentry Nuxt module and initialize the SDK for client and server. At build time, the Sentry Nuxt Module looks for the following two files: + +- Client-Side: `sentry.client.config.(js|ts)` in the root containing `Sentry.init` +- Server-Side: `instrument.server.mjs` in the `public` directory containing `Sentry.init` + +In these files, you can specify the full range of Sentry SDK options. + + +### Nuxt Module Setup + +Add the Sentry Nuxt Module to your `nuxt.config.ts` file: + +```javascript {filename:nuxt.config.ts} +export default defineNuxtConfig({ + modules: ["@sentry/nuxt/module"] +}); +``` + +Adding this module enables the Sentry SDK in your Nuxt application. The Sentry Nuxt Module will then automatically look for the Sentry configuration files and initialize the SDK accordingly. + + +### Client-side Setup + +Add a `sentry.client.config.(js|ts)` file to the root of your project (this is probably the same level as the `package.json`). In this file, import and initialize Sentry, specifying any SDK options for the client: + + +```javascript {filename:sentry.client.config.(js|ts)} +import * as Sentry from '@sentry/nuxt'; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + + // We recommend adjusting this value in production, or using tracesSampler + // for finer control + tracesSampleRate: 1.0 +}); +``` + +### Server-side Setup + +1. Add an `instrument.server.mjs` file to your `public` folder. In this file, import and initialize Sentry, specifying any SDK options for the server: + + +```javascript {filename:public/instrument.server.mjs} +import * as Sentry from '@sentry/nuxt'; + +Sentry.init({ + dsn: "___PUBLIC_DSN___" +}); +``` + +2. Add an `--import` flag to the `NODE_OPTIONS` environment variable wherever you run your application's production build output. +For local previews, update your `nuxt preview` script in the `package.json` (see below). +Also, ensure this environment variable is set in your deployment environment, such as on Netlify or Vercel. + +```json {filename:package.json} +{ + "scripts": { + "preview": "NODE_OPTIONS='--import ./public/instrument.server.mjs' nuxt preview", + "start": "node --import .output/public/instrument.server.mjs .output/server/index.mjs" + } +} +``` diff --git a/platform-includes/getting-started-config/javascript.react.mdx b/platform-includes/getting-started-config/javascript.react.mdx index 86d2bc8315f40..c966b41617154 100644 --- a/platform-includes/getting-started-config/javascript.react.mdx +++ b/platform-includes/getting-started-config/javascript.react.mdx @@ -1,6 +1,5 @@ -It is important to initialize Sentry as early as possible in your application. We recommend putting the Sentry initialization code into its own file and including that file as the first import in your application entry point: +Sentry should be initialized as early as possible in your application. We recommend putting the Sentry initialization code into its own file and including that file as the first import in your application entry point as shown in the example below: - ```javascript {filename:instrument.js} {"onboardingOptions": {"performance": "3-8, 13-21, 24-30", "session-replay": "22, 31-35"}} import { useEffect } from "react"; @@ -41,7 +40,7 @@ Sentry.init({ }); ``` -Include the Sentry initialization file as first import statement: +Include the Sentry initialization file as the first import statement: ```javascript // Sentry initialization should be imported first! @@ -54,11 +53,11 @@ const root = createRoot(container); root.render(); ``` -Once this is done, all unhandled exceptions are automatically captured by Sentry. +Once this is done, all unhandled exceptions will be automatically captured by Sentry. ### React 19 Error Reporting -Starting with React 19, the `createRoot` and `hydrateRoot` methods from `react-dom` expose error hooks that are used to capture errors automatically. If you want to customize how errors are handled in specific error hooks, you can use the `Sentry.reactErrorHandler` function. +Starting with React 19, the `createRoot` and `hydrateRoot` methods from `react-dom` will expose error hooks that are used to capture errors automatically. To customize how errors are handled in specific error hooks, use the `Sentry.reactErrorHandler` function. ```javascript import { createRoot } from "react-dom/client"; @@ -77,7 +76,7 @@ const root = createRoot(container, { root.render(); ``` -These hooks apply to all React components mounted to the container passed onto `createRoot`/`hydrateRoot`. If you want more finely grained control over error handling, we recommend adding an `ErrorBoundary` component to your application. +These hooks apply to all React components that are mounted to the container which is passed onto `createRoot`/`hydrateRoot`. For more precise control over error handling, we recommend adding an `ErrorBoundary` component to your application. ### Add Error Boundary diff --git a/platform-includes/getting-started-config/javascript.solid.mdx b/platform-includes/getting-started-config/javascript.solid.mdx index a8df18d06a313..df77363e038d1 100644 --- a/platform-includes/getting-started-config/javascript.solid.mdx +++ b/platform-includes/getting-started-config/javascript.solid.mdx @@ -4,7 +4,6 @@ To use the SDK, initialize it in your Solid entry point before bootstrapping you We currently support Solid 1.8.4 and up. - ```javascript {filename: index.jsx} {"onboardingOptions": {"performance": "2, 12, 15-22", "session-replay": "13, 23-27"}} import * as Sentry from "@sentry/solid"; diff --git a/platform-includes/getting-started-config/javascript.solidstart.mdx b/platform-includes/getting-started-config/javascript.solidstart.mdx new file mode 100644 index 0000000000000..dc2f797109457 --- /dev/null +++ b/platform-includes/getting-started-config/javascript.solidstart.mdx @@ -0,0 +1,108 @@ +Initialize the Sentry SDK in your `src/entry-client.tsx` file. + +If you're using Solid Router, add the `solidRouterBrowserTracingIntegration` to collect meaningful performance data about the health of your page loads and associated requests. + + +```jsx {filename:src/entry-client.tsx} +import * as Sentry from '@sentry/solidstart'; +import { solidRouterBrowserTracingIntegration } from '@sentry/solidstart/solidrouter'; +import { mount, StartClient } from '@solidjs/start/client'; + +Sentry.init({ + dsn: '__PUBLIC_DSN__', + integrations: [solidRouterBrowserTracingIntegration()], + tracesSampleRate: 1.0, // Capture 100% of the transactions +}); + +mount(() => , document.getElementById('app')); +``` + + + + Depending on the configuration of your SolidStart project, the file structure may differ from the code listed on this page. + For example, for JavaScript projects files end in `.js` and `.jsx` while we use TypeScript snippets here ending in `.ts` and `.tsx`. + + + +### Server-side Setup + +Create an instrument file `instrument.server.mjs`, initialize the Sentry SDK and deploy it alongside your application. +For example by placing it in the `public` folder. + + + + Placing `instrument.server.mjs` inside the `public` folder makes it accessible to the outside world. + Consider blocking requests to this file or finding a more appropriate location which your backend can access. + + + + +```javascript {filename:public/instrument.server.mjs} +import * as Sentry from '@sentry/solidstart'; + +Sentry.init({ + dsn: '__PUBLIC_DSN__', + tracesSampleRate: 1.0, // Capture 100% of the transactions +}); +``` + +### Instrumentation + +The Sentry SDK provides [middleware lifecycle](https://docs.solidjs.com/solid-start/advanced/middleware) handlers to enhance data collected by Sentry on the server side by enabling distributed tracing between the client and server. + +Complete the setup by adding `sentryBeforeResponseMiddleware` to your `src/middleware.ts` file. If you don't have a `src/middleware.ts` file yet, create one: + +```typescript {filename:src/middleware.ts} +import { sentryBeforeResponseMiddleware } from '@sentry/solidstart/middleware'; +import { createMiddleware } from '@solidjs/start/middleware'; + +export default createMiddleware({ + onBeforeResponse: [ + sentryBeforeResponseMiddleware(), + // Add your other middleware handlers after `sentryBeforeResponseMiddleware` + ], +}); +``` + +And specify `src/middleware.ts` in `app.config.ts`: + +```typescript {filename:app.config.ts} +import { defineConfig } from '@solidjs/start/config'; + +export default defineConfig({ + // ... + middleware: './src/middleware.ts', +}); +``` + +If you previously added the `solidRouterBrowserTracingIntegration` integration to `Sentry.init` in `src/entry-client.tsx`, wrap your Solid Router with `withSentryRouterRouting`. +This creates a higher order component, which will enable Sentry to collect navigation spans. + +```tsx {filename:app.tsx} +import { Router } from "@solidjs/router"; +import { FileRoutes } from "@solidjs/start/router"; +import { withSentryRouterRouting } from '@sentry/solidstart/solidrouter' + +const SentryRouter = withSentryRouterRouting(Router) + +export default function App() { + return ( + + + + ); +} +``` + +### Run your application + +Add an `--import` flag to the `NODE_OPTIONS` environment variable wherever you run your application to import `public/instrument.server.mjs`. + +For example, update your scripts in `package.json`. + +```json {filename:package.json} +{ + "scripts": { + "start": "NODE_OPTIONS='--import ./public/instrument.server.mjs' vinxi start", + } +} diff --git a/platform-includes/getting-started-config/javascript.svelte.mdx b/platform-includes/getting-started-config/javascript.svelte.mdx index 469e1ebce3381..622d617b277df 100644 --- a/platform-includes/getting-started-config/javascript.svelte.mdx +++ b/platform-includes/getting-started-config/javascript.svelte.mdx @@ -1,6 +1,5 @@ To use the SDK, initialize it in your Svelte entry point before bootstrapping your app. In a typical Svelte project, that is your `main.js` or `main.ts` file. - ```javascript {filename: main.js} {"onboardingOptions": {"performance": "10, 13-20", "session-replay": "11, 21-25"}} import "./app.css"; diff --git a/platform-includes/getting-started-config/javascript.vue.mdx b/platform-includes/getting-started-config/javascript.vue.mdx index 140665f5b0ed8..4c438f7eeb945 100644 --- a/platform-includes/getting-started-config/javascript.vue.mdx +++ b/platform-includes/getting-started-config/javascript.vue.mdx @@ -2,7 +2,6 @@ To initialize Sentry in your Vue application, add the following code snippet to ### Vue 3 - ```javascript {filename:main.js} {"onboardingOptions": {"performance": "16, 19-26", "session-replay": "17, 27-31"}} import { createApp } from "vue"; @@ -44,7 +43,6 @@ app.mount("#app"); ### Vue 2 - ```javascript {filename:main.js} {"onboardingOptions": {"performance": "15, 18-25", "session-replay": "16, 26-30"}} import Vue from "vue"; @@ -96,3 +94,9 @@ The SDK accepts a few Vue-specific `Sentry.init` configuration options: - `attachProps` (defaults to `true`) - Includes all Vue components' props with the events. - `logErrors` (defaults to `true`) - Decides whether SDK should call Vue's original `logError` function as well. - `trackComponents` (defaults to `false`) - Track your app's components. Learn more about [component tracking](./features/component-tracking) and all its options. + + +### Late-Defined Vue Apps + +If the Vue application is not defined from the start, you can add error monitoring for Vue-specific errors later on. +To manually add the integration for late-defined Vue applications check out the docs for the Vue Integration. diff --git a/platform-includes/getting-started-config/kotlin-multiplatform.mdx b/platform-includes/getting-started-config/kotlin-multiplatform.mdx index ca9ad0a2d0152..fb4faffb689e8 100644 --- a/platform-includes/getting-started-config/kotlin-multiplatform.mdx +++ b/platform-includes/getting-started-config/kotlin-multiplatform.mdx @@ -1,5 +1,3 @@ - - ```kotlin import io.sentry.kotlin.multiplatform.Sentry diff --git a/platform-includes/getting-started-config/native.mdx b/platform-includes/getting-started-config/native.mdx index b693d5abf4d3a..94773c2e8e665 100644 --- a/platform-includes/getting-started-config/native.mdx +++ b/platform-includes/getting-started-config/native.mdx @@ -1,5 +1,3 @@ - - ```c #include diff --git a/platform-includes/getting-started-config/native.qt.mdx b/platform-includes/getting-started-config/native.qt.mdx index 871b38a527cf9..171256d96bec7 100644 --- a/platform-includes/getting-started-config/native.qt.mdx +++ b/platform-includes/getting-started-config/native.qt.mdx @@ -1,5 +1,3 @@ - - ```cpp #include #include diff --git a/platform-includes/getting-started-config/php.mdx b/platform-includes/getting-started-config/php.mdx index d5de6900b091d..20c6538d573f1 100644 --- a/platform-includes/getting-started-config/php.mdx +++ b/platform-includes/getting-started-config/php.mdx @@ -1,6 +1,5 @@ To capture all errors, even the one during the startup of your application, you should initialize the Sentry PHP SDK as soon as possible. - ```php \Sentry\init([ diff --git a/platform-includes/getting-started-config/powershell.mdx b/platform-includes/getting-started-config/powershell.mdx index b722fc0f79985..5af09201f9678 100644 --- a/platform-includes/getting-started-config/powershell.mdx +++ b/platform-includes/getting-started-config/powershell.mdx @@ -1,6 +1,5 @@ Once this is done, Sentry's PowerShell SDK can be used to capture errors. - ```powershell # You may need to import the module if you've just installed it. diff --git a/platform-includes/getting-started-config/ruby.mdx b/platform-includes/getting-started-config/ruby.mdx index 6b77f9ed1aea4..4f88459582746 100644 --- a/platform-includes/getting-started-config/ruby.mdx +++ b/platform-includes/getting-started-config/ruby.mdx @@ -1,5 +1,3 @@ - - ```ruby {"onboardingOptions": {"performance": "8-11", "profiling": "12-15"}} require 'sentry-ruby' diff --git a/platform-includes/getting-started-config/ruby.rack.mdx b/platform-includes/getting-started-config/ruby.rack.mdx index 9d338e83c588c..730034a03162b 100644 --- a/platform-includes/getting-started-config/ruby.rack.mdx +++ b/platform-includes/getting-started-config/ruby.rack.mdx @@ -2,7 +2,6 @@ Add `use Sentry::Rack::CaptureExceptions` to your `config.ru` or other rackup file: - ```ruby {filename:config.ru} {"onboardingOptions": {"performance": "8-11", "profiling": "12-15"}} require 'sentry-ruby' diff --git a/platform-includes/getting-started-config/ruby.rails.mdx b/platform-includes/getting-started-config/ruby.rails.mdx index d8a4976900ebc..243c27bc4ebf8 100644 --- a/platform-includes/getting-started-config/ruby.rails.mdx +++ b/platform-includes/getting-started-config/ruby.rails.mdx @@ -1,6 +1,5 @@ Initialize the SDK within your `config/initializers/sentry.rb`: - ```ruby {filename:config/initializers/sentry.rb} {"onboardingOptions": {"performance": "6-9", "profiling": "10-13"}} Sentry.init do |config| diff --git a/platform-includes/getting-started-config/rust.mdx b/platform-includes/getting-started-config/rust.mdx index d3c8edd76b556..e941731e3432d 100644 --- a/platform-includes/getting-started-config/rust.mdx +++ b/platform-includes/getting-started-config/rust.mdx @@ -1,6 +1,5 @@ `sentry.init()` will return you a guard that when freed, will prevent process exit until all events have been sent (within a timeout): - ```rust let _guard = sentry::init(("___PUBLIC_DSN___", sentry::ClientOptions { diff --git a/platform-includes/getting-started-config/unity.mdx b/platform-includes/getting-started-config/unity.mdx index ec3fb5ca24d54..8d7a9f678a2cc 100644 --- a/platform-includes/getting-started-config/unity.mdx +++ b/platform-includes/getting-started-config/unity.mdx @@ -1,6 +1,5 @@ The minimum configuration required is the [DSN](/product/sentry-basics/dsn-explainer/) to your project. - ``` ___PUBLIC_DSN___ diff --git a/platform-includes/getting-started-config/unreal.mdx b/platform-includes/getting-started-config/unreal.mdx index c7d4b31da2814..570807ec98d49 100644 --- a/platform-includes/getting-started-config/unreal.mdx +++ b/platform-includes/getting-started-config/unreal.mdx @@ -1,6 +1,5 @@ The minimum configuration required is the [DSN](/product/sentry-basics/dsn-explainer/) of your project: - ``` ___PUBLIC_DSN___ diff --git a/platform-includes/getting-started-install/javascript.capacitor.mdx b/platform-includes/getting-started-install/javascript.capacitor.mdx index 0a9bd0ef5f11f..2d5a92aa3c6c1 100644 --- a/platform-includes/getting-started-install/javascript.capacitor.mdx +++ b/platform-includes/getting-started-install/javascript.capacitor.mdx @@ -44,49 +44,20 @@ yarn add @sentry/capacitor @sentry/browser pnpm add @sentry/capacitor @sentry/browser ``` -### Capacitor 2 - Android Specifics +### Angular Version Compatibility - +In its current beta version, the Sentry Capacitor SDK only supports Angular 14 and newer. -This step is not needed if you are using Capacitor 3 +If you're using an older version of Angular, you also need to use an older version of the SDK. See the table below for compatibility guidance: - +| Angular version | Recommended Sentry SDK | +| --------------- | ------------------------------------------------------------------------------------------------------ | +| 14 and newer | `@sentry/capacitor` `@sentry/angular` | +| 12 or 13 | `@sentry/capacitor^0` `@sentry/angular-ivy@^7` * | +| 10 or 11 | `@sentry/capacitor^0` `@sentry/angular@^7` * | -Add the plugin declaration to your `MainActivity.java` file +\* These versions of the SDK are no longer maintained or tested. Version 0 might still receive bug fixes but we don't guarantee support. -```java {filename:MainActivity.java} -import android.os.Bundle; -import com.getcapacitor.BridgeActivity; -import com.getcapacitor.Plugin; -import io.sentry.capacitor.SentryCapacitor; -import java.util.ArrayList; +### React and Vue Version Compatibility -public class MainActivity extends BridgeActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - // Initializes the Bridge - this.init(savedInstanceState, new ArrayList>() {{ - add(SentryCapacitor.class); - }}); - } -} -``` - -```kotlin -import android.os.Bundle -import com.getcapacitor.BridgeActivity -import com.getcapacitor.Plugin -import io.sentry.capacitor.SentryCapacitor - -class MainActivity : BridgeActivity() { - fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - // Initializes the Bridge - this.init( - savedInstanceState, - listOf>(SentryCapacitor::class.java) - ) - } -} -``` +Both Frameworks are fully compatible with the current and beta versions of Sentry Capacitor. diff --git a/platform-includes/getting-started-install/javascript.cloudflare.mdx b/platform-includes/getting-started-install/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..d5cf6776c8550 --- /dev/null +++ b/platform-includes/getting-started-install/javascript.cloudflare.mdx @@ -0,0 +1,11 @@ +```bash {tabTitle:npm} +npm install @sentry/cloudflare --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/cloudflare +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/cloudflare +``` diff --git a/platform-includes/getting-started-install/javascript.mdx b/platform-includes/getting-started-install/javascript.mdx index 237e5471082c9..3334157abccef 100644 --- a/platform-includes/getting-started-install/javascript.mdx +++ b/platform-includes/getting-started-install/javascript.mdx @@ -1,6 +1,5 @@ In order to get started using the Sentry JavaScript SDK, add the following code to the top of your application, before all other scripts: - ```html + + +``` + + + diff --git a/platform-includes/getting-started-verify/javascript.solidstart.mdx b/platform-includes/getting-started-verify/javascript.solidstart.mdx new file mode 100644 index 0000000000000..3665854c85795 --- /dev/null +++ b/platform-includes/getting-started-verify/javascript.solidstart.mdx @@ -0,0 +1,12 @@ +```javascript + +``` + +This snippet adds a button that throws an error in a Solid component. diff --git a/platform-includes/getting-started-verify/rust.mdx b/platform-includes/getting-started-verify/rust.mdx index 8242374bd472d..9922cc0c690b1 100644 --- a/platform-includes/getting-started-verify/rust.mdx +++ b/platform-includes/getting-started-verify/rust.mdx @@ -1,6 +1,5 @@ The quickest way to verify Sentry in your Rust application is to cause a panic: - ```rust fn main() { diff --git a/platform-includes/performance/always-inherit-sampling-decision/php.mdx b/platform-includes/performance/always-inherit-sampling-decision/php.mdx index b866c1102edaf..7877990cb9e3b 100644 --- a/platform-includes/performance/always-inherit-sampling-decision/php.mdx +++ b/platform-includes/performance/always-inherit-sampling-decision/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/performance/configure-sample-rate/android.mdx b/platform-includes/performance/configure-sample-rate/android.mdx index d6cac5a9f89ab..6554d90f9cae4 100644 --- a/platform-includes/performance/configure-sample-rate/android.mdx +++ b/platform-includes/performance/configure-sample-rate/android.mdx @@ -8,7 +8,6 @@ Or alternatively: Or, if you are manually instrumenting Sentry: - ```java {tabTitle:Java} import io.sentry.android.core.SentryAndroid; diff --git a/platform-includes/performance/configure-sample-rate/apple.mdx b/platform-includes/performance/configure-sample-rate/apple.mdx index e7f51d60422c2..0b95263c8129e 100644 --- a/platform-includes/performance/configure-sample-rate/apple.mdx +++ b/platform-includes/performance/configure-sample-rate/apple.mdx @@ -1,5 +1,3 @@ - - ```swift {diff, tabTitle:Swift} import Sentry diff --git a/platform-includes/performance/configure-sample-rate/dart.mdx b/platform-includes/performance/configure-sample-rate/dart.mdx index 0c60f5144a298..583bd9daacddf 100644 --- a/platform-includes/performance/configure-sample-rate/dart.mdx +++ b/platform-includes/performance/configure-sample-rate/dart.mdx @@ -1,5 +1,3 @@ - - ```dart {diff} import 'package:sentry/sentry.dart'; diff --git a/platform-includes/performance/configure-sample-rate/flutter.mdx b/platform-includes/performance/configure-sample-rate/flutter.mdx index 2f4477740d15a..3d8eb55278897 100644 --- a/platform-includes/performance/configure-sample-rate/flutter.mdx +++ b/platform-includes/performance/configure-sample-rate/flutter.mdx @@ -1,5 +1,3 @@ - - ```dart {diff} import 'package:flutter/widgets.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; diff --git a/platform-includes/performance/configure-sample-rate/java.mdx b/platform-includes/performance/configure-sample-rate/java.mdx index e216d117fb177..ad1cf7af6b115 100644 --- a/platform-includes/performance/configure-sample-rate/java.mdx +++ b/platform-includes/performance/configure-sample-rate/java.mdx @@ -4,7 +4,6 @@ If you are using either our [Spring](/platforms/java/guides/spring/performance/) - ```java {diff, tabTitle:Java} import io.sentry.Sentry; diff --git a/platform-includes/performance/configure-sample-rate/javascript.astro.mdx b/platform-includes/performance/configure-sample-rate/javascript.astro.mdx index 198d2e8d750ea..4919f327af6f8 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.astro.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.astro.mdx @@ -1,6 +1,5 @@ Either set `tracesSampleRate` in your `astro.config.mjs` file or in `sentry.(client|server).init.js`: - ```javascript {tabTitle:Integration Config}{filename:astro.config.mjs} import { defineConfig } from "astro/config"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.bun.mdx b/platform-includes/performance/configure-sample-rate/javascript.bun.mdx index 0db6e26ba1966..e8728cd955913 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.bun.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.bun.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/bun"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.cloudflare.mdx b/platform-includes/performance/configure-sample-rate/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..081fe43b3766b --- /dev/null +++ b/platform-includes/performance/configure-sample-rate/javascript.cloudflare.mdx @@ -0,0 +1,38 @@ +## Cloudflare Pages + +```javascript {filename:functions/_middleware.js} +import * as Sentry from "@sentry/cloudflare"; + +export const onRequest = [ + Sentry.sentryPagesPlugin((context) => ({ + dsn: "___PUBLIC_DSN___", + // To set a uniform sample rate + tracesSampleRate: 0.2 + + // Alternatively, to control sampling dynamically + tracesSampler: samplingContext => { ... } + })), +]; +``` + +## Cloudflare Workers + +```javascript {filename:functions/_middleware.js} +import * as Sentry from '@sentry/cloudflare'; + +export default withSentry( + env => ({ + dsn: "___PUBLIC_DSN___", + // To set a uniform sample rate + tracesSampleRate: 0.2 + + // Alternatively, to control sampling dynamically + tracesSampler: samplingContext => { ... } + }), + { + async fetch(request, env, ctx) { + return new Response('Hello World!'); + }, + } satisfies ExportedHandler, +); +``` diff --git a/platform-includes/performance/configure-sample-rate/javascript.cordova.mdx b/platform-includes/performance/configure-sample-rate/javascript.cordova.mdx index fabc9ac0e8a32..30c3aeb21316d 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.cordova.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.cordova.mdx @@ -1,5 +1,3 @@ - - ```javascript onDeviceReady: function() { var Sentry = cordova.require("sentry-cordova.Sentry"); diff --git a/platform-includes/performance/configure-sample-rate/javascript.deno.mdx b/platform-includes/performance/configure-sample-rate/javascript.deno.mdx index 4041c93f2d465..d0e3b8bb83582 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.deno.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.deno.mdx @@ -1,5 +1,3 @@ - - ```javascript // Import from the Deno registry import * as Sentry from "https://deno.land/x/sentry/index.mjs"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.electron.mdx b/platform-includes/performance/configure-sample-rate/javascript.electron.mdx index 2e6331c5355ec..5124b48bab487 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.electron.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.electron.mdx @@ -1,5 +1,3 @@ - - ```javascript // BrowserTracing should only be configured in Electron renderer processes import * as Sentry from "@sentry/electron/renderer"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.ember.mdx b/platform-includes/performance/configure-sample-rate/javascript.ember.mdx index aab6437b830cc..3d80374cd7f41 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.ember.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.ember.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/ember"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.mdx b/platform-includes/performance/configure-sample-rate/javascript.mdx index bbaab5244d6fc..3a0be96047669 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.mdx @@ -1,5 +1,3 @@ - - ```javascript // If you're using one of our framework SDK packages, like `@sentry/react`, // substitute its name for `@sentry/browser` here diff --git a/platform-includes/performance/configure-sample-rate/javascript.nextjs.mdx b/platform-includes/performance/configure-sample-rate/javascript.nextjs.mdx index f470b241b5b9d..3f83e9a01489c 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.nextjs.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.nextjs.mdx @@ -1,6 +1,5 @@ Set `tracesSampleRate` in your config files, `sentry.server.config.js`, `sentry.client.config.js`, and `sentry.edge.config.js`: - ```javascript import * as Sentry from "@sentry/nextjs"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.node.mdx b/platform-includes/performance/configure-sample-rate/javascript.node.mdx index 38b957ef5c8ac..e484f31c90848 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.node.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.node.mdx @@ -1,5 +1,3 @@ - - ```javascript {tabTitle: JavaScript} import * as Sentry from "@sentry/node"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.nuxt.mdx b/platform-includes/performance/configure-sample-rate/javascript.nuxt.mdx new file mode 100644 index 0000000000000..8b7928ec1b066 --- /dev/null +++ b/platform-includes/performance/configure-sample-rate/javascript.nuxt.mdx @@ -0,0 +1,14 @@ +Set `tracesSampleRate` in your config files, `sentry.client.config.(js|ts)` and `instrument.server.mjs`: + + +```javascript +import * as Sentry from "@sentry/nuxt"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + + // We recommend adjusting this value in production, or using `tracesSampler` + // for finer control + tracesSampleRate: 1.0, +}); +``` diff --git a/platform-includes/performance/configure-sample-rate/javascript.react.mdx b/platform-includes/performance/configure-sample-rate/javascript.react.mdx index 61b5a1045b093..5fb9c370452c4 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.react.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.react.mdx @@ -1,5 +1,3 @@ - - ```javascript import { createBrowserRouter } from "react-router-dom"; import * as Sentry from "@sentry/react"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.remix.mdx b/platform-includes/performance/configure-sample-rate/javascript.remix.mdx index eb8c7b7eebb56..91547ff2a29d7 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.remix.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.remix.mdx @@ -1,5 +1,3 @@ - - ### Client-Side Tracing Sentry's client-side tracing captures `pageload` and `navigation` transactions when configured correctly. This is useful for understanding the performance of your application from the user's perspective. diff --git a/platform-includes/performance/configure-sample-rate/javascript.sveltekit.mdx b/platform-includes/performance/configure-sample-rate/javascript.sveltekit.mdx index ceeb79210fe6f..a93280983820e 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.sveltekit.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.sveltekit.mdx @@ -1,6 +1,5 @@ In both, `hooks.client.js` and `hooks.server.js`, set: - ```javascript import * as Sentry from "@sentry/sveltekit"; diff --git a/platform-includes/performance/configure-sample-rate/javascript.vue.mdx b/platform-includes/performance/configure-sample-rate/javascript.vue.mdx index efbd30efada2b..4257fd9145f61 100644 --- a/platform-includes/performance/configure-sample-rate/javascript.vue.mdx +++ b/platform-includes/performance/configure-sample-rate/javascript.vue.mdx @@ -1,5 +1,3 @@ - - ```javascript import Vue from "vue"; import * as Sentry from "@sentry/vue"; diff --git a/platform-includes/performance/configure-sample-rate/php.mdx b/platform-includes/performance/configure-sample-rate/php.mdx index ebcf3be733224..6362be3d4d968 100644 --- a/platform-includes/performance/configure-sample-rate/php.mdx +++ b/platform-includes/performance/configure-sample-rate/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/performance/configure-sample-rate/react-native.mdx b/platform-includes/performance/configure-sample-rate/react-native.mdx index 0b7ebd99b4020..04e4b06308e01 100644 --- a/platform-includes/performance/configure-sample-rate/react-native.mdx +++ b/platform-includes/performance/configure-sample-rate/react-native.mdx @@ -1,5 +1,3 @@ - - ```javascript import * as Sentry from "@sentry/react-native"; diff --git a/platform-includes/performance/connect-errors-spans/apple.mdx b/platform-includes/performance/connect-errors-spans/apple.mdx index 61984c775917f..0816a2dccd175 100644 --- a/platform-includes/performance/connect-errors-spans/apple.mdx +++ b/platform-includes/performance/connect-errors-spans/apple.mdx @@ -17,7 +17,7 @@ do { ``` ```objc {tabTitle:Objective-C} -#import +@import Sentry; id transaction = [SentrySDK startTransactionWithName:@"Transaction Name" operation:@"operation" bindToScope:YES]; NSError * error; diff --git a/platform-includes/performance/custom-performance-metrics/python.mdx b/platform-includes/performance/custom-performance-metrics/python.mdx index a00a5c5b18500..a0a0065c4a103 100644 --- a/platform-includes/performance/custom-performance-metrics/python.mdx +++ b/platform-includes/performance/custom-performance-metrics/python.mdx @@ -1,6 +1,5 @@ Adding custom measurements is supported in Sentry's Python SDK version `1.16.0` and above. - ```python sentry_sdk.init( @@ -27,7 +26,6 @@ The feature was marked experimental between versions `1.5.12` and `1.16.0`. To enable the capturing of custom measurements before `1.16.0`, you'll need to enable the `custom_measurements` experiment option and fetch the transaction manually. - ```python sentry_sdk.init( diff --git a/platform-includes/performance/custom-sampling-context/apple.mdx b/platform-includes/performance/custom-sampling-context/apple.mdx index 615b2aa201cb6..4c95437c11bca 100644 --- a/platform-includes/performance/custom-sampling-context/apple.mdx +++ b/platform-includes/performance/custom-sampling-context/apple.mdx @@ -19,7 +19,7 @@ transaction.context.spanDescription = "search results" ``` ```objc {tabTitle:Objective-C} -#import +@import Sentry; // The following data will take part in the sampling decision NSDictionary *samplingContext = @{ diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.angular.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.angular.mdx index 491db0ca608a7..f41fd69b20bbb 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.angular.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.angular.mdx @@ -2,7 +2,6 @@ To enable tracing, include the `BrowserTracing` integration in your SDK configur After configuration, you will see both `pageload` and `navigation` transactions in the Sentry UI. - ```javascript import * as Sentry from "@sentry/angular"; diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx index 15e6cf692f597..2731a1a13057b 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx @@ -1,17 +1 @@ -To enable tracing, include the `Tracing` integration in your SDK configuration options. - - - -```javascript -import * as Sentry from "@sentry/bun"; - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - - integrations: [], - - // We recommend adjusting this value in production, or using tracesSampler - // for finer control - tracesSampleRate: 1.0, -}); -``` +To enable tracing, set either a `tracesSampleRate` or a `tracesSampler` in your SDK configuration options, as described in Set Up Performance. diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.cloudflare.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..2731a1a13057b --- /dev/null +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.cloudflare.mdx @@ -0,0 +1 @@ +To enable tracing, set either a `tracesSampleRate` or a `tracesSampler` in your SDK configuration options, as described in Set Up Performance. diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.electron.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.electron.mdx index 9f5751428ba22..a18306dd70a84 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.electron.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.electron.mdx @@ -2,7 +2,6 @@ To enable tracing, include the `BrowserTracing` integration in your SDK configur After configuration, you will see both `pageload` and `navigation` transactions in the Sentry UI. - ```javascript // BrowserTracing should only be configured in Electron renderer processes diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.ember.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.ember.mdx index f65094e9588c0..714749d31a3bb 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.ember.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.ember.mdx @@ -2,7 +2,6 @@ The Ember add-on automatically adds the tracing integration for you with additio After configuration, you will see both `pageload` and `navigation` transactions in sentry.io. - ```javascript import * as Sentry from "@sentry/ember"; diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.mdx index 05f4c33b9652e..2920411c1a50a 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.mdx @@ -2,7 +2,6 @@ To enable tracing, include the `BrowserTracing` integration in your SDK configur After configuration, you will see both `pageload` and `navigation` transactions in the Sentry UI. - ```javascript // If you're using one of our framework SDK packages, like `@sentry/react`, @@ -20,4 +19,4 @@ Sentry.init({ }); ``` - \ No newline at end of file + diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.nuxt.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.nuxt.mdx new file mode 100644 index 0000000000000..2731a1a13057b --- /dev/null +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.nuxt.mdx @@ -0,0 +1 @@ +To enable tracing, set either a `tracesSampleRate` or a `tracesSampler` in your SDK configuration options, as described in Set Up Performance. diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.react.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.react.mdx index d60031cfb7abf..34d78dde98919 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.react.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.react.mdx @@ -2,7 +2,6 @@ To enable tracing, include the `BrowserTracing` integration in your SDK configur To use `react-router` integration, import and set a custom routing instrumentation using a custom history. Make sure you use a `Router` component combined with `createBrowserHistory` (or equivalent). - ```javascript import { Router } from "react-router-dom"; @@ -33,4 +32,4 @@ Sentry.init({ Now you should be generating `pageload`/`navigation` transactions from the `BrowserTracing` integration, using Sentry's [`react-router` instrumentation](/platforms/javascript/guides/react/configuration/integrations/react-router/). - \ No newline at end of file + diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.remix.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.remix.mdx index 3780b7b77ea0c..ea92d22752514 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.remix.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.remix.mdx @@ -2,7 +2,6 @@ To enable tracing, include the `BrowserTracing` integration in your SDK configur To use `react-router` integration, import and set a custom routing instrumentation using a custom history. Make sure you use a `Router` component combined with `createBrowserHistory` (or equivalent). - ```javascript import { useLocation, useMatches } from "@remix-run/react"; diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.vue.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.vue.mdx index c13c6ec3fcee1..bd055fe094349 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.vue.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.vue.mdx @@ -2,7 +2,6 @@ To enable tracing, include the `BrowserTracing` integration in your SDK configur After configuration, you'll see both `pageload` and `navigation` transactions in the Sentry UI. - ```javascript import * as Sentry from "@sentry/vue"; diff --git a/platform-includes/performance/enable-tracing/javascript.cloudflare.mdx b/platform-includes/performance/enable-tracing/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..604458dce031a --- /dev/null +++ b/platform-includes/performance/enable-tracing/javascript.cloudflare.mdx @@ -0,0 +1 @@ +Tracing is enabled by default in the Sentry Cloudflare SDK. diff --git a/platform-includes/performance/opentelemetry-setup/go.mdx b/platform-includes/performance/opentelemetry-setup/go.mdx index 00e206105ee67..c2830e48eecc4 100644 --- a/platform-includes/performance/opentelemetry-setup/go.mdx +++ b/platform-includes/performance/opentelemetry-setup/go.mdx @@ -1,6 +1,5 @@ You need to register the Sentry-provided SpanProcessor and Propagator as shown below: - ```go import ( diff --git a/platform-includes/performance/opentelemetry-setup/javascript.node.mdx b/platform-includes/performance/opentelemetry-setup/javascript.node.mdx index 464294a270e47..da9be266fa617 100644 --- a/platform-includes/performance/opentelemetry-setup/javascript.node.mdx +++ b/platform-includes/performance/opentelemetry-setup/javascript.node.mdx @@ -1,6 +1,5 @@ There are a few steps necessary in order to ensure that your OpenTelemetry setup is fully synced with your Sentry SDK. The following code snippet walks through the needed steps. - ```javascript // Sentry dependencies diff --git a/platform-includes/performance/opentelemetry-setup/python.mdx b/platform-includes/performance/opentelemetry-setup/python.mdx index e31e59e20507b..1f326d606a3c2 100644 --- a/platform-includes/performance/opentelemetry-setup/python.mdx +++ b/platform-includes/performance/opentelemetry-setup/python.mdx @@ -1,6 +1,5 @@ Initialize Sentry for tracing and set the `instrumenter` to `otel`: - ```python import sentry_sdk diff --git a/platform-includes/performance/opentelemetry-setup/ruby.mdx b/platform-includes/performance/opentelemetry-setup/ruby.mdx index 49982d5453c8b..b8e1b3fb7b55c 100644 --- a/platform-includes/performance/opentelemetry-setup/ruby.mdx +++ b/platform-includes/performance/opentelemetry-setup/ruby.mdx @@ -1,6 +1,5 @@ Initialize Sentry for tracing and set the `instrumenter` to `:otel`: - ```ruby {filename:config/initializers/sentry.rb} Sentry.init do |config| diff --git a/platform-includes/performance/opentelemetry-setup/with-java-agent/with-auto-init/java.mdx b/platform-includes/performance/opentelemetry-setup/with-java-agent/with-auto-init/java.mdx index 2f248095f9574..28425548adbb6 100644 --- a/platform-includes/performance/opentelemetry-setup/with-java-agent/with-auto-init/java.mdx +++ b/platform-includes/performance/opentelemetry-setup/with-java-agent/with-auto-init/java.mdx @@ -1,6 +1,5 @@ This `java` command shows how to run your application using `sentry-opentelemetry-agent`: - ```bash SENTRY_PROPERTIES_FILE=sentry.properties java -javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -jar your-application.jar diff --git a/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.mdx b/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.mdx index c43ec4451bd81..c0c0df2bac2b8 100644 --- a/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.mdx +++ b/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.mdx @@ -1,6 +1,5 @@ If you're not using the auto initialization provided by `sentry-opentelemetry-agent` (`SENTRY_AUTO_INIT=false`), you have to set the `instrumenter` option to `otel`. This disables all Sentry instrumentation and uses the chosen OpenTelemetry tracers for creating spans instead. To ensure errors are properly linked to transactions that were created by the OpenTelemetry integration, add the `OpenTelemetryLinkErrorEventProcessor`: - ```java {tabTitle: Java} import io.sentry.Instrumenter; diff --git a/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.spring-boot.mdx b/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.spring-boot.mdx index 5986c1fa59ef4..94ac00f3f0b68 100644 --- a/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.spring-boot.mdx +++ b/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.spring-boot.mdx @@ -1,7 +1,6 @@ If you're not using the auto initialization provided by `sentry-opentelemetry-agent` (`SENTRY_AUTO_INIT=false`), you have to set the `instrumenter` option to `otel`. This disables all Sentry instrumentation and uses the chosen OpenTelemetry tracers for creating spans instead: - ```properties {filename:application.properties} sentry.dsn=___PUBLIC_DSN___ diff --git a/platform-includes/performance/opentelemetry-setup/without-java-agent/java.mdx b/platform-includes/performance/opentelemetry-setup/without-java-agent/java.mdx index 67bfd3eee48f2..6b2874c6a1aba 100644 --- a/platform-includes/performance/opentelemetry-setup/without-java-agent/java.mdx +++ b/platform-includes/performance/opentelemetry-setup/without-java-agent/java.mdx @@ -47,7 +47,6 @@ You have to set the `instrumenter` option to `otel`. This disables all Sentry in To ensure errors are properly linked to transactions that were created by the OpenTelemetry integration, add the `OpenTelemetryLinkErrorEventProcessor`: - ```java {tabTitle: Java} import io.sentry.Instrumenter; diff --git a/platform-includes/performance/opentelemetry-setup/without-java-agent/java.spring-boot.mdx b/platform-includes/performance/opentelemetry-setup/without-java-agent/java.spring-boot.mdx index 9e54907f257cd..b1f48756e5590 100644 --- a/platform-includes/performance/opentelemetry-setup/without-java-agent/java.spring-boot.mdx +++ b/platform-includes/performance/opentelemetry-setup/without-java-agent/java.spring-boot.mdx @@ -45,7 +45,6 @@ val openTelemetry = OpenTelemetrySdk.builder() You have to set the `instrumenter` option to `otel`. This disables all Sentry instrumentation and uses the chosen OpenTelemetry tracers for creating spans instead. - ```properties {filename:application.properties} sentry.dsn=___PUBLIC_DSN___ diff --git a/platform-includes/performance/tracePropagationTargets-example/javascript.ember.mdx b/platform-includes/performance/tracePropagationTargets-example/javascript.ember.mdx index 8b97e408b8c87..9cf00c09ff1b1 100644 --- a/platform-includes/performance/tracePropagationTargets-example/javascript.ember.mdx +++ b/platform-includes/performance/tracePropagationTargets-example/javascript.ember.mdx @@ -6,7 +6,6 @@ For example: - The option can be configured for the built-in ember browser tracing: `browserTracingOptions: { tracePropagationTargets: ['api.example.com'] }}` - Now outgoing XHR/fetch requests to `api.example.com` will get the `sentry-trace` header attached. - ```javascript import * as Sentry from "@sentry/ember"; diff --git a/platform-includes/performance/tracePropagationTargets-example/react-native.mdx b/platform-includes/performance/tracePropagationTargets-example/react-native.mdx index 046626a872ba8..0d6f38c28628e 100644 --- a/platform-includes/performance/tracePropagationTargets-example/react-native.mdx +++ b/platform-includes/performance/tracePropagationTargets-example/react-native.mdx @@ -6,7 +6,6 @@ For example: - Therefore, the option needs to be configured like this: `new Sentry.ReactNativeTracing({tracePropagationTargets: ['api.example.com']})` - Now outgoing XHR/fetch requests to `api.example.com` will get the `sentry-trace` header attached - ```javascript Sentry.init({ diff --git a/platform-includes/performance/traces-sample-rate/apple.mdx b/platform-includes/performance/traces-sample-rate/apple.mdx index fbc71743063f7..31b92d5718ba7 100644 --- a/platform-includes/performance/traces-sample-rate/apple.mdx +++ b/platform-includes/performance/traces-sample-rate/apple.mdx @@ -7,7 +7,7 @@ SentrySDK.start { options in ``` ```objc {tabTitle:Objective-C} -#import +@import Sentry; [SentrySDK startWithConfigureOptions:^(SentryOptions * options) { options.tracesSampleRate = @0.2; diff --git a/platform-includes/performance/traces-sample-rate/php.mdx b/platform-includes/performance/traces-sample-rate/php.mdx index 0a9877f63e1d2..94eb8807afbf5 100644 --- a/platform-includes/performance/traces-sample-rate/php.mdx +++ b/platform-includes/performance/traces-sample-rate/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/performance/traces-sampler-as-filter/php.mdx b/platform-includes/performance/traces-sampler-as-filter/php.mdx index 5c110c221f998..4f172da349b3a 100644 --- a/platform-includes/performance/traces-sampler-as-filter/php.mdx +++ b/platform-includes/performance/traces-sampler-as-filter/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/performance/traces-sampler-as-sampler/android.mdx b/platform-includes/performance/traces-sampler-as-sampler/android.mdx index a6d07722e4d19..a875b892ad107 100644 --- a/platform-includes/performance/traces-sampler-as-sampler/android.mdx +++ b/platform-includes/performance/traces-sampler-as-sampler/android.mdx @@ -1,5 +1,3 @@ - - ```java import io.sentry.CustomSamplingContext; import io.sentry.android.core.SentryAndroid; diff --git a/platform-includes/performance/traces-sampler-as-sampler/apple.mdx b/platform-includes/performance/traces-sampler-as-sampler/apple.mdx index 99f548ffb6f69..ff774b9055f3f 100644 --- a/platform-includes/performance/traces-sampler-as-sampler/apple.mdx +++ b/platform-includes/performance/traces-sampler-as-sampler/apple.mdx @@ -1,5 +1,3 @@ - - ```swift {tabTitle:Swift} import Sentry @@ -37,7 +35,7 @@ SentrySDK.start { configureOptions in ``` ```objc {tabTitle:Objective-C} -#import +@import Sentry; [SentrySDK startWithConfigureOptions:^(SentryOptions * _Nonnull options) { options.dsn = @"___PUBLIC_DSN___"; diff --git a/platform-includes/performance/traces-sampler-as-sampler/java.mdx b/platform-includes/performance/traces-sampler-as-sampler/java.mdx index 9233525476792..815c33a2056fc 100644 --- a/platform-includes/performance/traces-sampler-as-sampler/java.mdx +++ b/platform-includes/performance/traces-sampler-as-sampler/java.mdx @@ -1,5 +1,3 @@ - - ```java import io.sentry.CustomSamplingContext; import io.sentry.Sentry; diff --git a/platform-includes/session-replay/setup/javascript.capacitor.mdx b/platform-includes/session-replay/setup/javascript.capacitor.mdx index 3b1cde526460e..2e5f9b1f755cc 100644 --- a/platform-includes/session-replay/setup/javascript.capacitor.mdx +++ b/platform-includes/session-replay/setup/javascript.capacitor.mdx @@ -4,7 +4,6 @@ Several options are supported and passable using the integration constructor. Se The minimal supported version of Sentry's SDK for Capacitor is 0.11.0. - ```javascript {9,13,15-21} import * as Sentry from "@sentry/capacitor"; @@ -47,4 +46,3 @@ Personally identifiable information (PII) and privacy are important consideratio While we have certain privacy considerations in place, Sentry's Session Replay allows you to set up the [privacy configurations](/platforms/javascript/session-replay/privacy/#privacy-configuration) that work best for your use case. For example, if you're working on a static website that's free of PII or other types of private data, you can opt out of the default text masking and image blocking settings. To learn more about Session Replay privacy, [read our docs.](/platforms/javascript/session-replay/privacy/) - diff --git a/platform-includes/set-environment/apple.mdx b/platform-includes/set-environment/apple.mdx index 2a2f30a370525..6e68894c3cc0c 100644 --- a/platform-includes/set-environment/apple.mdx +++ b/platform-includes/set-environment/apple.mdx @@ -1,5 +1,3 @@ - - ```swift {tabTitle:Swift} import Sentry diff --git a/platform-includes/set-environment/dotnet.nlog.mdx b/platform-includes/set-environment/dotnet.nlog.mdx index fad8aca28fd47..a6feb04ad4aa4 100644 --- a/platform-includes/set-environment/dotnet.nlog.mdx +++ b/platform-includes/set-environment/dotnet.nlog.mdx @@ -4,7 +4,6 @@ For more information on how to dynamically set event data via `NLog.config`, see - ```xml {tabTitle:NLog.config} diff --git a/platform-includes/set-environment/php.mdx b/platform-includes/set-environment/php.mdx index 006374ffa9edc..c5af306eeec51 100644 --- a/platform-includes/set-environment/php.mdx +++ b/platform-includes/set-environment/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/set-release/dotnet.nlog.mdx b/platform-includes/set-release/dotnet.nlog.mdx index 975fba7880ce8..49bc1af722a2e 100644 --- a/platform-includes/set-release/dotnet.nlog.mdx +++ b/platform-includes/set-release/dotnet.nlog.mdx @@ -4,7 +4,6 @@ For more information on how to dynamically set event data via `NLog.config`, see - ```xml {tabTitle:NLog.config} diff --git a/platform-includes/set-release/php.mdx b/platform-includes/set-release/php.mdx index 367f5070fa934..f57e12d11dd4a 100644 --- a/platform-includes/set-release/php.mdx +++ b/platform-includes/set-release/php.mdx @@ -1,5 +1,3 @@ - - ```php \Sentry\init([ 'dsn' => '___PUBLIC_DSN___', diff --git a/platform-includes/set-release/rust.mdx b/platform-includes/set-release/rust.mdx index 5b47aecd3a175..b0093c6501dbf 100644 --- a/platform-includes/set-release/rust.mdx +++ b/platform-includes/set-release/rust.mdx @@ -1,6 +1,5 @@ The `release_name` macro automatically infers the release from the cargo metadata and is the preferred way to set a release. - ```rust use sentry; diff --git a/platform-includes/source-context/java.mdx b/platform-includes/source-context/java.mdx index ad2293807c311..45909039f7193 100644 --- a/platform-includes/source-context/java.mdx +++ b/platform-includes/source-context/java.mdx @@ -55,7 +55,6 @@ Add the Sentry Gradle plugin to your project by adding the following lines: - ```groovy plugins { @@ -119,7 +118,6 @@ sentry { Make sure the `assemble` task is executed. - ```groovy plugins { @@ -261,7 +259,6 @@ export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ Add the Sentry Maven Plugin to your project by adding the following lines to your `pom.xml` file: - ```xml diff --git a/platform-includes/sourcemaps/artifact-bundles/javascript.mdx b/platform-includes/sourcemaps/artifact-bundles/javascript.mdx index 2e0056b32d6d2..1fe64e28cb27d 100644 --- a/platform-includes/sourcemaps/artifact-bundles/javascript.mdx +++ b/platform-includes/sourcemaps/artifact-bundles/javascript.mdx @@ -12,7 +12,7 @@ An artifact bundle is our new bundle format that aims to address the shortcoming Artifact Bundles solve the challenge of matching paths by using a new identification mechanism known as Debug IDs. Rather than relying on paths we uniquely identify and bind pairs of minified sources and source maps with a Debug ID (UUID). With this, we are able to quickly identify the minified source and corresponding source map without ever needing to check any paths. Thus, you don't have to worry about wrong paths configurations. -When using sentry-cli or the webpack, vite, or rollup bundler plugins Debug IDs are generated deterministicly based on the based on source file contents. Deterministic Debug IDs for esbuild are currently not supported. +When using sentry-cli or the Webpack, Vite, or Rollup bundler plugins, Debug IDs are generated deterministically based on the source file contents. Deterministic Debug IDs for esbuild are currently not supported. diff --git a/platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx b/platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx index f2c79ff438a79..0dea289bd824f 100644 --- a/platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx +++ b/platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx @@ -82,7 +82,6 @@ Assuming you have the `@sentry/webpack` package installed on version `1.x`, you Example: - ```javascript {filename:webpack.config.js} const SentryWebpackPlugin = require("@sentry/webpack-plugin"); @@ -112,7 +111,6 @@ module.exports = { The Sentry webpack plugin will automatically inject a release value into the SDK so you must either omit the `release` option from `Sentry.init` or make sure `Sentry.init`'s `release` option matches the plugin's `release` option exactly: - ```javascript Sentry.init({ @@ -138,7 +136,6 @@ This applies when using the following packages on version `2.x` and above: Example of using the `release.uploadLegacySourcemaps` option: - ```javascript {filename:webpack.config.js} {tabTitle:Webpack} const { sentryWebpackPlugin } = require("@sentry/webpack-plugin"); @@ -254,7 +251,6 @@ export default { The Sentry bundler plugins will automatically inject a release value into the SDK so you must either omit the `release` option from `Sentry.init` or make sure `Sentry.init`'s `release` option matches the plugin's `release.name` option exactly: - ```javascript Sentry.init({ diff --git a/platform-includes/getting-started-sourcemaps/javascript.bun.mdx b/platform-includes/sourcemaps/overview/javascript.nuxt.mdx similarity index 100% rename from platform-includes/getting-started-sourcemaps/javascript.bun.mdx rename to platform-includes/sourcemaps/overview/javascript.nuxt.mdx diff --git a/platform-includes/sourcemaps/overview/javascript.solidstart.mdx b/platform-includes/sourcemaps/overview/javascript.solidstart.mdx new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/platform-includes/sourcemaps/overview/javascript.svelte.mdx b/platform-includes/sourcemaps/overview/javascript.svelte.mdx index 8ff4993272a0c..973d59aa60211 100644 --- a/platform-includes/sourcemaps/overview/javascript.svelte.mdx +++ b/platform-includes/sourcemaps/overview/javascript.svelte.mdx @@ -61,7 +61,6 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ Configure Vite to emit source maps and use the Sentry Vite plugin: - ```JavaScript {filename:vite.config.js} import { defineConfig } from "vite"; diff --git a/platform-includes/sourcemaps/overview/javascript.vue.mdx b/platform-includes/sourcemaps/overview/javascript.vue.mdx index 901e149e3e90f..a6548b46f911a 100644 --- a/platform-includes/sourcemaps/overview/javascript.vue.mdx +++ b/platform-includes/sourcemaps/overview/javascript.vue.mdx @@ -51,7 +51,6 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ Example: - ```javascript {filename:vite.config.js} import { defineConfig } from "vite"; diff --git a/platform-includes/sourcemaps/primer/javascript.cloudflare.mdx b/platform-includes/sourcemaps/primer/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..44d6d15d2b41e --- /dev/null +++ b/platform-includes/sourcemaps/primer/javascript.cloudflare.mdx @@ -0,0 +1,5 @@ +To enable readable stack traces in your Sentry errors, you need to upload your source maps to Sentry. + +![Readable Stack Traces](./readable-stacktraces.png) + +If you are using plain Cloudflare Workers, set `upload_source_maps = true` to your `wrangler.toml` file to enable source map generation. diff --git a/platform-includes/sourcemaps/primer/javascript.nuxt.mdx b/platform-includes/sourcemaps/primer/javascript.nuxt.mdx new file mode 100644 index 0000000000000..724936e9e301a --- /dev/null +++ b/platform-includes/sourcemaps/primer/javascript.nuxt.mdx @@ -0,0 +1,3 @@ +`@sentry/nuxt` will generate and upload source maps automatically, so that errors in Sentry will contain readable stack traces. You just need to provide your Sentry auth token and your organization and project slugs. + +The Nuxt SDK uses the [Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2) to upload source maps. See the [Manual Configuration](../#add-readable-stack-traces-to-errors) page and the Sentry [Vite documentation](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2#configuration) for more details. diff --git a/platform-includes/sourcemaps/primer/javascript.solidstart.mdx b/platform-includes/sourcemaps/primer/javascript.solidstart.mdx new file mode 100644 index 0000000000000..600fa6d5875f3 --- /dev/null +++ b/platform-includes/sourcemaps/primer/javascript.solidstart.mdx @@ -0,0 +1,3 @@ +To generate and upload source maps of your Solid Start app use the [Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2). + +See the [Manual Configuration](../#add-readable-stack-traces-to-errors) page and the Sentry [Vite documentation](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2#configuration) for more details. diff --git a/platform-includes/sourcemaps/primer/javascript.sveltekit.mdx b/platform-includes/sourcemaps/primer/javascript.sveltekit.mdx index 635161ef1cbab..2029dea40a21f 100644 --- a/platform-includes/sourcemaps/primer/javascript.sveltekit.mdx +++ b/platform-includes/sourcemaps/primer/javascript.sveltekit.mdx @@ -1,3 +1,3 @@ `@sentry/sveltekit` will generate and upload source maps automatically, so that errors in Sentry will contain readable stack traces. -The SvelteKit SDK uses the [Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2) to upload source maps. See the [Manual Configuration](../manual-setup/#configure-source-maps-upload) page and the Sentry [Vite documentation](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2#configuration) for more details. +The SvelteKit SDK uses the [Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2) to upload source maps. See the [Manual Configuration](../manual-setup/#source-maps-upload) page and the Sentry [Vite documentation](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2#configuration) for more details. diff --git a/platform-includes/troubleshooting/dotnet.mdx b/platform-includes/troubleshooting/dotnet.mdx index 9bce1b70e2c33..11287b4ef7729 100644 --- a/platform-includes/troubleshooting/dotnet.mdx +++ b/platform-includes/troubleshooting/dotnet.mdx @@ -24,7 +24,6 @@ The above error could have two meanings: Your debug window will have following messages: - ``` Debug: Logging enabled with ConsoleDiagnosticLogger and min level: Debug diff --git a/platform-includes/user-feedback/example-widget/_default.mdx b/platform-includes/user-feedback/example-widget/_default.mdx index acb3e4a3d391f..27f63723c36f5 100644 --- a/platform-includes/user-feedback/example-widget/_default.mdx +++ b/platform-includes/user-feedback/example-widget/_default.mdx @@ -14,7 +14,6 @@ name="capture-event" /> and . There is also a function called {} that returns the ID of the most recently sent event. - ```html