Skip to content

Commit f4f03c2

Browse files
committed
Merge branch 'develop' into sig/browserProfiling-newAPI
# Conflicts: # packages/browser/src/profiling/utils.ts
2 parents 537b852 + f664505 commit f4f03c2

File tree

485 files changed

+15642
-3254
lines changed

Some content is hidden

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

485 files changed

+15642
-3254
lines changed

.cursor/rules/publishing_release.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The release process is outlined in [publishing-a-release.md](mdc:docs/publishing
1414

1515
1. Make sure you are on the latest version of the `develop` branch. To confirm this, run `git pull origin develop` to get the latest changes from the repo.
1616
2. Run `yarn changelog` on the `develop` branch and copy the output. You can use `yarn changelog | pbcopy` to copy the output of `yarn changelog` into your clipboard.
17-
3. Decide on a version for the release based on [semver](mdc:https://semver.org). The version should be decided based on what is in included in the release. For example, if the release includes a new feature, we should increment the minor version. If it includes only bug fixes, we should increment the patch version.
17+
3. Decide on a version for the release based on [semver](mdc:https://semver.org). The version should be decided based on what is in included in the release. For example, if the release includes a new feature, we should increment the minor version. If it includes only bug fixes, we should increment the patch version. You can find the latest version in [CHANGELOG.md](mdc:CHANGELOG.md) at the very top.
1818
4. Create a branch `prepare-release/VERSION`, eg. `prepare-release/8.1.0`, off `develop`.
1919
5. Update [CHANGELOG.md](mdc:CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release from the output of `yarn changelog`. See the `Updating the Changelog` section in [publishing-a-release.md](mdc:docs/publishing-a-release.md) for more details. If you remove changelog entries because they are not applicable, please let the user know.
2020
6. Commit the changes to [CHANGELOG.md](mdc:CHANGELOG.md) with `meta(changelog): Update changelog for VERSION` where `VERSION` is the version of the release, e.g. `meta(changelog): Update changelog for 8.1.0`

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ body:
5151
- '@sentry/nestjs'
5252
- '@sentry/nextjs'
5353
- '@sentry/nuxt'
54-
- '@sentry/pino-transport'
5554
- '@sentry/react'
5655
- '@sentry/react-router'
5756
- '@sentry/remix'

.github/workflows/canary.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,8 @@ jobs:
7676
build-command: 'test:build-canary'
7777
label: 'create-react-app (canary)'
7878
- test-application: 'nextjs-app-dir'
79-
build-command: 'test:build-canary'
80-
label: 'nextjs-app-dir (canary)'
81-
- test-application: 'nextjs-app-dir'
82-
build-command: 'test:build-latest'
83-
label: 'nextjs-app-dir (latest)'
79+
build-command: 'test:build-15'
80+
label: 'nextjs-app-dir (next@15)'
8481
- test-application: 'nextjs-13'
8582
build-command: 'test:build-latest'
8683
label: 'nextjs-13 (latest)'
@@ -90,12 +87,15 @@ jobs:
9087
- test-application: 'nextjs-14'
9188
build-command: 'test:build-latest'
9289
label: 'nextjs-14 (latest)'
93-
- test-application: 'nextjs-15'
94-
build-command: 'test:build-canary'
95-
label: 'nextjs-15 (canary)'
9690
- test-application: 'nextjs-15'
9791
build-command: 'test:build-latest'
9892
label: 'nextjs-15 (latest)'
93+
- test-application: 'nextjs-16'
94+
build-command: 'test:build-canary'
95+
label: 'nextjs-16 (canary)'
96+
- test-application: 'nextjs-16'
97+
build-command: 'test:build-canary-webpack'
98+
label: 'nextjs-16 (canary-webpack)'
9999
- test-application: 'nextjs-turbo'
100100
build-command: 'test:build-canary'
101101
label: 'nextjs-turbo (canary)'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ packages/gatsby/gatsby-node.d.ts
6161
# intellij
6262
*.iml
6363
/**/.wrangler/*
64+
65+
#junit reports
66+
packages/**/*.junit.xml

.size-limit.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = [
3838
path: 'packages/browser/build/npm/esm/index.js',
3939
import: createImport('init', 'browserTracingIntegration'),
4040
gzip: true,
41-
limit: '40.7 KB',
41+
limit: '41 KB',
4242
},
4343
{
4444
name: '@sentry/browser (incl. Tracing, Profiling)',
@@ -82,14 +82,14 @@ module.exports = [
8282
path: 'packages/browser/build/npm/esm/index.js',
8383
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
8484
gzip: true,
85-
limit: '84 KB',
85+
limit: '85 KB',
8686
},
8787
{
8888
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
8989
path: 'packages/browser/build/npm/esm/index.js',
9090
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
9191
gzip: true,
92-
limit: '96 KB',
92+
limit: '97 KB',
9393
},
9494
{
9595
name: '@sentry/browser (incl. Feedback)',
@@ -103,14 +103,14 @@ module.exports = [
103103
path: 'packages/browser/build/npm/esm/index.js',
104104
import: createImport('init', 'sendFeedback'),
105105
gzip: true,
106-
limit: '29 KB',
106+
limit: '30 KB',
107107
},
108108
{
109109
name: '@sentry/browser (incl. FeedbackAsync)',
110110
path: 'packages/browser/build/npm/esm/index.js',
111111
import: createImport('init', 'feedbackAsyncIntegration'),
112112
gzip: true,
113-
limit: '34 KB',
113+
limit: '35 KB',
114114
},
115115
// React SDK (ESM)
116116
{
@@ -135,7 +135,7 @@ module.exports = [
135135
path: 'packages/vue/build/esm/index.js',
136136
import: createImport('init'),
137137
gzip: true,
138-
limit: '29 KB',
138+
limit: '30 KB',
139139
},
140140
{
141141
name: '@sentry/vue (incl. Tracing)',
@@ -157,13 +157,13 @@ module.exports = [
157157
name: 'CDN Bundle',
158158
path: createCDNPath('bundle.min.js'),
159159
gzip: true,
160-
limit: '26 KB',
160+
limit: '27 KB',
161161
},
162162
{
163163
name: 'CDN Bundle (incl. Tracing)',
164164
path: createCDNPath('bundle.tracing.min.js'),
165165
gzip: true,
166-
limit: '41 KB',
166+
limit: '42 KB',
167167
},
168168
{
169169
name: 'CDN Bundle (incl. Tracing, Replay)',
@@ -190,7 +190,7 @@ module.exports = [
190190
path: createCDNPath('bundle.tracing.min.js'),
191191
gzip: false,
192192
brotli: false,
193-
limit: '120 KB',
193+
limit: '124 KB',
194194
},
195195
{
196196
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
@@ -213,7 +213,7 @@ module.exports = [
213213
import: createImport('init'),
214214
ignore: ['next/router', 'next/constants'],
215215
gzip: true,
216-
limit: '45 KB',
216+
limit: '46 KB',
217217
},
218218
// SvelteKit SDK (ESM)
219219
{
@@ -222,7 +222,7 @@ module.exports = [
222222
import: createImport('init'),
223223
ignore: ['$app/stores'],
224224
gzip: true,
225-
limit: '41 KB',
225+
limit: '42 KB',
226226
},
227227
// Node-Core SDK (ESM)
228228
{

CHANGELOG.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,97 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
Work in this release was contributed by @0xbad0c0d3. Thank you for your contribution!
8+
9+
## 10.20.0
10+
11+
### Important Changes
12+
13+
- **feat(flags): Add Growthbook integration ([#17440](https://github.com/getsentry/sentry-javascript/pull/17440))**
14+
15+
Adds a new Growthbook integration for feature flag support.
16+
17+
- **feat(solid): Add support for TanStack Router Solid ([#17735](https://github.com/getsentry/sentry-javascript/pull/17735))**
18+
19+
Adds support for TanStack Router in the Solid SDK, enabling better routing instrumentation for Solid applications.
20+
21+
- **feat(nextjs): Support native debugIds in turbopack ([#17853](https://github.com/getsentry/sentry-javascript/pull/17853))**
22+
23+
Adds support for native Debug IDs in Turbopack, improving source map resolution and error tracking for Next.js applications using Turbopack. Native Debug ID generation will be enabled automatically for compatible versions.
24+
25+
### Other Changes
26+
27+
- feat(nextjs): Prepare for next 16 bundler default ([#17868](https://github.com/getsentry/sentry-javascript/pull/17868))
28+
- feat(node): Capture `pino` logger name ([#17930](https://github.com/getsentry/sentry-javascript/pull/17930))
29+
- fix(browser): Ignore React 19.2+ component render measure entries ([#17905](https://github.com/getsentry/sentry-javascript/pull/17905))
30+
- fix(nextjs): Fix createRouteManifest with basePath ([#17838](https://github.com/getsentry/sentry-javascript/pull/17838))
31+
- fix(react): Add `POP` guard for long-running `pageload` spans ([#17867](https://github.com/getsentry/sentry-javascript/pull/17867))
32+
- fix(tracemetrics): Send boolean for internal replay attribute ([#17908](https://github.com/getsentry/sentry-javascript/pull/17908))
33+
- ref(core): Add weight tracking logic to browser logs/metrics ([#17901](https://github.com/getsentry/sentry-javascript/pull/17901))
34+
35+
<details>
36+
<summary> <strong>Internal Changes</strong> </summary>
37+
- chore(nextjs): Add Next.js 16 peer dependency ([#17925](https://github.com/getsentry/sentry-javascript/pull/17925))
38+
- chore(ci): Update Next.js canary testing ([#17939](https://github.com/getsentry/sentry-javascript/pull/17939))
39+
- chore: Bump size limit ([#17941](https://github.com/getsentry/sentry-javascript/pull/17941))
40+
- test(nextjs): Add next@16 e2e test ([#17922](https://github.com/getsentry/sentry-javascript/pull/17922))
41+
- test(nextjs): Update next 15 tests ([#17919](https://github.com/getsentry/sentry-javascript/pull/17919))
42+
- chore: Add external contributor to CHANGELOG.md ([#17915](https://github.com/getsentry/sentry-javascript/pull/17915))
43+
- chore: Add external contributor to CHANGELOG.md ([#17928](https://github.com/getsentry/sentry-javascript/pull/17928))
44+
- chore: Add external contributor to CHANGELOG.md ([#17940](https://github.com/getsentry/sentry-javascript/pull/17940))
45+
</details>
46+
47+
Work in this release was contributed by @seoyeon9888, @madhuchavva and @thedanchez. Thank you for your contributions!
48+
49+
## 10.19.0
50+
51+
- feat(tracemetrics): Add trace metrics behind an experiments flag ([#17883](https://github.com/getsentry/sentry-javascript/pull/17883))
52+
53+
<details>
54+
<summary> <strong>Internal Changes</strong> </summary>
55+
56+
- chore: add info latest release for the cursor release command ([#17876](https://github.com/getsentry/sentry-javascript/pull/17876))
57+
58+
</details>
59+
60+
## 10.18.0
61+
62+
### Important Changes
63+
64+
- **feat(node): `pino` integration ([#17584](https://github.com/getsentry/sentry-javascript/pull/17584))**
65+
66+
This release adds a new `pino` integration for Node.js, enabling Sentry to capture logs from the Pino logging library.
67+
68+
- **feat: Remove @sentry/pino-transport package ([#17851](https://github.com/getsentry/sentry-javascript/pull/17851))**
69+
70+
The `@sentry/pino-transport` package has been removed. Please use the new `pino` integration in `@sentry/node` instead.
71+
72+
- **feat(node-core): Extend onnhandledrejection with ignore errors option ([#17736](https://github.com/getsentry/sentry-javascript/pull/17736))**
73+
74+
Added support for selectively suppressing specific errors with configurable logging control in onnhandledrejection integration.
75+
76+
### Other Changes
77+
78+
- feat(core): Rename vercelai.schema to gen_ai.request.schema ([#17850](https://github.com/getsentry/sentry-javascript/pull/17850))
79+
- feat(core): Support stream responses and tool calls for Google GenAI ([#17664](https://github.com/getsentry/sentry-javascript/pull/17664))
80+
- feat(nextjs): Attach headers using client hook ([#17831](https://github.com/getsentry/sentry-javascript/pull/17831))
81+
- fix(core): Keep all property values in baggage header ([#17847](https://github.com/getsentry/sentry-javascript/pull/17847))
82+
- fix(nestjs): Add support for Symbol as event name ([#17785](https://github.com/getsentry/sentry-javascript/pull/17785))
83+
- fix(nuxt): include `sentry.client.config.ts` in nuxt app types ([#17830](https://github.com/getsentry/sentry-javascript/pull/17830))
84+
- fix(react-router): Fix type for `OriginalHandleRequest` with middleware ([#17870](https://github.com/getsentry/sentry-javascript/pull/17870))
85+
86+
<details>
87+
<summary> <strong>Internal Changes</strong> </summary>
88+
89+
- chore: Add external contributor to CHANGELOG.md ([#17866](https://github.com/getsentry/sentry-javascript/pull/17866))
90+
- chore(deps): Bump @sentry/cli from 2.53.0 to 2.56.0 ([#17819](https://github.com/getsentry/sentry-javascript/pull/17819))
91+
- chore(deps): Bump axios in browser integration tests ([#17839](https://github.com/getsentry/sentry-javascript/pull/17839))
92+
- chore(deps): Bump nestjs in integration tests ([#17840](https://github.com/getsentry/sentry-javascript/pull/17840))
93+
94+
</details>
95+
96+
Work in this release was contributed by @stefanvanderwolf. Thank you for your contribution!
97+
798
## 10.17.0
899

9100
### Important Changes

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "10.17.0",
3+
"version": "10.20.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -43,9 +43,9 @@
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "~1.53.2",
4545
"@sentry-internal/rrweb": "2.34.0",
46-
"@sentry/browser": "10.17.0",
46+
"@sentry/browser": "10.20.0",
4747
"@supabase/supabase-js": "2.49.3",
48-
"axios": "1.8.2",
48+
"axios": "^1.12.2",
4949
"babel-loader": "^8.2.2",
5050
"fflate": "0.8.2",
5151
"html-webpack-plugin": "^5.5.0",
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import { expect } from '@playwright/test';
2+
import { _INTERNAL_FLAG_BUFFER_SIZE as FLAG_BUFFER_SIZE } from '@sentry/core';
3+
import { sentryTest } from '../../../../../../utils/fixtures';
4+
import {
5+
envelopeRequestParser,
6+
shouldSkipFeatureFlagsTest,
7+
waitForErrorRequest,
8+
} from '../../../../../../utils/helpers';
9+
10+
sentryTest('GrowthBook onError: basic eviction/update and no async tasks', async ({ getLocalTestUrl, page }) => {
11+
if (shouldSkipFeatureFlagsTest()) {
12+
sentryTest.skip();
13+
}
14+
15+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
16+
return route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ id: 'test-id' }) });
17+
});
18+
19+
const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true });
20+
await page.goto(url);
21+
22+
await page.evaluate(bufferSize => {
23+
const gb = new (window as any).GrowthBook();
24+
25+
for (let i = 1; i <= bufferSize; i++) {
26+
gb.isOn(`feat${i}`);
27+
}
28+
29+
gb.__setOn(`feat${bufferSize + 1}`, true);
30+
gb.isOn(`feat${bufferSize + 1}`); // eviction
31+
32+
gb.__setOn('feat3', true);
33+
gb.isOn('feat3'); // update
34+
35+
// Test getFeatureValue with boolean values (should be captured)
36+
gb.__setFeatureValue('bool-feat', true);
37+
gb.getFeatureValue('bool-feat', false);
38+
39+
// Test getFeatureValue with non-boolean values (should be ignored)
40+
gb.__setFeatureValue('string-feat', 'hello');
41+
gb.getFeatureValue('string-feat', 'default');
42+
gb.__setFeatureValue('number-feat', 42);
43+
gb.getFeatureValue('number-feat', 0);
44+
}, FLAG_BUFFER_SIZE);
45+
46+
const reqPromise = waitForErrorRequest(page);
47+
await page.locator('#error').click();
48+
const req = await reqPromise;
49+
const event = envelopeRequestParser(req);
50+
51+
const values = event.contexts?.flags?.values || [];
52+
53+
// After the sequence of operations:
54+
// 1. feat1-feat100 are added (100 items)
55+
// 2. feat101 is added, evicts feat1 (100 items: feat2-feat100, feat101)
56+
// 3. feat3 is updated to true, moves to end (100 items: feat2, feat4-feat100, feat101, feat3)
57+
// 4. bool-feat is added, evicts feat2 (100 items: feat4-feat100, feat101, feat3, bool-feat)
58+
59+
const expectedFlags = [];
60+
for (let i = 4; i <= FLAG_BUFFER_SIZE; i++) {
61+
expectedFlags.push({ flag: `feat${i}`, result: false });
62+
}
63+
expectedFlags.push({ flag: `feat${FLAG_BUFFER_SIZE + 1}`, result: true });
64+
expectedFlags.push({ flag: 'feat3', result: true });
65+
expectedFlags.push({ flag: 'bool-feat', result: true }); // Only boolean getFeatureValue should be captured
66+
67+
expect(values).toEqual(expectedFlags);
68+
});
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
// Minimal mock GrowthBook class for tests
4+
window.GrowthBook = class {
5+
constructor() {
6+
this._onFlags = Object.create(null);
7+
this._featureValues = Object.create(null);
8+
}
9+
10+
isOn(featureKey) {
11+
return !!this._onFlags[featureKey];
12+
}
13+
14+
getFeatureValue(featureKey, defaultValue) {
15+
return Object.prototype.hasOwnProperty.call(this._featureValues, featureKey)
16+
? this._featureValues[featureKey]
17+
: defaultValue;
18+
}
19+
20+
// Helpers for tests
21+
__setOn(featureKey, value) {
22+
this._onFlags[featureKey] = !!value;
23+
}
24+
25+
__setFeatureValue(featureKey, value) {
26+
this._featureValues[featureKey] = value;
27+
}
28+
};
29+
30+
window.Sentry = Sentry;
31+
window.sentryGrowthBookIntegration = Sentry.growthbookIntegration({ growthbookClass: window.GrowthBook });
32+
33+
Sentry.init({
34+
dsn: 'https://[email protected]/1337',
35+
sampleRate: 1.0,
36+
integrations: [window.sentryGrowthBookIntegration],
37+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
document.getElementById('error').addEventListener('click', () => {
2+
throw new Error('Button triggered error');
3+
});

0 commit comments

Comments
 (0)