@@ -10,6 +10,122 @@ npx @sentry/migr8@latest
10
10
This will let you select which updates to run, and automatically update your code. Make sure to still review all code
11
11
changes!
12
12
13
+ ## Depreacted ` BrowserTracing ` integration
14
+
15
+ The ` BrowserTracing ` integration, together with the custom routing instrumentations passed to it, are deprecated in v8.
16
+ Instead, you should use ` Sentry.browserTracingIntegration() ` .
17
+
18
+ Package-specific browser tracing integrations are available directly. In most cases, there is a single integration
19
+ provided for each package, which will make sure to set up performance tracing correctly for the given SDK. For react, we
20
+ provide multiple integrations to cover different router integrations:
21
+
22
+ ### ` @sentry/browser ` , ` @sentry/svelte ` , ` @sentry/gatsby `
23
+
24
+ ``` js
25
+ import * as Sentry from ' @sentry/browser' ;
26
+
27
+ Sentry .init ({
28
+ integrations: [Sentry .browserTracingIntegration ()],
29
+ });
30
+ ```
31
+
32
+ ### ` @sentry/react `
33
+
34
+ ``` js
35
+ import * as Sentry from ' @sentry/react' ;
36
+
37
+ Sentry .init ({
38
+ integrations: [
39
+ // No react router
40
+ Sentry .browserTracingIntegration (),
41
+ // OR, if you are using react router, instead use one of the following:
42
+ Sentry .reactRouterV6BrowserTracingIntegration ({
43
+ useEffect,
44
+ useLocation,
45
+ useNavigationType,
46
+ createRoutesFromChildren,
47
+ matchRoutes,
48
+ stripBasename,
49
+ }),
50
+ Sentry .reactRouterV5BrowserTracingIntegration ({
51
+ history,
52
+ }),
53
+ Sentry .reactRouterV4BrowserTracingIntegration ({
54
+ history,
55
+ }),
56
+ Sentry .reactRouterV3BrowserTracingIntegration ({
57
+ history,
58
+ routes,
59
+ match,
60
+ }),
61
+ ],
62
+ });
63
+ ```
64
+
65
+ ### ` @sentry/vue `
66
+
67
+ ``` js
68
+ import * as Sentry from ' @sentry/vue' ;
69
+
70
+ Sentry .init ({
71
+ integrations: [
72
+ Sentry .browserTracingIntegration ({
73
+ // pass router in, if applicable
74
+ router,
75
+ }),
76
+ ],
77
+ });
78
+ ```
79
+
80
+ ### ` @sentry/angular ` & ` @sentry/angular-ivy `
81
+
82
+ ``` js
83
+ import * as Sentry from ' @sentry/angular' ;
84
+
85
+ Sentry .init ({
86
+ integrations: [Sentry .browserTracingIntegration ()],
87
+ });
88
+
89
+ // You still need to add the Trace Service like before!
90
+ ```
91
+
92
+ ### ` @sentry/remix `
93
+
94
+ ``` js
95
+ import * as Sentry from ' @sentry/remix' ;
96
+
97
+ Sentry .init ({
98
+ integrations: [
99
+ Sentry .browserTracingIntegration ({
100
+ useEffect,
101
+ useLocation,
102
+ useMatches,
103
+ }),
104
+ ],
105
+ });
106
+ ```
107
+
108
+ ### ` @sentry/nextjs ` , ` @sentry/astro ` , ` @sentry/sveltekit `
109
+
110
+ Browser tracing is automatically set up for you in these packages. If you need to customize the options, you can do it
111
+ like this:
112
+
113
+ ``` js
114
+ import * as Sentry from ' @sentry/nextjs' ;
115
+
116
+ Sentry .init ({
117
+ integrations: [
118
+ Sentry .browserTracingIntegration ({
119
+ // add custom options here
120
+ }),
121
+ ],
122
+ });
123
+ ```
124
+
125
+ ### ` @sentry/ember `
126
+
127
+ Browser tracing is automatically set up for you. You can configure it as before through configuration.
128
+
13
129
## Deprecated ` transactionContext ` passed to ` tracesSampler `
14
130
15
131
Instead of an ` transactionContext ` being passed to the ` tracesSampler ` callback, the callback will directly receive
@@ -43,6 +159,7 @@ The following list shows how integrations should be migrated:
43
159
44
160
| Old | New | Packages |
45
161
| ---------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------- |
162
+ | ` new BrowserTracing() ` | ` browserTracingIntegration() ` | ` @sentry/browser ` |
46
163
| ` new InboundFilters() ` | ` inboundFiltersIntegration() ` | ` @sentry/core ` , ` @sentry/browser ` , ` @sentry/node ` , ` @sentry/deno ` , ` @sentry/bun ` , ` @sentry/vercel-edge ` |
47
164
| ` new FunctionToString() ` | ` functionToStringIntegration() ` | ` @sentry/core ` , ` @sentry/browser ` , ` @sentry/node ` , ` @sentry/deno ` , ` @sentry/bun ` , ` @sentry/vercel-edge ` |
48
165
| ` new LinkedErrors() ` | ` linkedErrorsIntegration() ` | ` @sentry/core ` , ` @sentry/browser ` , ` @sentry/node ` , ` @sentry/deno ` , ` @sentry/bun ` , ` @sentry/vercel-edge ` |
@@ -75,8 +192,8 @@ The following list shows how integrations should be migrated:
75
192
| ` new OnUncaughtException() ` | ` onUncaughtExceptionIntegration() ` | ` @sentry/node ` |
76
193
| ` new OnUnhandledRejection() ` | ` onUnhandledRejectionIntegration() ` | ` @sentry/node ` |
77
194
| ` new LocalVariables() ` | ` localVariablesIntegration() ` | ` @sentry/node ` |
78
- | ` new Spotlight() ` | ` spotlightIntergation ()` | ` @sentry/node ` |
79
- | ` new Anr() ` | ` anrIntergation ()` | ` @sentry/node ` |
195
+ | ` new Spotlight() ` | ` spotlightIntegration ()` | ` @sentry/node ` |
196
+ | ` new Anr() ` | ` anrIntegration ()` | ` @sentry/node ` |
80
197
| ` new Hapi() ` | ` hapiIntegration() ` | ` @sentry/node ` |
81
198
| ` new Undici() ` | ` nativeNodeFetchIntegration() ` | ` @sentry/node ` |
82
199
| ` new Http() ` | ` httpIntegration() ` | ` @sentry/node ` |
0 commit comments