From 78c211a6186f0cefe38306482adabbac56dab87a Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 25 Jul 2025 11:28:53 +0200 Subject: [PATCH 1/3] docs(js): Add docs for `strictTraceContinuation` and `orgId` --- .../common/configuration/options.mdx | 25 +++++++++++++ .../how-to-use/javascript.nextjs.mdx | 31 ++++++++++++++++ .../how-to-use/javascript.node.mdx | 33 ++++++++++++++++- .../how-to-use/javascript.nuxt.mdx | 37 +++++++++++++++++-- .../how-to-use/javascript.remix.mdx | 33 ++++++++++++++++- .../how-to-use/javascript.solidstart.mdx | 33 ++++++++++++++++- .../how-to-use/javascript.sveltekit.mdx | 35 +++++++++++++++++- 7 files changed, 219 insertions(+), 8 deletions(-) diff --git a/docs/platforms/javascript/common/configuration/options.mdx b/docs/platforms/javascript/common/configuration/options.mdx index a3a844ac1a8c8..1246c1208bff1 100644 --- a/docs/platforms/javascript/common/configuration/options.mdx +++ b/docs/platforms/javascript/common/configuration/options.mdx @@ -379,6 +379,31 @@ If you want to disable trace propagation, you can set this option to `[]`. + + + + + If set to `true`, the SDK will only continue a trace if the organization ID of the incoming trace found in the + `baggage` header matches the organization ID of the current Sentry client. + + The client's organization ID is extracted from the DSN or can be set with the `orgId` option. + + If the organization IDs do not match, the SDK will start a new trace instead of continuing the incoming one. + This is useful to prevent traces of unknown third-party services from being continued in your application. + + + + + + The organization ID for your Sentry project. + + The SDK will try to extract the organization ID from the DSN. If it cannot be found, or if you need to override it, + you can provide the ID with this option. The organization ID is used for trace propagation and for features like `strictTraceContinuation`. + + + + + diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx index f7d9347994fdd..f14b9ba94552e 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx @@ -71,6 +71,37 @@ This configuration lets your app track user actions across: If your app crashes while a user is uploading a photo, you can trace exactly where the problem occurred - in the app itself, the main API, or the media service. +### Strict Trace Continuation + +When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. +By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +as it can lead to unwanted traces, increased billing, and skewed performance data. + +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. +It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +This is useful if your application is a public API or receives requests from services outside your organization. + +```javascript {5} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + // Ensure that only traces from your own organization are continued + strictTraceContinuation: true, +}); +``` + +The SDK automatically parses the organization ID from your DSN. If you use a DSN format that doesn't include the organization ID (number followed by the letter `"o"`), or if you need to override it, you can provide it manually using the `orgId` option: + +```javascript {6} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + strictTraceContinuation: true, + // Manually provide your organization ID (overrides organization ID parsed from DSN) + orgId: 12345, +}); +``` + ### Disabling Distributed Tracing If you want to disable distributed tracing and ensure no Sentry trace headers are sent, you can configure your SDK like this: 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 8e27e136e525c..0c07af6b80a4f 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx @@ -10,7 +10,7 @@ Sentry.init({ -Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. +Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. For example, if you have a Node.js backend running locally on port 3000, that destination (`http://localhost:3000`) should be added to the `tracePropagationTargets` array on your frontend to ensure that CORS doesn't restrict the propagation of traces. @@ -62,6 +62,37 @@ This configuration lets your app track user actions across: If your app crashes while a user is uploading a photo, you can trace exactly where the problem occurred - in the app itself, the main API, or the media service. +### Strict Trace Continuation + +When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. +By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +as it can lead to unwanted traces, increased billing, and skewed performance data. + +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. +It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +This is useful if your application is a public API or receives requests from services outside your organization. + +```javascript {5} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + // Ensure that only traces from your own organization are continued + strictTraceContinuation: true, +}); +``` + +The SDK automatically parses the organization ID from your DSN. If you use a DSN format that doesn't include the organization ID (number followed by the letter `"o"`), or if you need to override it, you can provide it manually using the `orgId` option: + +```javascript {6} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + strictTraceContinuation: true, + // Manually provide your organization ID (overrides organization ID parsed from DSN) + orgId: 12345, +}); +``` + ### Disabling Distributed Tracing If you want to disable distributed tracing and ensure no Sentry trace headers are sent, you can configure your SDK like this: diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx index c0756a680c563..89dbea7509de4 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx @@ -1,10 +1,10 @@ -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. +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. -Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. +Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. For example, if you have a Node.js backend running locally on port 3000, that destination (`http://localhost:3000`) should be added to the `tracePropagationTargets` array on your frontend to ensure that CORS doesn't restrict the propagation of traces. @@ -59,4 +59,35 @@ This configuration lets your app track user actions across: * Your media server (handles images, videos, etc.) * Any local API endpoints in your app -If your app crashes while a user is uploading a photo, you can trace exactly where the problem occurred - in the app itself, the main API, or the media service. \ No newline at end of file +If your app crashes while a user is uploading a photo, you can trace exactly where the problem occurred - in the app itself, the main API, or the media service. + +### Strict Trace Continuation + +When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. +By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +as it can lead to unwanted traces, increased billing, and skewed performance data. + +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. +It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +This is useful if your application is a public API or receives requests from services outside your organization. + +```javascript {5} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + // Ensure that only traces from your own organization are continued + strictTraceContinuation: true, +}); +``` + +The SDK automatically parses the organization ID from your DSN. If you use a DSN format that doesn't include the organization ID (number followed by the letter `"o"`), or if you need to override it, you can provide it manually using the `orgId` option: + +```javascript {6} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + strictTraceContinuation: true, + // Manually provide your organization ID (overrides organization ID parsed from DSN) + orgId: 12345, +}); +``` diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx index ffd06215d2f28..4b48646d40ba3 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx @@ -35,7 +35,7 @@ To get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/W -Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. +Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. For example, if you have a Node.js backend running locally on port 3000, that destination (`http://localhost:3000`) should be added to the `tracePropagationTargets` array on your frontend to ensure that CORS doesn't restrict the propagation of traces. @@ -100,6 +100,37 @@ This configuration lets your app track user actions across: If your app crashes while a user is uploading a photo, you can trace exactly where the problem occurred - in the app itself, the main API, or the media service. +### Strict Trace Continuation + +When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. +By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +as it can lead to unwanted traces, increased billing, and skewed performance data. + +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. +It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +This is useful if your application is a public API or receives requests from services outside your organization. + +```javascript {5} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + // Ensure that only traces from your own organization are continued + strictTraceContinuation: true, +}); +``` + +The SDK automatically parses the organization ID from your DSN. If you use a DSN format that doesn't include the organization ID (number followed by the letter `"o"`), or if you need to override it, you can provide it manually using the `orgId` option: + +```javascript {6} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + strictTraceContinuation: true, + // Manually provide your organization ID (overrides organization ID parsed from DSN) + orgId: 12345, +}); +``` + ### Disabling Distributed Tracing If you want to disable distributed tracing and ensure no Sentry trace headers are sent, you can configure your SDK like this: diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx index c9a28f16de064..48b07c67a3e5b 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx @@ -29,7 +29,7 @@ To get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/W -Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. +Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. For example, if you have a Node.js backend running locally on port 3000, that destination (`http://localhost:3000`) should be added to the `tracePropagationTargets` array on your frontend to ensure that CORS doesn't restrict the propagation of traces. @@ -93,3 +93,34 @@ This configuration lets your app track user actions across: * Any local API endpoints in your app If your app crashes while a user is uploading a photo, you can trace exactly where the problem occurred - in the app itself, the main API, or the media service. + +### Strict Trace Continuation + +When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. +By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +as it can lead to unwanted traces, increased billing, and skewed performance data. + +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. +It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +This is useful if your application is a public API or receives requests from services outside your organization. + +```javascript {5} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + // Ensure that only traces from your own organization are continued + strictTraceContinuation: true, +}); +``` + +The SDK automatically parses the organization ID from your DSN. If you use a DSN format that doesn't include the organization ID (number followed by the letter `"o"`), or if you need to override it, you can provide it manually using the `orgId` option: + +```javascript {6} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + strictTraceContinuation: true, + // Manually provide your organization ID (overrides organization ID parsed from DSN) + orgId: 12345, +}); +``` diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx index 81a50bd9f535b..ec8fd39f659ab 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx @@ -1,10 +1,10 @@ -If you're using the current version of our SvelteKit SDK, distributed tracing will work out of the box for the client and server runtimes. +If you're using the current version of our SvelteKit SDK, distributed tracing will work out of the box for the client and server runtimes. When you are interacting with other external API systems, you might have to define `tracePropagationTargets` to get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues. -Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. +Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports. For example, if you have a Node.js backend running locally on port 3000, that destination (`http://localhost:3000`) should be added to the `tracePropagationTargets` array on your frontend to ensure that CORS doesn't restrict the propagation of traces. @@ -71,6 +71,37 @@ This configuration lets your app track user actions across: If your app crashes while a user is uploading a photo, you can trace exactly where the problem occurred - in the app itself, the main API, or the media service. +### Strict Trace Continuation + +When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. +By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +as it can lead to unwanted traces, increased billing, and skewed performance data. + +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. +It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +This is useful if your application is a public API or receives requests from services outside your organization. + +```javascript {5} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + // Ensure that only traces from your own organization are continued + strictTraceContinuation: true, +}); +``` + +The SDK automatically parses the organization ID from your DSN. If you use a DSN format that doesn't include the organization ID (number followed by the letter `"o"`), or if you need to override it, you can provide it manually using the `orgId` option: + +```javascript {6} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, + strictTraceContinuation: true, + // Manually provide your organization ID (overrides organization ID parsed from DSN) + orgId: 12345, +}); +``` + ### Disabling Distributed Tracing If you want to disable distributed tracing and ensure no Sentry trace headers are sent, you can configure your SDK like this: From 8259976a110662f253e9d000ec9f70528ef3a239 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 25 Jul 2025 12:57:45 +0200 Subject: [PATCH 2/3] Add notice about availablility --- .../distributed-tracing/how-to-use/javascript.nextjs.mdx | 2 ++ .../distributed-tracing/how-to-use/javascript.node.mdx | 2 ++ .../distributed-tracing/how-to-use/javascript.nuxt.mdx | 2 ++ .../distributed-tracing/how-to-use/javascript.remix.mdx | 2 ++ .../distributed-tracing/how-to-use/javascript.solidstart.mdx | 2 ++ .../distributed-tracing/how-to-use/javascript.sveltekit.mdx | 2 ++ 6 files changed, 12 insertions(+) diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx index f14b9ba94552e..7c5f1d24fbc01 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx @@ -73,6 +73,8 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe ### Strict Trace Continuation +_Available since SDK version 10_ + When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. 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 0c07af6b80a4f..f5da9da5ae2cb 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx @@ -64,6 +64,8 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe ### Strict Trace Continuation +_Available since SDK version 10_ + When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx index 89dbea7509de4..d8a02c8746e92 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx @@ -63,6 +63,8 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe ### Strict Trace Continuation +_Available since SDK version 10_ + When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx index 4b48646d40ba3..b7f417b337697 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx @@ -102,6 +102,8 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe ### Strict Trace Continuation +_Available since SDK version 10_ + When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx index 48b07c67a3e5b..e21bed2712b3e 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx @@ -96,6 +96,8 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe ### Strict Trace Continuation +_Available since SDK version 10_ + When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx index ec8fd39f659ab..ab03e81e08d63 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx @@ -73,6 +73,8 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe ### Strict Trace Continuation +_Available since SDK version 10_ + When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. From 6b60dfce0fe14cea6c4fbf4b7d17d3cec69d3f1a Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 29 Jul 2025 11:03:48 +0200 Subject: [PATCH 3/3] review suggestions --- .../common/configuration/options.mdx | 27 +++++++++++-------- .../how-to-use/javascript.nextjs.mdx | 6 ++--- .../how-to-use/javascript.node.mdx | 6 ++--- .../how-to-use/javascript.nuxt.mdx | 6 ++--- .../how-to-use/javascript.remix.mdx | 6 ++--- .../how-to-use/javascript.solidstart.mdx | 6 ++--- .../how-to-use/javascript.sveltekit.mdx | 6 ++--- 7 files changed, 34 insertions(+), 29 deletions(-) diff --git a/docs/platforms/javascript/common/configuration/options.mdx b/docs/platforms/javascript/common/configuration/options.mdx index 1246c1208bff1..a926942575e7f 100644 --- a/docs/platforms/javascript/common/configuration/options.mdx +++ b/docs/platforms/javascript/common/configuration/options.mdx @@ -18,6 +18,21 @@ sidebar_order: 1 + + + + The organization ID for your Sentry project. + + The SDK will try to extract the organization ID from the DSN. If it cannot be found, or if you need to override it, + you can provide the ID with this option. The organization ID is used for trace propagation and features like `strictTraceContinuation`. + + + The organization ID is used for features like strict trace continuation. + + + + + Turns debug mode on or off. If debug is enabled SDK will attempt to print out useful debugging information about what the SDK is doing. @@ -386,22 +401,12 @@ If you want to disable trace propagation, you can set this option to `[]`. If set to `true`, the SDK will only continue a trace if the organization ID of the incoming trace found in the `baggage` header matches the organization ID of the current Sentry client. - The client's organization ID is extracted from the DSN or can be set with the `orgId` option. + The client's organization ID is extracted from the DSN or can be set with the `orgId` option. If the organization IDs do not match, the SDK will start a new trace instead of continuing the incoming one. This is useful to prevent traces of unknown third-party services from being continued in your application. - - - - The organization ID for your Sentry project. - - The SDK will try to extract the organization ID from the DSN. If it cannot be found, or if you need to override it, - you can provide the ID with this option. The organization ID is used for trace propagation and for features like `strictTraceContinuation`. - - - diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx index 7c5f1d24fbc01..20c2657921eb2 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx @@ -76,11 +76,11 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe _Available since SDK version 10_ When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. -By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +By default, the SDK will continue the trace from these incoming headers. However, this behavior can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. -To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. -It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information and only continues the trace if it belongs to the same Sentry organization. +Otherwise, it starts a new trace. This is useful if your application is a public API or receives requests from services outside your organization. ```javascript {5} 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 f5da9da5ae2cb..d3c38d3be6a43 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.node.mdx @@ -67,11 +67,11 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe _Available since SDK version 10_ When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. -By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +By default, the SDK will continue the trace from these incoming headers. However, this behavior can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. -To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. -It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information and only continues the trace if it belongs to the same Sentry organization. +Otherwise, it starts a new trace. This is useful if your application is a public API or receives requests from services outside your organization. ```javascript {5} diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx index d8a02c8746e92..13504ee1b13c8 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.nuxt.mdx @@ -66,11 +66,11 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe _Available since SDK version 10_ When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. -By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +By default, the SDK will continue the trace from these incoming headers. However, this behavior can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. -To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. -It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information and only continues the trace if it belongs to the same Sentry organization. +Otherwise, it starts a new trace. This is useful if your application is a public API or receives requests from services outside your organization. ```javascript {5} diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx index b7f417b337697..0c8752d091596 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx @@ -105,11 +105,11 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe _Available since SDK version 10_ When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. -By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +By default, the SDK will continue the trace from these incoming headers. However, this behavior can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. -To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. -It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information and only continues the trace if it belongs to the same Sentry organization. +Otherwise, it starts a new trace. This is useful if your application is a public API or receives requests from services outside your organization. ```javascript {5} diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx index e21bed2712b3e..832122f3a600a 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx @@ -99,11 +99,11 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe _Available since SDK version 10_ When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. -By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +By default, the SDK will continue the trace from these incoming headers. However, this behavior can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. -To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. -It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information and only continues the trace if it belongs to the same Sentry organization. +Otherwise, it starts a new trace. This is useful if your application is a public API or receives requests from services outside your organization. ```javascript {5} diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx index ab03e81e08d63..75153c8af809c 100644 --- a/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx +++ b/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx @@ -76,11 +76,11 @@ If your app crashes while a user is uploading a photo, you can trace exactly whe _Available since SDK version 10_ When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. -By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, +By default, the SDK will continue the trace from these incoming headers. However, this behavior can be undesirable if the requests are from a third-party service, as it can lead to unwanted traces, increased billing, and skewed performance data. -To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. -It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. +To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information and only continues the trace if it belongs to the same Sentry organization. +Otherwise, it starts a new trace. This is useful if your application is a public API or receives requests from services outside your organization. ```javascript {5}