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
Copy file name to clipboardExpand all lines: docs/migration/v8-to-v9.md
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,16 @@ In v9, an `undefined` value will be treated the same as if the value is not defi
82
82
83
83
- The `getCurrentHub().getIntegration(IntegrationClass)` method will always return `null` in v9. This has already stopped working mostly in v8, because we stopped exposing integration classes. In v9, the fallback behavior has been removed. Note that this does not change the type signature and is thus not technically breaking, but still worth pointing out.
84
84
85
+
- The `startSpan` behavior was slightly changed if you pass a custom `scope` to the span start options: While in v8, the passed scope was set active directly on the passed scope, in v9, the scope is cloned. This behavior change does not apply to `@sentry/node` where the scope was already cloned. This change was made to ensure that the span only remains active within the callback and to align behavior between `@sentry/node` and all other SDKs. As a result of the change, your span hierarchy should be more accurate. However, be aware that modifying the scope (e.g. set tags) within the `startSpan` callback behaves a bit differently now.
getCurrentScope().setTag('tag-a', 'a'); // this tag will only remain within the callback
90
+
// set the tag directly on customScope in addition, if you want to to persist the tag outside of the callback
91
+
customScope.setTag('tag-a', 'a');
92
+
});
93
+
```
94
+
85
95
### `@sentry/node`
86
96
87
97
- When `skipOpenTelemetrySetup: true` is configured, `httpIntegration({ spans: false })` will be configured by default. This means that you no longer have to specify this yourself in this scenario. With this change, no spans are emitted once `skipOpenTelemetrySetup: true` is configured, without any further configuration being needed.
@@ -104,7 +114,7 @@ In v9, an `undefined` value will be treated the same as if the value is not defi
104
114
105
115
- By default, source maps will now be automatically deleted after being uploaded to Sentry for client-side builds. You can opt out of this behavior by explicitly setting `sourcemaps.deleteSourcemapsAfterUpload` to `false` in your Sentry config.
106
116
107
-
### All Meta-Framework SDKs (`@sentry/astro`, `@sentry/nuxt`)
117
+
### All Meta-Framework SDKs (`@sentry/astro`, `@sentry/nuxt`, `@sentry/solidstart`)
108
118
109
119
- Updated source map generation to respect the user-provided value of your build config, such as `vite.build.sourcemap`:
110
120
@@ -173,8 +183,9 @@ Sentry.init({
173
183
- The `getDomElement` method has been removed. There is no replacement.
174
184
- The `memoBuilder` method has been removed. There is no replacement.
175
185
- The `extractRequestData` method has been removed. Manually extract relevant data off request instead.
176
-
- The `addRequestDataToEvent` method has been removed. Use `addNormalizedRequestDataToEvent` instead.
186
+
- The `addRequestDataToEvent` method has been removed. Use `httpRequestToRequestData` instead and put the resulting object directly on `event.request`.
177
187
- The `extractPathForTransaction` method has been removed. There is no replacement.
188
+
- The `addNormalizedRequestDataToEvent` method has been removed. Use `httpRequestToRequestData` instead and put the resulting object directly on `event.request`.
178
189
179
190
#### Other/Internal Changes
180
191
@@ -252,8 +263,10 @@ Since v9, the types have been merged into `@sentry/core`, which removed some of
252
263
- The `Request` type has been removed. Use `RequestEventData` type instead.
253
264
- The `IntegrationClass` type is no longer exported - it was not used anymore. Instead, use `Integration` or `IntegrationFn`.
254
265
- The `samplingContext.request` attribute in the `tracesSampler` has been removed. Use `samplingContext.normalizedRequest` instead. Note that the type of `normalizedRequest` differs from `request`.
266
+
- The `samplingContext.transactionContext` object in the `tracesSampler` has been removed. All object attributes are available in the top-level of `samplingContext`.
255
267
-`Client` now always expects the `BaseClient` class - there is no more abstract `Client` that can be implemented! Any `Client` class has to extend from `BaseClient`.
256
268
-`ReportDialogOptions` now extends `Record<string, unknown>` instead of `Record<string, any>` - this should not affect most users.
269
+
- The `RequestDataIntegrationOptions` type has been removed. There is no replacement.
257
270
258
271
# No Version Support Timeline
259
272
@@ -307,7 +320,7 @@ The Sentry metrics beta has ended and the metrics API has been removed from the
307
320
- Deprecated `TransactionNamingScheme` type.
308
321
- Deprecated `validSeverityLevels`. Will not be replaced.
309
322
- Deprecated `urlEncode`. No replacements.
310
-
- Deprecated `addRequestDataToEvent`. Use `addNormalizedRequestDataToEvent` instead.
323
+
- Deprecated `addRequestDataToEvent`. Use `httpRequestToRequestData` instead and put the resulting object directly on `event.request`.
311
324
- Deprecated `extractRequestData`. Instead manually extract relevant data off request.
)}\` to delete generated source maps after they were uploaded to Sentry.`,
55
55
);
@@ -226,7 +226,7 @@ export function getUpdatedSourceMapSettings(
226
226
consoleSandbox(()=>{
227
227
// eslint-disable-next-line no-console
228
228
console.warn(
229
-
`[Sentry] Source map generation are currently disabled in your Astro configuration (\`${settingKey}: false\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\` (e.g. by setting them to \`hidden\`).`,
229
+
`[Sentry] Source map generation is currently disabled in your Astro configuration (\`${settingKey}: false\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\` (e.g. by setting them to \`hidden\`).`,
0 commit comments