Skip to content

Commit 8be7d99

Browse files
committed
Merge branch 'develop' into aliu/launch-darkly-integration
2 parents 049e312 + ecc91bc commit 8be7d99

File tree

1,118 files changed

+9514
-5385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,118 files changed

+9514
-5385
lines changed

.craft.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ targets:
55
# NPM Targets
66
## 1. Base Packages, node or browser SDKs depend on
77
## 1.1 Types
8+
# TODO(v9): Remove
89
- name: npm
910
id: '@sentry/types'
1011
includeNames: /^sentry-types-\d.*\.tgz$/
1112
## 1.2 Utils
13+
# TODO(v9): Remove
1214
- name: npm
1315
id: '@sentry/utils'
1416
includeNames: /^sentry-utils-\d.*\.tgz$/

.github/dependency-review-config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
fail-on-severity: 'high'
22
allow-ghsas:
33
# dependency review does not allow specific file exclusions
4-
# we use an older version of NextJS in our tests and thus need to
4+
# we use an older version of NextJS in our tests and thus need to
55
# exclude this
66
# once our minimum supported version is over 14.1.1 this can be removed
77
- GHSA-fr5h-rqp8-mj6g
8+
# we need this for an E2E test for the minimum required version of Nuxt 3.7.0
9+
- GHSA-v784-fjjh-f8r4

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ jobs:
387387
if: github.event_name != 'pull_request'
388388

389389
- name: Compute test coverage
390-
uses: codecov/codecov-action@v4
390+
uses: codecov/codecov-action@v5
391391
with:
392392
token: ${{ secrets.CODECOV_TOKEN }}
393393

@@ -491,7 +491,7 @@ jobs:
491491
NODE_VERSION: ${{ matrix.node }}
492492

493493
- name: Compute test coverage
494-
uses: codecov/codecov-action@v4
494+
uses: codecov/codecov-action@v5
495495
with:
496496
token: ${{ secrets.CODECOV_TOKEN }}
497497

@@ -795,7 +795,8 @@ jobs:
795795
# - The build job was successful, not skipped
796796
# - AND if the profiling node bindings were either successful or skipped
797797
if: |
798-
always() && needs.job_build.result == 'success' &&
798+
always() &&
799+
needs.job_build.result == 'success' &&
799800
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped')
800801
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
801802
runs-on: ubuntu-20.04-large-js
@@ -981,13 +982,16 @@ jobs:
981982
directory: dev-packages/e2e-tests
982983
token: ${{ secrets.CODECOV_TOKEN }}
983984

985+
# - We skip optional tests on release branches
984986
job_optional_e2e_tests:
985987
name: E2E ${{ matrix.label || matrix.test-application }} Test
986988
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
987989
# We need to add the `always()` check here because the previous step has this as well :(
988990
# See: https://github.com/actions/runner/issues/2205
989991
if:
990-
always() && needs.job_e2e_prepare.result == 'success' &&
992+
always() &&
993+
needs.job_get_metadata.outputs.is_release != 'true' &&
994+
needs.job_e2e_prepare.result == 'success' &&
991995
needs.job_e2e_prepare.outputs.matrix-optional != '{"include":[]}' &&
992996
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
993997
github.actor != 'dependabot[bot]'

.github/workflows/canary.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ env:
1414

