You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core)!: Always use session from isolation scope (#14860)
This PR ensures that we always take the session from the isolation
scope, never from the current scope.
This has the implication that we need to be sure to pass the isolation
scope to `_processEvent`, as this is where the session may be marked as
errored. For this, I updated the internal method `_processEvent` to take
the isolation scope as last argument, as well as streamlining this
slightly.
I opted to update the signature of the protected `_prepareEvent` method
too, and make currentScope/isolationScope required there. We already
always pass this in now, so it safes a few bytes to avoid the fallback
everywhere. This should not really affect users unless they overwrite
the `_processEvent` method, which is internal/private anyhow, so IMHO
this should be fine. I added a small note to the migration guide anyhow!
Copy file name to clipboardExpand all lines: docs/migration/v8-to-v9.md
+8-2
Original file line number
Diff line number
Diff line change
@@ -143,10 +143,14 @@ Sentry.init({
143
143
- The `flatten` export has been removed. There is no replacement.
144
144
- The `urlEncode` method has been removed. There is no replacement.
145
145
- The `getDomElement` method has been removed. There is no replacement.
146
-
- The `Request` type has been removed. Use `RequestEventData` type instead.
147
-
- The `TransactionNamingScheme` type has been removed. There is no replacement.
148
146
- The `memoBuilder` method has been removed. There is no replacement.
149
147
148
+
#### Other/Internal Changes
149
+
150
+
The following changes are unlikely to affect users of the SDK. They are listed here only for completion sake, and to alert users that may be relying on internal behavior.
151
+
152
+
-`client._prepareEvent()` now requires a currentScope & isolationScope to be passed as last arugments
153
+
150
154
### `@sentry/browser`
151
155
152
156
- The `captureUserFeedback` method has been removed. Use `captureFeedback` instead and update the `comments` field to `message`.
@@ -210,6 +214,8 @@ This led to some duplication, where we had to keep an interface in `@sentry/type
210
214
Since v9, the types have been merged into `@sentry/core`, which removed some of this duplication. This means that certain things that used to be a separate interface, will not expect an actual instance of the class/concrete implementation. This should not affect most users, unless you relied on passing things with a similar shape to internal methods. The following types are affected:
211
215
212
216
-`Scope` now always expects the `Scope` class
217
+
- The `TransactionNamingScheme` type has been removed. There is no replacement.
218
+
- The `Request` type has been removed. Use `RequestEventData` type instead.
213
219
- The `IntegrationClass` type is no longer exported - it was not used anymore. Instead, use `Integration` or `IntegrationFn`.
0 commit comments