Skip to content

Commit 22af519

Browse files
committed
lint
1 parent 0da68e6 commit 22af519

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

MIGRATION.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -289,43 +289,45 @@ If you are using the `Hub` right now, see the following table on how to migrate
289289
| endSession() | `Sentry.endSession()` |
290290
| shouldSendDefaultPii() | REMOVED - The closest equivalent is `Sentry.getClient().getOptions().sendDefaultPii` |
291291

292-
The `Hub` constructor is also deprecated and will be removed in the next major version. If you are creating
293-
Hubs for multi-client use like so:
292+
The `Hub` constructor is also deprecated and will be removed in the next major version. If you are creating Hubs for
293+
multi-client use like so:
294294

295-
```js
295+
```ts
296296
// OLD
297297
const hub = new Hub();
298298
hub.bindClient(client);
299-
makeMain(hub)
299+
makeMain(hub);
300300
```
301301

302302
instead initialize the client as follows:
303303

304-
```js
304+
```ts
305305
// NEW
306306
Sentry.withIsolationScope(() => {
307-
Sentry.setCurrentClient(client);
308-
client.init();
307+
Sentry.setCurrentClient(client);
308+
client.init();
309309
});
310310
```
311311

312312
If you are using the Hub to capture events like so:
313313

314-
```js
314+
```ts
315315
// OLD
316316
const client = new Client();
317317
const hub = new Hub(client);
318-
hub.captureException()
318+
hub.captureException();
319319
```
320320

321321
instead capture isolated events as follows:
322322

323-
```js
323+
```ts
324324
// NEW
325325
const client = new Client();
326326
const scope = new Scope();
327327
scope.setClient(client);
328328
scope.captureException();
329+
```
330+
329331
## Deprecate `client.setupIntegrations()`
330332

331333
Instead, use the new `client.init()` method. You should probably not use this directly and instead use `Sentry.init()`,
@@ -392,7 +394,7 @@ app.get('/your-route', req => {
392394
);
393395
});
394396
});
395-
````
397+
```
396398

397399
## Deprecate `Sentry.lastEventId()` and `hub.lastEventId()`
398400

0 commit comments

Comments
 (0)