1515
CACHED_BUILD_PATHS: |
1616
${{ github.workspace }}/packages/*/*.tgz
17-
${{ github.workspace }}/dev-packages/test-utils/build
1817
${{ github.workspace }}/node_modules
1918
${{ github.workspace }}/packages/*/node_modules
2019
${{ github.workspace }}/dev-packages/*/node_modules
21-
${{ github.workspace }}/packages/utils/build
20+
${{ github.workspace }}/dev-packages/*/build
21+
${{ github.workspace }}/packages/*/build
2222
2323
permissions:
2424
contents: read

.size-limit.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = [
4040
path: 'packages/browser/build/npm/esm/index.js',
4141
import: createImport('init', 'browserTracingIntegration'),
4242
gzip: true,
43-
limit: '36.5 KB',
43+
limit: '37.5 KB',
4444
},
4545
{
4646
name: '@sentry/browser (incl. Tracing, Replay)',
@@ -124,22 +124,22 @@ module.exports = [
124124
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
125125
ignore: ['react/jsx-runtime'],
126126
gzip: true,
127-
limit: '39.5 KB',
127+
limit: '40.5 KB',
128128
},
129129
// Vue SDK (ESM)
130130
{
131131
name: '@sentry/vue',
132132
path: 'packages/vue/build/esm/index.js',
133133
import: createImport('init'),
134134
gzip: true,
135-
limit: '28 KB',
135+
limit: '29 KB',
136136
},
137137
{
138138
name: '@sentry/vue (incl. Tracing)',
139139
path: 'packages/vue/build/esm/index.js',
140140
import: createImport('init', 'browserTracingIntegration'),
141141
gzip: true,
142-
limit: '38.5 KB',
142+
limit: '39.5 KB',
143143
},
144144
// Svelte SDK (ESM)
145145
{
@@ -187,7 +187,7 @@ module.exports = [
187187
path: createCDNPath('bundle.tracing.min.js'),
188188
gzip: false,
189189
brotli: false,
190-
limit: '113 KB',
190+
limit: '120 KB',
191191
},
192192
{
193193
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
@@ -219,7 +219,7 @@ module.exports = [
219219
import: createImport('init'),
220220
ignore: ['$app/stores'],
221221
gzip: true,
222-
limit: '37 KB',
222+
limit: '38 KB',
223223
},
224224
// Node SDK (ESM)
225225
{

CHANGELOG.md

Lines changed: 172 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,180 @@
88
99
## Unreleased
1010

11-
### Deprecated `@WithSentry` in `@sentry/nestjs`
11+
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
1212

13-
The `@WithSentry` decorator was deprecated. Use `@SentryExceptionCaptured` instead. This is a simple renaming and functionality stays identical.
13+
## 8.41.0
1414

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.10.0` and `ofetch` to satisfy `^1.4.0`.
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))
16185

17186
## 8.39.0
18187

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ below:
111111
Provides the integration for Session Replay.
112112
- [`@sentry/core`](https://github.com/getsentry/sentry-javascript/tree/master/packages/core): The base for all
113113
JavaScript SDKs with interfaces, type definitions and base classes.
114-
- [`@sentry/utils`](https://github.com/getsentry/sentry-javascript/tree/master/packages/utils): A set of helpers and
115-
utility functions useful for various SDKs.
116-
- [`@sentry/types`](https://github.com/getsentry/sentry-javascript/tree/master/packages/types): Types used in all
117-
packages.
118114

119115
## Bug Bounty Program
120116

biome.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
"angular.json",
4545
"ember/instance-initializers/**",
4646
"ember/types.d.ts",
47+
"solidstart/*.d.ts",
48+
"solidstart/client/",
49+
"solidstart/server/",
4750
".output",
4851
".vinxi"
4952
]

dev-packages/browser-integration-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "8.39.0",
3+
"version": "8.41.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -43,7 +43,7 @@
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "^1.44.1",
4545
"@sentry-internal/rrweb": "2.29.0",
46-
"@sentry/browser": "8.39.0",
46+
"@sentry/browser": "8.41.0",
4747
"axios": "1.7.7",
4848
"babel-loader": "^8.2.2",
4949
"html-webpack-plugin": "^5.5.0",

dev-packages/browser-integration-tests/suites/feedback/attachTo/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sentryTest('should capture feedback with custom button', async ({ getLocalTestUr
2323
}
2424
});
2525

26-
const url = await getLocalTestUrl({ testDir: __dirname });
26+
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });
2727

2828
await page.goto(url);
2929
await page.locator('#custom-feedback-button').click();

0 commit comments

Comments
 (0)