|
8 | 8 |
|
9 | 9 | ## Unreleased |
10 | 10 |
|
11 | | -### Deprecated `@WithSentry` in `@sentry/nestjs` |
| 11 | +- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott |
12 | 12 |
|
13 | | -The `@WithSentry` decorator was deprecated. Use `@SentryExceptionCaptured` instead. This is a simple renaming and functionality stays identical. |
| 13 | +## 8.41.0 |
14 | 14 |
|
15 | | -- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott |
| 15 | +### Important Changes |
| 16 | + |
| 17 | +- **meta(nuxt): Require minimum Nuxt v3.7.0 ([#14473](https://github.com/getsentry/sentry-javascript/pull/14473))** |
| 18 | + |
| 19 | + We formalized that the Nuxt SDK is at minimum compatible with Nuxt version 3.7.0 and above. |
| 20 | + Additionally, the SDK requires the implicit `nitropack` dependency to satisfy version `^2.6.1` and `ofetch` to satisfy `^1.3.3`. |
| 21 | + It is recommended to check your lock-files and manually upgrade these dependencies if they don't match the version ranges. |
| 22 | + |
| 23 | +### Deprecations |
| 24 | + |
| 25 | +We are deprecating a few APIs which will be removed in the next major. |
| 26 | + |
| 27 | +The following deprecations will _potentially_ affect you: |
| 28 | + |
| 29 | +- **feat(core): Update & deprecate `undefined` option handling ([#14450](https://github.com/getsentry/sentry-javascript/pull/14450))** |
| 30 | + |
| 31 | + In the next major version we will change how passing `undefined` to `tracesSampleRate` / `tracesSampler` / `enableTracing` will behave. |
| 32 | + |
| 33 | + Currently, doing the following: |
| 34 | + |
| 35 | + ```ts |
| 36 | + Sentry.init({ |
| 37 | + tracesSampleRate: undefined, |
| 38 | + }); |
| 39 | + ``` |
| 40 | + |
| 41 | + Will result in tracing being _enabled_ (although no spans will be generated) because the `tracesSampleRate` key is present in the options object. |
| 42 | + In the next major version, this behavior will be changed so that passing `undefined` (or rather having a `tracesSampleRate` key) will result in tracing being disabled, the same as not passing the option at all. |
| 43 | + If you are currently relying on `undefined` being passed, and and thus have tracing enabled, it is recommended to update your config to set e.g. `tracesSampleRate: 0` instead, which will also enable tracing in v9. |
| 44 | + |
| 45 | + The same applies to `tracesSampler` and `enableTracing`. |
| 46 | + |
| 47 | +- **feat(core): Log warnings when returning `null` in `beforeSendSpan` ([#14433](https://github.com/getsentry/sentry-javascript/pull/14433))** |
| 48 | + |
| 49 | + Currently, the `beforeSendSpan` option in `Sentry.init()` allows you to drop individual spans from a trace by returning `null` from the hook. |
| 50 | + Since this API lends itself to creating "gaps" inside traces, we decided to change how this API will work in the next major version. |
| 51 | + |
| 52 | + With the next major version the `beforeSendSpan` API can only be used to mutate spans, but no longer to drop them. |
| 53 | + With this release the SDK will warn you if you are using this API to drop spans. |
| 54 | + Instead, it is recommended to configure instrumentation (i.e. integrations) directly to control what spans are created. |
| 55 | + |
| 56 | + Additionally, with the next major version, root spans will also be passed to `beforeSendSpan`. |
| 57 | + |
| 58 | +- **feat(utils): Deprecate `@sentry/utils` ([#14431](https://github.com/getsentry/sentry-javascript/pull/14431))** |
| 59 | + |
| 60 | + With the next major version the `@sentry/utils` package will be merged into the `@sentry/core` package. |
| 61 | + It is therefore no longer recommended to use the `@sentry/utils` package. |
| 62 | + |
| 63 | +- **feat(vue): Deprecate configuring Vue tracing options anywhere else other than through the `vueIntegration`'s `tracingOptions` option ([#14385](https://github.com/getsentry/sentry-javascript/pull/14385))** |
| 64 | + |
| 65 | + Currently it is possible to configure tracing options in various places in the Sentry Vue SDK: |
| 66 | + |
| 67 | + - In `Sentry.init()` |
| 68 | + - Inside `tracingOptions` in `Sentry.init()` |
| 69 | + - In the `vueIntegration()` options |
| 70 | + - Inside `tracingOptions` in the `vueIntegration()` options |
| 71 | + |
| 72 | + Because this is a bit messy and confusing to document, the only recommended way to configure tracing options going forward is through the `tracingOptions` in the `vueIntegration()`. |
| 73 | + The other means of configuration will be removed in the next major version of the SDK. |
| 74 | + |
| 75 | +- **feat: Deprecate `registerEsmLoaderHooks.include` and `registerEsmLoaderHooks.exclude` ([#14486](https://github.com/getsentry/sentry-javascript/pull/14486))** |
| 76 | + |
| 77 | + Currently it is possible to define `registerEsmLoaderHooks.include` and `registerEsmLoaderHooks.exclude` options in `Sentry.init()` to only apply ESM loader hooks to a subset of modules. |
| 78 | + This API served as an escape hatch in case certain modules are incompatible with ESM loader hooks. |
| 79 | + |
| 80 | + Since this API was introduced, a way was found to only wrap modules that there exists instrumentation for (meaning a vetted list). |
| 81 | + To only wrap modules that have instrumentation, it is recommended to instead set `registerEsmLoaderHooks.onlyIncludeInstrumentedModules` to `true`. |
| 82 | + |
| 83 | + Note that `onlyIncludeInstrumentedModules: true` will become the default behavior in the next major version and the `registerEsmLoaderHooks` will no longer accept fine-grained options. |
| 84 | + |
| 85 | +The following deprecations will _most likely_ not affect you unless you are building an SDK yourself: |
| 86 | + |
| 87 | +- feat(core): Deprecate `arrayify` ([#14405](https://github.com/getsentry/sentry-javascript/pull/14405)) |
| 88 | +- feat(core): Deprecate `flatten` ([#14454](https://github.com/getsentry/sentry-javascript/pull/14454)) |
| 89 | +- feat(core): Deprecate `urlEncode` ([#14406](https://github.com/getsentry/sentry-javascript/pull/14406)) |
| 90 | +- feat(core): Deprecate `validSeverityLevels` ([#14407](https://github.com/getsentry/sentry-javascript/pull/14407)) |
| 91 | +- feat(core/utils): Deprecate `getNumberOfUrlSegments` ([#14458](https://github.com/getsentry/sentry-javascript/pull/14458)) |
| 92 | +- feat(utils): Deprecate `memoBuilder`, `BAGGAGE_HEADER_NAME`, and `makeFifoCache` ([#14434](https://github.com/getsentry/sentry-javascript/pull/14434)) |
| 93 | +- feat(utils/core): Deprecate `addRequestDataToEvent` and `extractRequestData` ([#14430](https://github.com/getsentry/sentry-javascript/pull/14430)) |
| 94 | + |
| 95 | +### Other Changes |
| 96 | + |
| 97 | +- feat: Streamline `sentry-trace`, `baggage` and DSC handling ([#14364](https://github.com/getsentry/sentry-javascript/pull/14364)) |
| 98 | +- feat(core): Further optimize debug ID parsing ([#14365](https://github.com/getsentry/sentry-javascript/pull/14365)) |
| 99 | +- feat(node): Add `openTelemetryInstrumentations` option ([#14484](https://github.com/getsentry/sentry-javascript/pull/14484)) |
| 100 | +- feat(nuxt): Add filter for not found source maps (devtools) ([#14437](https://github.com/getsentry/sentry-javascript/pull/14437)) |
| 101 | +- feat(nuxt): Only delete public source maps ([#14438](https://github.com/getsentry/sentry-javascript/pull/14438)) |
| 102 | +- fix(nextjs): Don't report `NEXT_REDIRECT` from browser ([#14440](https://github.com/getsentry/sentry-javascript/pull/14440)) |
| 103 | +- perf(opentelemetry): Bucket spans for cleanup ([#14154](https://github.com/getsentry/sentry-javascript/pull/14154)) |
| 104 | + |
| 105 | +Work in this release was contributed by @NEKOYASAN and @fmorett. Thank you for your contributions! |
| 106 | + |
| 107 | +## 8.40.0 |
| 108 | + |
| 109 | +### Important Changes |
| 110 | + |
| 111 | +- **feat(angular): Support Angular 19 ([#14398](https://github.com/getsentry/sentry-javascript/pull/14398))** |
| 112 | + |
| 113 | + The `@sentry/angular` SDK can now be used with Angular 19. If you're upgrading to the new Angular version, you might want to migrate from the now deprecated `APP_INITIALIZER` token to `provideAppInitializer`. |
| 114 | + In this case, change the Sentry `TraceService` initialization in `app.config.ts`: |
| 115 | + |
| 116 | + ```ts |
| 117 | + // Angular 18 |
| 118 | + export const appConfig: ApplicationConfig = { |
| 119 | + providers: [ |
| 120 | + // other providers |
| 121 | + { |
| 122 | + provide: TraceService, |
| 123 | + deps: [Router], |
| 124 | + }, |
| 125 | + { |
| 126 | + provide: APP_INITIALIZER, |
| 127 | + useFactory: () => () => {}, |
| 128 | + deps: [TraceService], |
| 129 | + multi: true, |
| 130 | + }, |
| 131 | + ], |
| 132 | + }; |
| 133 | + |
| 134 | + // Angular 19 |
| 135 | + export const appConfig: ApplicationConfig = { |
| 136 | + providers: [ |
| 137 | + // other providers |
| 138 | + { |
| 139 | + provide: TraceService, |
| 140 | + deps: [Router], |
| 141 | + }, |
| 142 | + provideAppInitializer(() => { |
| 143 | + inject(TraceService); |
| 144 | + }), |
| 145 | + ], |
| 146 | + }; |
| 147 | + ``` |
| 148 | + |
| 149 | +- **feat(core): Deprecate `debugIntegration` and `sessionTimingIntegration` ([#14363](https://github.com/getsentry/sentry-javascript/pull/14363))** |
| 150 | + |
| 151 | + The `debugIntegration` was deprecated and will be removed in the next major version of the SDK. |
| 152 | + To log outgoing events, use [Hook Options](https://docs.sentry.io/platforms/javascript/configuration/options/#hooks) (`beforeSend`, `beforeSendTransaction`, ...). |
| 153 | + |
| 154 | + The `sessionTimingIntegration` was deprecated and will be removed in the next major version of the SDK. |
| 155 | + To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`). |
| 156 | + |
| 157 | +- **feat(nestjs): Deprecate `@WithSentry` in favor of `@SentryExceptionCaptured` ([#14323](https://github.com/getsentry/sentry-javascript/pull/14323))** |
| 158 | + |
| 159 | + The `@WithSentry` decorator was deprecated. Use `@SentryExceptionCaptured` instead. This is a simple renaming and functionality stays identical. |
| 160 | + |
| 161 | +- **feat(nestjs): Deprecate `SentryTracingInterceptor`, `SentryService`, `SentryGlobalGenericFilter`, `SentryGlobalGraphQLFilter` ([#14371](https://github.com/getsentry/sentry-javascript/pull/14371))** |
| 162 | + |
| 163 | + The `SentryTracingInterceptor` was deprecated. If you are using `@sentry/nestjs` you can safely remove any references to the `SentryTracingInterceptor`. If you are using another package migrate to `@sentry/nestjs` and remove the `SentryTracingInterceptor` afterwards. |
| 164 | + |
| 165 | + The `SentryService` was deprecated and its functionality was added to `Sentry.init`. If you are using `@sentry/nestjs` you can safely remove any references to the `SentryService`. If you are using another package migrate to `@sentry/nestjs` and remove the `SentryService` afterwards. |
| 166 | + |
| 167 | + The `SentryGlobalGenericFilter` was deprecated. Use the `SentryGlobalFilter` instead which is a drop-in replacement. |
| 168 | + |
| 169 | + The `SentryGlobalGraphQLFilter` was deprecated. Use the `SentryGlobalFilter` instead which is a drop-in replacement. |
| 170 | + |
| 171 | +- **feat(node): Deprecate `nestIntegration` and `setupNestErrorHandler` in favor of using `@sentry/nestjs` ([#14374](https://github.com/getsentry/sentry-javascript/pull/14374))** |
| 172 | + |
| 173 | + The `nestIntegration` and `setupNestErrorHandler` functions from `@sentry/node` were deprecated and will be removed in the next major version of the SDK. If you're using `@sentry/node` in a NestJS application, we recommend switching to our new dedicated `@sentry/nestjs` package. |
| 174 | + |
| 175 | +### Other Changes |
| 176 | + |
| 177 | +- feat(browser): Send additional LCP timing info ([#14372](https://github.com/getsentry/sentry-javascript/pull/14372)) |
| 178 | +- feat(replay): Clear event buffer when full and in buffer mode ([#14078](https://github.com/getsentry/sentry-javascript/pull/14078)) |
| 179 | +- feat(core): Ensure `normalizedRequest` on `sdkProcessingMetadata` is merged ([#14315](https://github.com/getsentry/sentry-javascript/pull/14315)) |
| 180 | +- feat(core): Hoist everything from `@sentry/utils` into `@sentry/core` ([#14382](https://github.com/getsentry/sentry-javascript/pull/14382)) |
| 181 | +- fix(core): Do not throw when trying to fill readonly properties ([#14402](https://github.com/getsentry/sentry-javascript/pull/14402)) |
| 182 | +- fix(feedback): Fix `__self` and `__source` attributes on feedback nodes ([#14356](https://github.com/getsentry/sentry-javascript/pull/14356)) |
| 183 | +- fix(feedback): Fix non-wrapping form title ([#14355](https://github.com/getsentry/sentry-javascript/pull/14355)) |
| 184 | +- fix(nextjs): Update check for not found navigation error ([#14378](https://github.com/getsentry/sentry-javascript/pull/14378)) |
16 | 185 |
|
17 | 186 | ## 8.39.0 |
18 | 187 |
|
|
0 commit comments