@@ -256,7 +256,7 @@ If you are using the `Hub` right now, see the following table on how to migrate
256256| captureException() | ` Sentry.captureException() ` |
257257| captureMessage() | ` Sentry.captureMessage() ` |
258258| captureEvent() | ` Sentry.captureEvent() ` |
259- | lastEventId() | REMOVED - Use event processors or beforeSend instead |
259+ | lastEventId() | ` Sentry.lastEventId() ` |
260260| addBreadcrumb() | ` Sentry.addBreadcrumb() ` |
261261| setUser() | ` Sentry.setUser() ` |
262262| setTags() | ` Sentry.setTags() ` |
@@ -381,36 +381,6 @@ app.get('/your-route', req => {
381381});
382382```
383383
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-
414384## Deprecated fields on ` Span ` and ` Transaction `
415385
416386In 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`.
478448Generally, in most cases you should probably use ` continueTrace ` instead, which abstracts this away from you and handles
479449scope propagation for you.
480450
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-
500451## Deprecate ` timestampWithMs ` export - #7878
501452
502453The ` timestampWithMs ` util is deprecated in favor of using ` timestampInSeconds ` .
@@ -621,7 +572,7 @@ This is no longer used.
621572
622573## Deprecate @sentry/hub (since 7.15.0) - #5823
623574
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
625576` @sentry/core ` . ` @sentry/hub ` will be removed in the next major release.
626577
627578# Upgrading Sentry Replay (beta, 7.24.0)
0 commit comments