Skip to content

Commit 1b85bd3

Browse files
committed
indent properly
1 parent 62993b7 commit 1b85bd3

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

docs/migration/v8-to-v9.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -61,42 +61,42 @@ Older Typescript versions _may_ still work, but we will not test them anymore an
6161

6262
- If you use the optional `captureConsoleIntegration` and set `attachStackTrace: true` in your `Sentry.init` call, console messages will no longer be marked as unhandled (i.e. `handled: false`) but as handled (i.e. `handled: true`). If you want to keep sending them as unhandled, configure the `handled` option when adding the integration:
6363

64-
```js
65-
Sentry.init({
66-
integrations: [Sentry.captureConsoleIntegration({ handled: false })],
67-
attachStackTrace: true,
68-
});
69-
```
64+
```js
65+
Sentry.init({
66+
integrations: [Sentry.captureConsoleIntegration({ handled: false })],
67+
attachStackTrace: true,
68+
});
69+
```
7070

7171
- Dropping spans in the `beforeSendSpan` hook is no longer possible.
7272
- The `beforeSendSpan` hook now receives the root span as well as the child spans.
7373
- In previous versions, we determined if tracing is enabled (for Tracing Without Performance) by checking if either `tracesSampleRate` or `traceSampler` are _defined_ at all, in `Sentry.init()`. This means that e.g. the following config would lead to tracing without performance (=tracing being enabled, even if no spans would be started):
7474

75-
```js
76-
Sentry.init({
77-
tracesSampleRate: undefined,
78-
});
79-
```
75+
```js
76+
Sentry.init({
77+
tracesSampleRate: undefined,
78+
});
79+
```
8080

81-
In v9, an `undefined` value will be treated the same as if the value is not defined at all. You'll need to set `tracesSampleRate: 0` if you want to enable tracing without performance.
81+
In v9, an `undefined` value will be treated the same as if the value is not defined at all. You'll need to set `tracesSampleRate: 0` if you want to enable tracing without performance.
8282

8383
- The `getCurrentHub().getIntegration(IntegrationClass)` method will always return `null` in v9. This has already stopped working mostly in v8, because we stopped exposing integration classes. In v9, the fallback behavior has been removed. Note that this does not change the type signature and is thus not technically breaking, but still worth pointing out.
8484

8585
- The `startSpan` behavior was slightly changed if you pass a custom `scope` to the span start options: While in v8, the passed scope was set active directly on the passed scope, in v9, the scope is cloned. This behavior change does not apply to `@sentry/node` where the scope was already cloned. This change was made to ensure that the span only remains active within the callback and to align behavior between `@sentry/node` and all other SDKs. As a result of the change, your span hierarchy should be more accurate. However, be aware that modifying the scope (e.g. set tags) within the `startSpan` callback behaves a bit differently now.
8686

87-
```js
88-
startSpan({ name: 'example', scope: customScope }, () => {
89-
getCurrentScope().setTag('tag-a', 'a'); // this tag will only remain within the callback
90-
// set the tag directly on customScope in addition, if you want to to persist the tag outside of the callback
91-
customScope.setTag('tag-a', 'a');
92-
});
93-
```
87+
```js
88+
startSpan({ name: 'example', scope: customScope }, () => {
89+
getCurrentScope().setTag('tag-a', 'a'); // this tag will only remain within the callback
90+
// set the tag directly on customScope in addition, if you want to to persist the tag outside of the callback
91+
customScope.setTag('tag-a', 'a');
92+
});
93+
```
9494

9595
### `@sentry/node`
9696

9797
- When `skipOpenTelemetrySetup: true` is configured, `httpIntegration({ spans: false })` will be configured by default.
9898

99-
This means that you no longer have to specify this yourself in this scenario. With this change, no spans are emitted once `skipOpenTelemetrySetup: true` is configured, without any further configuration being needed.
99+
This means that you no longer have to specify this yourself in this scenario. With this change, no spans are emitted once `skipOpenTelemetrySetup: true` is configured, without any further configuration being needed.
100100

101101
- The `requestDataIntegration` will no longer automatically set the user from `request.user`. This is an express-specific, undocumented behavior, and also conflicts with our privacy-by-default strategy. Starting in v9, you'll need to manually call `Sentry.setUser()` e.g. in a middleware to set the user on Sentry events.
102102

@@ -219,23 +219,23 @@ The following changes are unlikely to affect users of the SDK. They are listed h
219219

220220
- The options `tracingOptions`, `trackComponents`, `timeout`, `hooks` have been removed everywhere except in the `tracingOptions` option of `vueIntegration()`.
221221

222-
These options should now be set as follows:
222+
These options should now be set as follows:
223223

224-
```js
225-
import * as Sentry from '@sentry/vue';
224+
```js
225+
import * as Sentry from '@sentry/vue';
226226

227-
Sentry.init({
228-
integrations: [
229-
Sentry.vueIntegration({
230-
tracingOptions: {
231-
trackComponents: true,
232-
timeout: 1000,
233-
hooks: ['mount', 'update', 'unmount'],
234-
},
235-
}),
236-
],
237-
});
238-
```
227+
Sentry.init({
228+
integrations: [
229+
Sentry.vueIntegration({
230+
tracingOptions: {
231+
trackComponents: true,
232+
timeout: 1000,
233+
hooks: ['mount', 'update', 'unmount'],
234+
},
235+
}),
236+
],
237+
});
238+
```
239239

240240
- The option `logErrors` in the `vueIntegration` has been removed. The Sentry Vue error handler will propagate the error to a user-defined error handler
241241
or just re-throw the error (which will log the error without modifying).
@@ -255,13 +255,13 @@ Let us know if this is causing issues in your setup by opening an issue on GitHu
255255

256256
- The import of Sentry from the deno registry has changed. Use the `import * as Sentry from 'https://deno.land/x/sentry/build/index.mjs'` import instead.
257257

258-
```js
259-
// before
260-
import * as Sentry from 'https://deno.land/x/sentry/index.mjs';
258+
```js
259+
// before
260+
import * as Sentry from 'https://deno.land/x/sentry/index.mjs';
261261

262-
// after
263-
import * as Sentry from 'https://deno.land/x/sentry/build/index.mjs';
264-
```
262+
// after
263+
import * as Sentry from 'https://deno.land/x/sentry/build/index.mjs';
264+
```
265265

266266
## 6. Type Changes
267267

0 commit comments

Comments
 (0)