@@ -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
297297const hub = new Hub ();
298298hub .bindClient (client );
299- makeMain (hub)
299+ makeMain (hub );
300300```
301301
302302instead initialize the client as follows:
303303
304- ``` js
304+ ``` ts
305305// NEW
306306Sentry .withIsolationScope (() => {
307- Sentry .setCurrentClient (client);
308- client .init ();
307+ Sentry .setCurrentClient (client );
308+ client .init ();
309309});
310310```
311311
312312If you are using the Hub to capture events like so:
313313
314- ``` js
314+ ``` ts
315315// OLD
316316const client = new Client ();
317317const hub = new Hub (client );
318- hub .captureException ()
318+ hub .captureException ();
319319```
320320
321321instead capture isolated events as follows:
322322
323- ``` js
323+ ``` ts
324324// NEW
325325const client = new Client ();
326326const scope = new Scope ();
327327scope .setClient (client );
328328scope .captureException ();
329+ ```
330+
329331## Deprecate ` client.setupIntegrations() `
330332
331333Instead, 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