Skip to content

Commit 91c0b88

Browse files
committed
Merge remote-tracking branch 'origin/develop' into kunal/feat/support-suppressed-error
2 parents 1834d47 + 51c9ada commit 91c0b88

304 files changed

Lines changed: 4282 additions & 1198 deletions

File tree

Some content is hidden

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

‎.cursor/BUGBOT.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Keep reviews high-signal. Prefer actionable, high-confidence findings over specu
9393
- Flag usage of `expect.objectContaining` and other relaxed assertions, when a test expects something NOT to be included in a payload but there's no respective assertion.
9494
- Flag usage of conditionals in one test and recommend splitting up the test for the different paths.
9595
- Flag usage of loops testing multiple scenarios in one test and recommend using `(it)|(test).each` instead.
96+
- In `dev-packages/node-integration-tests/suites/`, flag tests that check the Node version or the runtime themselves, for example with `process.versions`, `process.env.RUNTIME`, `ctx.skip()`, or a version or runtime condition in `skipIf` / `runIf`. Recommend `test.runIf(supports({ ... }))` or `describe.runIf(supports({ ... }))` from `utils/index.ts` instead.
9697
- Apply the `@sentry/conventions` constants rule from above to test files too. Test assertions on span attributes and ops must use the constants, not string literals.
9798
- Flag tests that are likely to introduce flakes. In our case this usually means we wait for some telemetry requests sent from an SDK. Patterns to look out for:
9899
- Only waiting for a request, after an action is performed. Instead, start waiting, perform action, await request promise.

‎.github/workflows/build.yml‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,16 @@ jobs:
503503
if: github.event_name != 'pull_request'
504504

505505
job_bun_unit_tests:
506-
name: Bun Unit Tests
506+
name: Bun (${{ matrix.bun }}) Unit Tests
507507
needs: [job_get_metadata, job_build]
508508
if: needs.job_build.outputs.changed_bun == 'true' || github.event_name != 'pull_request'
509509
timeout-minutes: 10
510510
runs-on: ubuntu-24.04
511+
strategy:
512+
fail-fast: false
513+
matrix:
514+
# 1.3.14 is the oldest supported Bun version
515+
bun: ['1.3.14', '1.4']
511516
steps:
512517
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
513518
uses: actions/checkout@v7
@@ -520,7 +525,7 @@ jobs:
520525
- name: Set up Bun
521526
uses: oven-sh/setup-bun@v2
522527
with:
523-
bun-version: '1.3.14'
528+
bun-version: ${{ matrix.bun }}
524529
- name: Restore caches
525530
uses: ./.github/actions/restore-cache
526531
with:
@@ -904,14 +909,16 @@ jobs:
904909
run: yarn test
905910

906911
job_bun_integration_tests:
907-
name: Bun Integration Tests (${{ matrix.shard }}/2)
912+
name: Bun (${{ matrix.bun }}) Integration Tests (${{ matrix.shard }}/2)
908913
needs: [job_get_metadata, job_build]
909914
if: needs.job_build.outputs.changed_bun_integration == 'true' || github.event_name != 'pull_request'
910915
runs-on: ubuntu-24.04
911916
timeout-minutes: 15
912917
strategy:
913918
fail-fast: false
914919
matrix:
920+
# 1.3.14 is the oldest supported Bun version
921+
bun: ['1.3.14', '1.4']
915922
shard: [1, 2]
916923
steps:
917924
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -925,7 +932,7 @@ jobs:
925932
- name: Set up Bun
926933
uses: oven-sh/setup-bun@v2
927934
with:
928-
bun-version: '1.3.14'
935+
bun-version: ${{ matrix.bun }}
929936
- name: Restore caches
930937
uses: ./.github/actions/restore-cache
931938
with:

‎.version.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"_comment": "Auto-generated by scripts/bump-version.js. Used by the gitflow sync workflow to detect version bumps. Do not edit manually.",
3-
"version": "11.6.0"
3+
"version": "11.7.0"
44
}

‎CHANGELOG.md‎

