@@ -10,6 +10,33 @@ npx @sentry/migr8@latest
1010This will let you select which updates to run, and automatically update your code. Make sure to still review all code
1111changes!
1212
13+ ## Deprecate ` getCurrentHub() `
14+
15+ In v8, you will no longer have a Hub, only Scopes as a concept. This also means that ` getCurrentHub() ` will eventually
16+ be removed.
17+
18+ Instead of ` getCurrentHub() ` , use the respective replacement API directly - see [ Deprecate Hub] ( #deprecate-hub ) for
19+ details.
20+
21+ ## Deprecate class-based integrations
22+
23+ In v7, integrations are classes and can be added as e.g. ` integrations: [new Sentry.Integrations.ContextLines()] ` . In
24+ v8, integrations will not be classes anymore, but instead functions. Both the use as a class, as well as accessing
25+ integrations from the ` Integrations.XXX ` hash, is deprecated in favor of using the new functional integrations
26+
27+ - for example, ` new Integrations.LinkedErrors() ` becomes ` linkedErrorsIntegration() ` .
28+
29+ The following list shows how integrations should be migrated:
30+
31+ | Old | New | Packages |
32+ | ------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------- |
33+ | ` new InboundFilters() ` | ` inboundFiltersIntegration() ` | ` @sentry/core ` , ` @sentry/browser ` , ` @sentry/node ` , ` @sentry/deno ` , ` @sentry/bun ` , ` @sentry/vercel-edge ` |
34+ | ` new FunctionToString() ` | ` functionToStringIntegration() ` | ` @sentry/core ` , ` @sentry/browser ` , ` @sentry/node ` , ` @sentry/deno ` , ` @sentry/bun ` , ` @sentry/vercel-edge ` |
35+ | ` new LinkedErrors() ` | ` linkedErrorsIntegration() ` | ` @sentry/core ` , ` @sentry/browser ` , ` @sentry/node ` , ` @sentry/deno ` , ` @sentry/bun ` , ` @sentry/vercel-edge ` |
36+ | ` new ModuleMetadata() ` | ` moduleMetadataIntegration() ` | ` @sentry/core ` , ` @sentry/browser ` |
37+ | ` new RequestData() ` | ` requestDataIntegration() ` | ` @sentry/core ` , ` @sentry/node ` , ` @sentry/deno ` , ` @sentry/bun ` , ` @sentry/vercel-edge ` |
38+ | ` new Wasm() ` | ` wasmIntegration() ` | ` @sentry/wasm ` |
39+
1340## Deprecate ` hub.bindClient() ` and ` makeMain() `
1441
1542Instead, either directly use ` initAndBind() ` , or the new APIs ` setCurrentClient() ` and ` client.init() ` . See
@@ -54,7 +81,7 @@ If you are using the `Hub` right now, see the following table on how to migrate
5481| ---------------------- | ------------------------------------------------------------------------------------ |
5582| ` new Hub() ` | ` withScope() ` , ` withIsolationScope() ` or ` new Scope() ` |
5683| hub.isOlderThan() | REMOVED - Was used to compare ` Hub ` instances, which are gonna be removed |
57- | hub.bindClient() | A combination of ` scope.setClient() ` and ` client.setupIntegrations () ` |
84+ | hub.bindClient() | A combination of ` scope.setClient() ` and ` client.init () ` |
5885| hub.pushScope() | ` Sentry.withScope() ` |
5986| hub.popScope() | ` Sentry.withScope() ` |
6087| hub.withScope() | ` Sentry.withScope() ` |
@@ -167,6 +194,7 @@ In v8, the Span class is heavily reworked. The following properties & methods ar
167194- ` span.getTraceContext() ` : Use ` spanToTraceContext(span) ` utility function instead.
168195- ` span.sampled ` : Use ` span.isRecording() ` instead.
169196- ` span.spanId ` : Use ` span.spanContext().spanId ` instead.
197+ - ` span.parentSpanId ` : Use ` spanToJSON(span).parent_span_id ` instead.
170198- ` span.traceId ` : Use ` span.spanContext().traceId ` instead.
171199- ` span.name ` : Use ` spanToJSON(span).description ` instead.
172200- ` span.description ` : Use ` spanToJSON(span).description ` instead.
@@ -178,6 +206,9 @@ In v8, the Span class is heavily reworked. The following properties & methods ar
178206- ` span.instrumenter ` This field was removed and will be replaced internally.
179207- ` span.transaction ` : Use ` getRootSpan ` utility function instead.
180208- ` span.spanRecorder ` : Span recording will be handled internally by the SDK.
209+ - ` span.status ` : Use ` .setStatus ` to set or update and ` spanToJSON() ` to read the span status.
210+ - ` span.op ` : Use ` startSpan ` functions to set, ` setAttribute() ` to update and ` spanToJSON ` to read the span operation.
211+ - ` span.isSuccess ` : Use ` spanToJSON(span).status === 'ok' ` instead.
181212- ` transaction.setMetadata() ` : Use attributes instead, or set data on the scope.
182213- ` transaction.metadata ` : Use attributes instead, or set data on the scope.
183214- ` transaction.setContext() ` : Set context on the surrounding scope instead.
0 commit comments