Skip to content

Commit e7240c1

Browse files
timfishAbhiPrasadlizokm
authored
Browser tracingOrigins is deprecated and replaced with tracePropagationTargets (#5759)
Replace `tracingOrigins` with `tracePropagationTargets`. I have not touched `tracingOrigins` in relation to these because they will need to updated to the latest JavaScript SDK for these changes to become relevant: - React Native - Electron `Net` integration - Wizard docs for capacitor/ionic Update the description for `shouldCreateSpanForRequest` because it no longer considers `tracingOrigins`. Co-authored-by: Abhijeet Prasad <devabhiprasad@gmail.com> Co-authored-by: Liza Mock <lizka920@gmail.com>
1 parent abbd922 commit e7240c1

File tree

17 files changed

+34
-26
lines changed

17 files changed

+34
-26
lines changed

src/platform-includes/getting-started-config/javascript.angular.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Sentry.init({
1414
// which automatically instruments your application to monitor its
1515
// performance, including custom Angular routing instrumentation
1616
new BrowserTracing({
17-
tracingOrigins: ["localhost", "https://yourserver.io/api"],
17+
tracePropagationTargets: ["localhost", "https://yourserver.io/api"],
1818
routingInstrumentation: Sentry.routingInstrumentation,
1919
}),
2020
],

src/platform-includes/getting-started-config/javascript.vue.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Sentry.init({
2020
integrations: [
2121
new BrowserTracing({
2222
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
23-
tracingOrigins: ["localhost", "my-site-url.com", /^\//],
23+
tracePropagationTargets: ["localhost", "my-site-url.com", /^\//],
2424
}),
2525
],
2626
// Set tracesSampleRate to 1.0 to capture 100%
@@ -58,7 +58,7 @@ Sentry.init({
5858
integrations: [
5959
new BrowserTracing({
6060
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
61-
tracingOrigins: ["localhost", "my-site-url.com", /^\//],
61+
tracePropagationTargets: ["localhost", "my-site-url.com", /^\//],
6262
}),
6363
],
6464
// Set tracesSampleRate to 1.0 to capture 100%

src/platform-includes/performance/connect-services/javascript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `baggage` header was added with version 7 of the Sentry Javascript SDK and i
1010

1111
All of Sentry's tracing-related integrations (`BrowserTracing`, `Http`, and `Express`), as well as the Next.JS SDK, either generate or pick up and propagate the trace headers automatically, as appropriate, for all transactions and spans that they generate.
1212

13-
The JavaScript SDK will only attach the trace headers to outgoing HTTP requests for which the destination is a substring or regex match to the <PlatformLink to="/performance/instrumentation/automatic-instrumentation/#tracingorigins">tracingOrigins</PlatformLink> list.
13+
The JavaScript SDK will only attach the trace headers to outgoing HTTP requests for which the destination is a substring or regex match to the <PlatformLink to="/performance/instrumentation/automatic-instrumentation/#tracePropagationTargets">tracePropagationTargets</PlatformLink> list. `tracePropagationTargets` was previously called `tracingOrigins`.
1414

1515
<!-- copied from automatic-instrumentation to emphasize this point -->
1616

src/platform-includes/performance/enable-automatic-instrumentation/javascript.electron.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Sentry.init({
1212

1313
integrations: [
1414
new BrowserTracing({
15-
tracingOrigins: ["localhost", "my-site-url.com", /^\//],
15+
tracePropagationTargets: ["localhost", "my-site-url.com", /^\//],
1616
// ... other options
1717
}),
1818
],

src/platform-includes/performance/enable-automatic-instrumentation/javascript.ember.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Sentry.init({
1313

1414
// Configuration for Ember's default tracing integration.
1515
browserTracingOptions: {
16-
tracingOrigins: ["localhost", "my-site-url.com", /^\//],
16+
tracePropagationTargets: ["localhost", "my-site-url.com", /^\//],
1717
},
1818
});
1919
```

src/platform-includes/performance/enable-automatic-instrumentation/javascript.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Sentry.init({
1313

1414
integrations: [
1515
new BrowserTracing({
16-
tracingOrigins: ["localhost", "my-site-url.com", /^\//],
16+
tracePropagationTargets: ["localhost", "my-site-url.com", /^\//],
1717
// ... other options
1818
}),
1919
],
@@ -30,7 +30,7 @@ Sentry.init({
3030

3131
integrations: [
3232
new Sentry.BrowserTracing({
33-
tracingOrigins: ["localhost", "my-site-url.com", /^\//],
33+
tracePropagationTargets: ["localhost", "my-site-url.com", /^\//],
3434
// ... other options
3535
}),
3636
],

src/platform-includes/performance/enable-automatic-instrumentation/javascript.react.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Sentry.init({
1616

1717
integrations: [
1818
new BrowserTracing({
19-
tracingOrigins: ["localhost", "my-site-url.com", /^\//],
19+
tracePropagationTargets: ["localhost", "my-site-url.com", /^\//],
2020

2121
// Can also use reactRouterV3Instrumentation or reactRouterV4Instrumentation
2222
routingInstrumentation: Sentry.reactRouterV5Instrumentation(history),

src/platform-includes/performance/tracingOrigins-example/javascript.ember.mdx renamed to src/platform-includes/performance/tracePropagationTargets-example/javascript.ember.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ For example:
33
- A frontend application is served from `example.com`
44
- A backend service is served from `api.example.com`
55
- The frontend application makes API calls to the backend
6-
- The option can be configured for the built-in ember browser tracing: `browserTracingOptions: { tracingOrigins: ['api.example.com'] }}`
6+
- The option can be configured for the built-in ember browser tracing: `browserTracingOptions: { tracePropagationTargets: ['api.example.com'] }}`
77
- Now outgoing XHR/fetch requests to `api.example.com` will get the `sentry-trace` header attached.
88

99
```javascript
@@ -16,7 +16,7 @@ Sentry.init({
1616
tracesSampleRate: 0.2,
1717

1818
browserTracingOptions: {
19-
tracingOrigins: ["localhost", "my-site-url.com", "api.example.com"],
19+
tracePropagationTargets: ["localhost", "my-site-url.com", "api.example.com"],
2020
},
2121
});
2222
```

src/platform-includes/performance/tracingOrigins-example/javascript.mdx renamed to src/platform-includes/performance/tracePropagationTargets-example/javascript.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ For example:
33
- A frontend application is served from `example.com`.
44
- A backend service is served from `api.example.com`.
55
- The frontend application makes API calls to the backend.
6-
- Set the `tracingOrigins` option to `['api.example.com']`.
6+
- Set the `tracePropagationTargets` option to `['api.example.com']`.
77
- Now outgoing XHR/fetch requests to `api.example.com` will get the `sentry-trace` header attached.
88

99
```javascript
1010
Sentry.init({
1111
// ...
1212
integrations: [
1313
new BrowserTracing({
14-
tracingOrigins: ["api.example.com"],
14+
tracePropagationTargets: ["api.example.com"],
1515
}),
1616
],
1717
});

src/platform-includes/performance/tracingOrigins-example/javascript.nextjs.mdx renamed to src/platform-includes/performance/tracePropagationTargets-example/javascript.nextjs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ For example:
33
- A frontend application is served from `example.com`
44
- A backend service is served from `api.example.com`
55
- The frontend application makes API calls to the backend
6-
- Set the `tracingOrigins` option to `['api.example.com']`
6+
- Set the `tracePropagationTargets` option to `['api.example.com']`
77
- Now outgoing XHR/fetch requests to `api.example.com` will get the `sentry-trace` header attached
88

99
```javascript
1010
Sentry.init({
1111
// ...
1212
integrations: [
1313
new Sentry.BrowserTracing({
14-
tracingOrigins: ["api.example.com"],
14+
tracePropagationTargets: ["api.example.com"],
1515
}),
1616
],
1717
});

0 commit comments

Comments
 (0)