@@ -375,7 +375,7 @@ To make sure these integrations work properly you'll have to change how you
375375### General
376376
377377Removed top-level exports: ` tracingOrigins ` , ` MetricsAggregator ` , ` metricsAggregatorIntegration ` , ` Severity ` ,
378- ` Sentry.configureScope ` , ` Span ` , ` spanStatusfromHttpCode ` , ` makeMain ` , ` lastEventId ` , ` pushScope ` , ` popScope ` ,
378+ ` Sentry.configureScope ` , ` Span ` , ` spanStatusfromHttpCode ` , ` makeMain ` , ` pushScope ` , ` popScope ` ,
379379` addGlobalEventProcessor ` , ` timestampWithMs ` , ` addExtensionMethods ` , ` addGlobalEventProcessor ` , ` getActiveTransaction `
380380
381381Removed ` @sentry/utils ` exports: ` timestampWithMs ` , ` addOrUpdateIntegration ` , ` tracingContextFromHeaders ` , ` walk `
@@ -389,7 +389,6 @@ Removed `@sentry/utils` exports: `timestampWithMs`, `addOrUpdateIntegration`, `t
389389- [ Removal of ` Span ` class export from SDK packages] ( ./MIGRATION.md#removal-of-span-class-export-from-sdk-packages )
390390- [ Removal of ` spanStatusfromHttpCode ` in favour of ` getSpanStatusFromHttpCode ` ] ( ./MIGRATION.md#removal-of-spanstatusfromhttpcode-in-favour-of-getspanstatusfromhttpcode )
391391- [ Removal of ` addGlobalEventProcessor ` in favour of ` addEventProcessor ` ] ( ./MIGRATION.md#removal-of-addglobaleventprocessor-in-favour-of-addeventprocessor )
392- - [ Removal of ` lastEventId() ` method] ( ./MIGRATION.md#deprecate-lasteventid )
393392- [ Remove ` void ` from transport return types] ( ./MIGRATION.md#remove-void-from-transport-return-types )
394393- [ Remove ` addGlobalEventProcessor ` in favor of ` addEventProcessor ` ] ( ./MIGRATION.md#remove-addglobaleventprocessor-in-favor-of-addeventprocessor )
395394
@@ -568,10 +567,6 @@ Sentry.getGlobalScope().addEventProcessor(event => {
568567});
569568```
570569
571- #### Removal of ` lastEventId() ` method
572-
573- The ` lastEventId ` function has been removed. See [ below] ( ./MIGRATION.md#deprecate-lasteventid ) for more details.
574-
575570#### Removal of ` void ` from transport return types
576571
577572The ` send ` method on the ` Transport ` interface now always requires a ` TransportMakeRequestResponse ` to be returned in
@@ -1569,7 +1564,7 @@ If you are using the `Hub` right now, see the following table on how to migrate
15691564| captureException() | ` Sentry.captureException() ` |
15701565| captureMessage() | ` Sentry.captureMessage() ` |
15711566| captureEvent() | ` Sentry.captureEvent() ` |
1572- | lastEventId() | REMOVED - Use event processors or beforeSend instead |
1567+ | lastEventId() | ` Sentry.lastEventId() ` |
15731568| addBreadcrumb() | ` Sentry.addBreadcrumb() ` |
15741569| setUser() | ` Sentry.setUser() ` |
15751570| setTags() | ` Sentry.setTags() ` |
@@ -1690,35 +1685,6 @@ app.get('/your-route', req => {
16901685});
16911686```
16921687
1693- ## Deprecate ` Sentry.lastEventId() ` and ` hub.lastEventId() `
1694-
1695- ` Sentry.lastEventId() ` sometimes causes race conditions, so we are deprecating it in favour of the ` beforeSend `
1696- callback.
1697-
1698- ``` js
1699- // Before
1700- Sentry .init ({
1701- beforeSend (event , hint ) {
1702- const lastCapturedEventId = Sentry .lastEventId ();
1703-
1704- // Do something with `lastCapturedEventId` here
1705-
1706- return event ;
1707- },
1708- });
1709-
1710- // After
1711- Sentry .init ({
1712- beforeSend (event , hint ) {
1713- const lastCapturedEventId = event .event_id ;
1714-
1715- // Do something with `lastCapturedEventId` here
1716-
1717- return event ;
1718- },
1719- });
1720- ```
1721-
17221688## Deprecated fields on ` Span ` and ` Transaction `
17231689
17241690In v8, the Span class is heavily reworked. The following properties & methods are thus deprecated:
@@ -1786,25 +1752,6 @@ Instead, import this directly from `@sentry/utils`.
17861752Generally, in most cases you should probably use ` continueTrace ` instead, which abstracts this away from you and handles
17871753scope propagation for you.
17881754
1789- ## Deprecate ` lastEventId() `
1790-
1791- Instead, if you need the ID of a recently captured event, we recommend using ` beforeSend ` instead:
1792-
1793- ``` ts
1794- import * as Sentry from ' @sentry/browser' ;
1795-
1796- Sentry .init ({
1797- dsn: ' __DSN__' ,
1798- beforeSend(event , hint ) {
1799- const lastCapturedEventId = event .event_id ;
1800-
1801- // Do something with `lastCapturedEventId` here
1802-
1803- return event ;
1804- },
1805- });
1806- ```
1807-
18081755## Deprecate ` timestampWithMs ` export - #7878
18091756
18101757The ` timestampWithMs ` util is deprecated in favor of using ` timestampInSeconds ` .
0 commit comments