Lines changed: 150 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,156 @@
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 @Philip-Nwabuwa. Thank you for your contribution!
7+
## 11.7.0
8+
9+
### Important Changes
10+
11+
- **feat(cloudflare): Add opt-in cron monitoring for Cron Triggers ([#25014](https://github.com/getsentry/sentry-javascript/pull/25014))**
12+
13+
The new `cronTriggersIntegration` sends check-ins for Cron Triggers. Each check-in includes the schedule from `controller.cron`, so Sentry creates the monitor on the first run. The integration is opt-in, because monitors are billed.
14+
15+
Cron Triggers have no names, so map each cron expression of your wrangler config to a monitor slug. With the Sentry Cloudflare Vite plugin, add the integration to `src/instrument.server.ts`:
16+
17+
```ts
18+
// src/monitorSlugs.ts
19+
export const monitorSlugs: Record<string, string> = {
20+
'30 9 * * MON-FRI': 'daily-report',
21+
};
22+
23+
// src/instrument.server.ts
24+
import * as Sentry from '@sentry/cloudflare';
25+
import { monitorSlugs } from './monitorSlugs';
26+
27+
export default Sentry.defineCloudflareOptions(env => ({
28+
dsn: env.SENTRY_DSN,
29+
integrations: [Sentry.cronTriggersIntegration({ monitorSlug: cron => monitorSlugs[cron] })],
30+
}));
31+
32+
// src/index.ts
33+
import { monitorSlugs } from './monitorSlugs';
34+
35+
export default {
36+
async scheduled(controller, env) {
37+
switch (monitorSlugs[controller.cron]) {
38+
case 'daily-report':
39+
// Your daily report job
40+
break;
41+
}
42+
},
43+
};
44+
```
45+
46+
The `monitorSlug` function can also return monitor settings, for example `{ monitorSlug: 'daily-report', maxRuntime: 30 }`, or `undefined` to send no check-ins for a trigger. Without `monitorSlug`, the SDK derives the slug from the cron expression. If you deploy with `wrangler` directly, pass the same integration to `Sentry.withSentry`.
47+
48+
- **feat(node): Add neonIntegration for @neondatabase/serverless ([#25164](https://github.com/getsentry/sentry-javascript/pull/25164), [#25176](https://github.com/getsentry/sentry-javascript/pull/25176))**
49+
50+
The new `neonIntegration` creates `db` spans for queries of the `@neondatabase/serverless` driver: for the WebSocket `Client` and `Pool`, and for the HTTP `neon()` function. This includes the `neon-http` and `neon-serverless` adapters of Drizzle. The integration is on by default when tracing is enabled.
51+
52+
- **feat(node): Stop sending the process session once request sessions are tracked ([#24915](https://github.com/getsentry/sentry-javascript/pull/24915))**
53+
54+
Node servers sent release health data two times: as request session aggregates, and as the process session of `processSessionIntegration`. An error in a request also marked the process session as errored, so the SDK counted the error two times. Now the SDK drops the process session when it tracks the first request session. Scripts, CLIs and workers that do not serve requests keep the process session, and so do servers with `httpServerIntegration({ sessions: false })`. This changes the release health numbers of Node servers, because they no longer send the errored or crashed update of the process session.
55+
56+
- **feat(server-utils): Record decide calls as `gen_ai.decide` spans ([#25270](https://github.com/getsentry/sentry-javascript/pull/25270), [#25272](https://github.com/getsentry/sentry-javascript/pull/25272), [#25274](https://github.com/getsentry/sentry-javascript/pull/25274), [#25281](https://github.com/getsentry/sentry-javascript/pull/25281))**
57+
58+
Vercel AI `experimental_decide` calls, Mastra classifier evaluations, TypeSafe and LangChain Jev calls, and Workers AI calls to TypeSafe Jev and Cloudflare Clef models now create `decide <model>` spans with the op `gen_ai.decide`. Before, these spans had the op `gen_ai.evaluate`, which is now deprecated in the Sentry conventions. If you use `gen_ai.evaluate` in queries, alerts or dashboards, change it to `gen_ai.decide`.
59+
60+
- **fix(browser): Apply `urlQueryParams` to more URLs ([#25262](https://github.com/getsentry/sentry-javascript/pull/25262), [#25289](https://github.com/getsentry/sentry-javascript/pull/25289))**
61+
62+
The `dataCollection.urlQueryParams` option now also filters the query parameters of these URLs:
63+
- the page URL in `event.request.url`
64+
- the `browser.*` and `resource.*` span names with `traceLifecycle: 'static'`
65+
- the LCP URL attributes `lcp.url` and `browser.web_vital.lcp.url`
66+
- the URLs in fetch, XHR and navigation breadcrumbs
67+
- the `ui.element.url` attribute of `elementTimingIntegration`
68+
69+
Before this fix, these URLs could send sensitive query values, for example `?jwt=...`, to Sentry.
70+
71+
- **fix(nextjs): Apply top-level `bundleSizeOptimizations` to webpack and Turbopack builds ([#24818](https://github.com/getsentry/sentry-javascript/pull/24818))**
72+
73+
The top-level `bundleSizeOptimizations` option now removes unused SDK code in webpack and in Turbopack builds. Before, the tree-shaking options had no effect on Turbopack. The `webpack.treeshake` option is deprecated. It still works, but when you set both options, `bundleSizeOptimizations` takes precedence.
74+
75+
### Other Changes
76+
77+
- feat(nuxt): Detect the server API with `@nuxt/kit` 4.6 ([#25138](https://github.com/getsentry/sentry-javascript/pull/25138))
78+
- fix(bundler-plugins): Escape JSON in generated injection code ([#25265](https://github.com/getsentry/sentry-javascript/pull/25265))
79+
- fix(core): Don't mark http client spans as errors when the caller aborts ([#25260](https://github.com/getsentry/sentry-javascript/pull/25260))
80+
- fix(core): Record `span` client report outcomes when discarding transactions ([#25006](https://github.com/getsentry/sentry-javascript/pull/25006))
81+
- fix(core): Record client outcomes when beforeSend callbacks return invalid values ([#25049](https://github.com/getsentry/sentry-javascript/pull/25049))
82+
- fix(core): Record span outcomes for spans dropped when building a transaction ([#25048](https://github.com/getsentry/sentry-javascript/pull/25048))
83+
- fix(core): Report actual item count in client reports of envelope send failures ([#25185](https://github.com/getsentry/sentry-javascript/pull/25185))
84+
- fix(core): Strip internal custom span name from streamed spans ([#25212](https://github.com/getsentry/sentry-javascript/pull/25212))
85+
- fix(nextjs): Filter query parameters in request error context ([#25233](https://github.com/getsentry/sentry-javascript/pull/25233))
86+
- fix(node): Don't mark fetch spans as errors when the caller aborts ([#25129](https://github.com/getsentry/sentry-javascript/pull/25129))
87+
- fix(nuxt): Delete public source maps before Nitro lists its public assets ([#25267](https://github.com/getsentry/sentry-javascript/pull/25267))
88+
- fix(nuxt): Keep `@sentry/server-runtime-injection` external on Nitro v3 ([#24901](https://github.com/getsentry/sentry-javascript/pull/24901))
89+
- fix(nuxt): Remove @opentelemetry/resources dev alias ([#25216](https://github.com/getsentry/sentry-javascript/pull/25216))
90+
- fix(profiling-node): Stop the trace lifecycle profiler when spans are unsampled ([#25210](https://github.com/getsentry/sentry-javascript/pull/25210))
91+
- fix(react-router): Respect custom default integrations ([#25259](https://github.com/getsentry/sentry-javascript/pull/25259))
92+
- fix(remix): Respect custom default integrations ([#25258](https://github.com/getsentry/sentry-javascript/pull/25258))
93+
- fix(server-utils): avoid quadratic SQL summary regex backtracking ([#25255](https://github.com/getsentry/sentry-javascript/pull/25255))
94+
- fix(server-utils): End Express layer spans when the client aborts ([#25209](https://github.com/getsentry/sentry-javascript/pull/25209))
95+
- fix(server-utils): Record amqplib consumer info before the first delivery and instrument the callback API ([#25047](https://github.com/getsentry/sentry-javascript/pull/25047))
96+
- fix(server-utils): Stop treating previous_response_id as the OpenAI conversation id ([#25269](https://github.com/getsentry/sentry-javascript/pull/25269))
97+
- fix(sveltekit): Read load event pathname untracked ([#25235](https://github.com/getsentry/sentry-javascript/pull/25235))
98+
- fix(sveltekit): Stop adapter-node 6 output dir probe from deleting the build ([#25193](https://github.com/getsentry/sentry-javascript/pull/25193))
99+
100+
<details>
101+
<summary> <strong>Internal Changes</strong> </summary>
102+
103+
- chore: Add external contributor to CHANGELOG.md ([#25230](https://github.com/getsentry/sentry-javascript/pull/25230))
104+
- chore: Add external contributor to CHANGELOG.md ([#25271](https://github.com/getsentry/sentry-javascript/pull/25271))
105+
- chore(deps-dev): Bump oxlint-tsgolint from 7.0.2001 to 7.0.2003 ([#25237](https://github.com/getsentry/sentry-javascript/pull/25237))
106+
- chore(deps-dev): Bump rimraf from 5.0.10 to 6.1.3 ([#25241](https://github.com/getsentry/sentry-javascript/pull/25241))
107+
- chore(deps): Bump `@sentry/conventions` to 0.27.0 ([#25264](https://github.com/getsentry/sentry-javascript/pull/25264))
108+
- chore(deps): Bump next from 16.2.11 to 16.3.8 in /dev-packages/e2e-tests/test-applications/nextjs-16 ([#25179](https://github.com/getsentry/sentry-javascript/pull/25179))
109+
- chore(deps): Bump next from 16.2.11 to 16.3.8 in /dev-packages/e2e-tests/test-applications/nextjs-16-tunnel ([#25190](https://github.com/getsentry/sentry-javascript/pull/25190))
110+
- chore(size-limit): weekly auto-bump ([#25213](https://github.com/getsentry/sentry-javascript/pull/25213))
111+
- ci: Install Playwright in the background during E2E app builds ([#25207](https://github.com/getsentry/sentry-javascript/pull/25207))
112+
- ci: Run lint steps in parallel ([#25187](https://github.com/getsentry/sentry-javascript/pull/25187))
113+
- ci(bun): Test the oldest supported Bun version and the newest 1.4 ([#25203](https://github.com/getsentry/sentry-javascript/pull/25203))
114+
- docs: Scope pre-PR tests to affected suites ([#25198](https://github.com/getsentry/sentry-javascript/pull/25198))
115+
- feat(deps): Bump @aws-sdk/client-kinesis from 3.1068.0 to 3.1146.0 ([#25240](https://github.com/getsentry/sentry-javascript/pull/25240))
116+
- feat(deps): Bump handlebars from 4.7.9 to 4.7.10 ([#25206](https://github.com/getsentry/sentry-javascript/pull/25206))
117+
- feat(deps): Bump pino from 9.10.0 to 10.4.0 ([#25238](https://github.com/getsentry/sentry-javascript/pull/25238))
118+
- feat(deps): Bump reflect-metadata from 0.2.1 to 0.2.2 ([#25239](https://github.com/getsentry/sentry-javascript/pull/25239))
119+
- ref(core): Simplify transport item loss recording ([#25224](https://github.com/getsentry/sentry-javascript/pull/25224))
120+
- ref(server-utils): Export the pg query span helpers ([#25163](https://github.com/getsentry/sentry-javascript/pull/25163))
121+
- ref(server-utils): Share Orchestrion channel context ([#25208](https://github.com/getsentry/sentry-javascript/pull/25208))
122+
- test(browser): migrate trace lifecycle and span API tests to streaming ([#24881](https://github.com/getsentry/sentry-javascript/pull/24881))
123+
- test(browser): port browser tracing suites to span streaming ([#24888](https://github.com/getsentry/sentry-javascript/pull/24888))
124+
- test(browser): port requests and web vitals to span streaming ([#24886](https://github.com/getsentry/sentry-javascript/pull/24886))
125+
- test(browser): Register the LCP handlers in the bundle of the SDK ([#25263](https://github.com/getsentry/sentry-javascript/pull/25263))
126+
- test(bun): Run the Node suites that need Bun 1.4 on the Bun 1.4 job ([#25204](https://github.com/getsentry/sentry-javascript/pull/25204))
127+
- test(cloudflare): Add LangChain TypeSafeClassifier integration test ([#25234](https://github.com/getsentry/sentry-javascript/pull/25234))
128+
- test(core): Fix flaky span end timestamp test ([#25211](https://github.com/getsentry/sentry-javascript/pull/25211))
129+
- test(deno): Type-check Deno unit tests ([#25227](https://github.com/getsentry/sentry-javascript/pull/25227))
130+
- test(nextjs): Add vinext e2e tests ([#25001](https://github.com/getsentry/sentry-javascript/pull/25001))
131+
- test(node-integration): Replace `conditionalTest` with a `supports` helper ([#25202](https://github.com/getsentry/sentry-javascript/pull/25202))
132+
- test(node-integration): Stop exporting `NODE_VERSION` and `RUNTIME` from the test utils ([#25292](https://github.com/getsentry/sentry-javascript/pull/25292))
133+
- test(node): Add integration tests for the Neon serverless driver ([#25177](https://github.com/getsentry/sentry-javascript/pull/25177))
134+
- test(node): Port baggage and metadata tests to span streaming ([#25220](https://github.com/getsentry/sentry-javascript/pull/25220))
135+
- test(node): Port basic and nested startSpan tests to streaming ([#25214](https://github.com/getsentry/sentry-javascript/pull/25214))
136+
- test(node): Port fetch request suites to span streaming ([#25189](https://github.com/getsentry/sentry-javascript/pull/25189))
137+
- test(node): Port HTTP options and hooks to span streaming ([#25195](https://github.com/getsentry/sentry-javascript/pull/25195))
138+
- test(node): Port HTTP propagation and transport suites to streaming ([#25197](https://github.com/getsentry/sentry-javascript/pull/25197))
139+
- test(node): Port HTTP request suites to span streaming ([#25191](https://github.com/getsentry/sentry-javascript/pull/25191))
140+
- test(node): Port incoming HTTP behavior to span streaming ([#25194](https://github.com/getsentry/sentry-javascript/pull/25194))
141+
- test(node): Port MongoDB integration tests to span streaming ([#25150](https://github.com/getsentry/sentry-javascript/pull/25150))
142+
- test(node): Port Mongoose integration tests to span streaming ([#25151](https://github.com/getsentry/sentry-javascript/pull/25151))
143+
- test(node): Port outgoing HTTP client spans to streaming ([#25192](https://github.com/getsentry/sentry-javascript/pull/25192))
144+
- test(node): Port parallel span and naming tests to streaming ([#25217](https://github.com/getsentry/sentry-javascript/pull/25217))
145+
- test(node): Port Postgres integration tests to span streaming ([#25140](https://github.com/getsentry/sentry-javascript/pull/25140))
146+
- test(node): Port Prisma integration tests to span streaming ([#25152](https://github.com/getsentry/sentry-javascript/pull/25152))
147+
- test(node): Port Redis integration tests to span streaming ([#25153](https://github.com/getsentry/sentry-javascript/pull/25153))
148+
- test(node): Port span linking and raw OTel tests to streaming ([#25219](https://github.com/getsentry/sentry-javascript/pull/25219))
149+
- test(node): Port trace context tests to span streaming ([#25218](https://github.com/getsentry/sentry-javascript/pull/25218))
150+
- test(node): Run sampling propagation tests with default streaming ([#25221](https://github.com/getsentry/sentry-javascript/pull/25221))
151+
- test(node): Use default streaming in scope and span suites ([#25222](https://github.com/getsentry/sentry-javascript/pull/25222))
152+
- test(nuxt): Test imports from `nuxt/server` in the nuxt-5 E2E app ([#25232](https://github.com/getsentry/sentry-javascript/pull/25232))
153+
154+
</details>
155+
156+
Work in this release was contributed by @Philip-Nwabuwa and @4ktLuffy. Thank you for your contributions!
8157

9158
## 11.6.0
10159

‎MIGRATION.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Version 11 of the Sentry SDK has new compatibility ranges for runtimes and frame
3737

3838
**Deno:** The minimum supported Deno version is now **2.8.3**.
3939

40+
**Bun:** The minimum supported Bun version is now **1.3.14**.
41+
4042
**Browsers:** Support for **Safari 14** was dropped. Sentry now requires Safari 15 or higher. For the rest of the browser support matrix, refer to the [Sentry docs](https://docs.sentry.io/platforms/javascript/#browser-support).
4143

4244
### TypeScript Version Policy

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "11.6.0",
3+
"version": "11.7.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -60,10 +60,10 @@
6060
"@babel/preset-typescript": "^7.16.7",
6161
"@playwright/test": "~1.63.0",
6262
"@sentry/rrweb": "2.44.1",
63-
"@sentry/browser": "11.6.0",
64-
"@sentry/replay": "11.6.0",
65-
"@sentry/opentelemetry": "11.6.0",
66-
"@sentry/conventions": "0.26.0",
63+
"@sentry/browser": "11.7.0",
64+
"@sentry/replay": "11.7.0",
65+
"@sentry/opentelemetry": "11.7.0",
66+
"@sentry/conventions": "0.27.0",
6767
"@supabase/supabase-js": "2.109.0",
6868
"axios": "1.20.0",
6969
"babel-loader": "^10.1.1",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fetch('http://sentry-test.io/foo?token=sensitive-token-value&page=1').then(() => {
2+
Sentry.captureException('test error');
3+
});

0 commit comments

Comments
 (0)