@@ -256,7 +256,7 @@ If you are using the `Hub` right now, see the following table on how to migrate
256
256
| captureException() | ` Sentry.captureException() ` |
257
257
| captureMessage() | ` Sentry.captureMessage() ` |
258
258
| captureEvent() | ` Sentry.captureEvent() ` |
259
- | lastEventId() | REMOVED - Use event processors or beforeSend instead |
259
+ | lastEventId() | ` Sentry.lastEventId() ` |
260
260
| addBreadcrumb() | ` Sentry.addBreadcrumb() ` |
261
261
| setUser() | ` Sentry.setUser() ` |
262
262
| setTags() | ` Sentry.setTags() ` |
@@ -381,36 +381,6 @@ app.get('/your-route', req => {
381
381
});
382
382
```
383
383
384
- ## Deprecate ` Sentry.lastEventId() ` and ` hub.lastEventId() `
385
-
386
- ` Sentry.lastEventId() ` sometimes causes race conditions, so we are deprecating it in favour of the ` beforeSend `
387
- callback.
388
-
389
- ``` js
390
- // Before
391
-
392
- Sentry .init ({
393
- beforeSend (event , hint ) {
394
- const lastCapturedEventId = Sentry .lastEventId ();
395
-
396
- // Do something with `lastCapturedEventId` here
397
-
398
- return event ;
399
- },
400
- });
401
-
402
- // After
403
- Sentry .init ({
404
- beforeSend (event , hint ) {
405
- const lastCapturedEventId = event .event_id ;
406
-
407
- // Do something with `lastCapturedEventId` here
408
-
409
- return event ;
410
- },
411
- });
412
- ```
413
-
414
384
## Deprecated fields on ` Span ` and ` Transaction `
415
385
416
386
In v8, the Span class is heavily reworked. The following properties & methods are thus deprecated:
@@ -478,25 +448,6 @@ Instead, import this directly from `@sentry/utils`.
478
448
Generally, in most cases you should probably use ` continueTrace ` instead, which abstracts this away from you and handles
479
449
scope propagation for you.
480
450
481
- ## Deprecate ` lastEventId() `
482
-
483
- Instead, if you need the ID of a recently captured event, we recommend using ` beforeSend ` instead:
484
-
485
- ``` ts
486
- import * as Sentry from ' @sentry/browser' ;
487
-
488
- Sentry .init ({
489
- dsn: ' __DSN__' ,
490
- beforeSend(event , hint ) {
491
- const lastCapturedEventId = event .event_id ;
492
-
493
- // Do something with `lastCapturedEventId` here
494
-
495
- return event ;
496
- },
497
- });
498
- ```
499
-
500
451
## Deprecate ` timestampWithMs ` export - #7878
501
452
502
453
The ` timestampWithMs ` util is deprecated in favor of using ` timestampInSeconds ` .
@@ -621,7 +572,7 @@ This is no longer used.
621
572
622
573
## Deprecate @sentry/hub (since 7.15.0) - #5823
623
574
624
- This release deprecates ` @sentry/hub ` and all of it's exports. All of the ` @sentry/hub ` exports have moved to
575
+ This release deprecates ` @sentry/hub ` and all of its exports. All of the ` @sentry/hub ` exports have moved to
625
576
` @sentry/core ` . ` @sentry/hub ` will be removed in the next major release.
626
577
627
578
# Upgrading Sentry Replay (beta, 7.24.0)
0 commit comments