Skip to content

Commit

Permalink
ref(javascript): Revert lastEventId removal (v8) and deprecation (v…
Browse files Browse the repository at this point in the history
…7) in migration docs (#10127)
  • Loading branch information
Lms24 authored and a-hariti committed Jun 8, 2024
1 parent ad54a9e commit 9c1aff5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
4 changes: 0 additions & 4 deletions includes/migration/javascript-v8/general-other-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ changes compared to the v7 where the property `framesToPop` was used to remove t

In `8.x`, we are no longer exporting the `Span` class from SDK packages. Internally, this class is now called `SentrySpan`, and it is no longer meant to be used by users directly.

### Removal of `lastEventId()` method

The `lastEventId` function has been removed. See [below](./MIGRATION.md#deprecate-lasteventid) for more details.

### Removal of `void` from transport return types

The `send` method on the `Transport` interface now always requires a `TransportMakeRequestResponse` to be returned in
Expand Down
22 changes: 0 additions & 22 deletions includes/migration/javascript-v8/v7-deprecation/general.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ If you are using the `Hub` right now, see the following table on how to migrate
| captureException() | `Sentry.captureException()` |
| captureMessage() | `Sentry.captureMessage()` |
| captureEvent() | `Sentry.captureEvent()` |
| lastEventId() | REMOVED - Use event processors or beforeSend instead |
| addBreadcrumb() | `Sentry.addBreadcrumb()` |
| setUser() | `Sentry.setUser()` |
| setTags() | `Sentry.setTags()` |
Expand Down Expand Up @@ -94,27 +93,6 @@ scope.setClient(client);
scope.captureException();
```

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

_Deprecation introduced in `7.93.0`._

Instead, if you need the ID of a recently captured event, we recommend using `beforeSend` instead:

```JavaScript
import * as Sentry from '@sentry/browser';

Sentry.init({
dsn: '__DSN__',
beforeSend(event, hint) {
const lastCapturedEventId = event.event_id;

// Do something with `lastCapturedEventId` here

return event;
},
});
```

### Deprecate `addGlobalEventProcessor` in favor of `addEventProcessor`

_Deprecation introduced in `7.85.0`._
Expand Down

0 comments on commit 9c1aff5

Please sign in to comment.