From 538c282fa5de09e62bdca6a19cc2236ee8b9804d Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 4 Oct 2022 12:07:24 +0200 Subject: [PATCH 1/2] ref: Clarify JS tracingOrigins default values --- .../instrumentation/automatic-instrumentation.mdx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/platforms/javascript/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/javascript/common/performance/instrumentation/automatic-instrumentation.mdx index 359ed26acfa7d..4854d98cdc874 100644 --- a/src/platforms/javascript/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/javascript/common/performance/instrumentation/automatic-instrumentation.mdx @@ -52,7 +52,9 @@ Supported options: ### tracingOrigins -The default value of `tracingOrigins` is `['localhost', /^\//]`. The JavaScript SDK will attach the `sentry-trace` and `baggage` headers to all outgoing XHR/fetch requests whose destination contains a string in the list or matches a regex in the list. If your frontend is making requests to a different domain, you will need to add it there to propagate the `sentry-trace` and `baggage` headers to the backend services, which is required to link transactions together as part of a single trace. **The `tracingOrigins` option matches against the whole request URL, not just the domain. Using stricter regex to match certain parts of the URL ensures that requests do not unnecessarily have the additional headers attached.** +A list of strings and regular expressions. The JavaScript SDK will attach the `sentry-trace` and `baggage` headers to all outgoing XHR/fetch requests whose destination contains a string in the list or matches a regex in the list. If your frontend is making requests to a different domain, you will need to add it there to propagate the `sentry-trace` and `baggage` headers to the backend services, which is required to link transactions together as part of a single trace. **The `tracingOrigins` option matches against the whole request URL, not just the domain. Using stricter regex to match certain parts of the URL ensures that requests do not unnecessarily have the additional headers attached.** + +The default value of `tracingOrigins` is `['localhost', /^\//]`. This means that by default, tracing headers are only attached to requests that contain `localhost` in their URL or to requests whose URL starts with a `'/'` (for example `GET /api/v1/users`). @@ -100,19 +102,19 @@ This option flags transactions when tabs are moved to the background with "cance The default is `true`. +### \_experiments -### _experiments - -This is an object containing experimental flags for features that may involve breaking changes that haven't yet landed in a new major version. +This is an object containing experimental flags for features that may involve breaking changes that haven't yet landed in a new major version. The default is + ``` { enableLongTasks: true } ``` -#### _experiments.enableLongTasks +#### \_experiments.enableLongTasks This experimental option determines whether spans for long tasks automatically get created. From fe73f047dd6aec4558e6dc936f1c22c28579d9a0 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Wed, 5 Oct 2022 17:35:27 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> --- .../instrumentation/automatic-instrumentation.mdx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/platforms/javascript/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/javascript/common/performance/instrumentation/automatic-instrumentation.mdx index 4854d98cdc874..199af3dd8a6fc 100644 --- a/src/platforms/javascript/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/javascript/common/performance/instrumentation/automatic-instrumentation.mdx @@ -52,9 +52,11 @@ Supported options: ### tracingOrigins -A list of strings and regular expressions. The JavaScript SDK will attach the `sentry-trace` and `baggage` headers to all outgoing XHR/fetch requests whose destination contains a string in the list or matches a regex in the list. If your frontend is making requests to a different domain, you will need to add it there to propagate the `sentry-trace` and `baggage` headers to the backend services, which is required to link transactions together as part of a single trace. **The `tracingOrigins` option matches against the whole request URL, not just the domain. Using stricter regex to match certain parts of the URL ensures that requests do not unnecessarily have the additional headers attached.** +A list of strings and regular expressions. The JavaScript SDK will attach the `sentry-trace` and `baggage` headers to all outgoing XHR/fetch requests whose destination contains a string in the list or matches a regex in the list. If your frontend is making requests to a different domain, you'll need to add it there to propagate the `sentry-trace` and `baggage` headers to the backend services, which is required to link transactions together as part of a single trace. -The default value of `tracingOrigins` is `['localhost', /^\//]`. This means that by default, tracing headers are only attached to requests that contain `localhost` in their URL or to requests whose URL starts with a `'/'` (for example `GET /api/v1/users`). +**The `tracingOrigins` option matches against the whole request URL, not just the domain. Using stricter regex to match certain parts of the URL ensures that requests do not unnecessarily have the additional headers attached.** + +The default value of `tracingOrigins` is `['localhost', /^\//]`. This means that by default, tracing headers are only attached to requests that contain `localhost` in their URL or requests whose URL starts with a `'/'` (for example `GET /api/v1/users`). @@ -104,7 +106,7 @@ The default is `true`. ### \_experiments -This is an object containing experimental flags for features that may involve breaking changes that haven't yet landed in a new major version. +This is an object containing experimental flags for features that haven't yet landed in a new major version and might include breaking changes. The default is