Skip to content

Commit 007363d

Browse files
authored
Merge branch 'develop' into anthropic-integration
2 parents bfbef7f + 5ee2597 commit 007363d

File tree

237 files changed

+5369
-1607
lines changed

Some content is hidden

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

237 files changed

+5369
-1607
lines changed

.cursor/BUGBOT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ Do not flag the issues below if they appear in tests.
4040
- If there's no direct span that's wrapping the captured exception, apply a proper `type` value, following the same naming
4141
convention as the `SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN` value.
4242
- When calling `startSpan`, check if error cases are handled. If flag that it might make sense to try/catch and call `captureException`.
43+
- When calling `generateInstrumentationOnce`, the passed in name MUST match the name of the integration that uses it. If there are more than one instrumentations, they need to follow the pattern `${INSTRUMENTATION_NAME}.some-suffix`.

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,12 @@ jobs:
910910
- name: Set up Bun
911911
if: matrix.test-application == 'node-exports-test-app'
912912
uses: oven-sh/setup-bun@v2
913+
- name: Set up AWS SAM
914+
if: matrix.test-application == 'aws-serverless'
915+
uses: aws-actions/setup-sam@v2
916+
with:
917+
use-installer: true
918+
token: ${{ secrets.GITHUB_TOKEN }}
913919
- name: Restore caches
914920
uses: ./.github/actions/restore-cache
915921
with:

CHANGELOG.md

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

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

7+
## 10.5.0
8+
9+
- feat(core): better cause data extraction ([#17375](https://github.com/getsentry/sentry-javascript/pull/17375))
10+
- feat(deps): Bump @sentry/cli from 2.50.2 to 2.51.1 ([#17382](https://github.com/getsentry/sentry-javascript/pull/17382))
11+
- feat(deps): Bump @sentry/rollup-plugin and @sentry/vite-plugin from 4.0.2 to 4.1.0 ([#17383](https://github.com/getsentry/sentry-javascript/pull/17383))
12+
- feat(deps): Bump @sentry/webpack-plugin from 4.0.2 to 4.1.0 ([#17381](https://github.com/getsentry/sentry-javascript/pull/17381))
13+
- feat(node): Capture `SystemError` context and remove paths from message ([#17331](https://github.com/getsentry/sentry-javascript/pull/17331))
14+
- fix(nextjs): Inject Next.js version for dev symbolication ([#17379](https://github.com/getsentry/sentry-javascript/pull/17379))
15+
- fix(mcp-server): Add defensive patches for Transport edge cases ([#17291](https://github.com/getsentry/sentry-javascript/pull/17291))
16+
17+
<details>
18+
<summary> <strong>Internal Changes</strong> </summary>
19+
20+
- chore(repo): Adjust "Publishing a Release" document to include internal changes section in changelog ([#17374](https://github.com/getsentry/sentry-javascript/pull/17374))
21+
- test(aws): Run E2E tests with AWS SAM ([#17367](https://github.com/getsentry/sentry-javascript/pull/17367))
22+
- test(node): Add tests for full http.server span attribute coverage ([#17373](https://github.com/getsentry/sentry-javascript/pull/17373))
23+
24+
</details>
25+
26+
Work in this release was contributed by @ha1fstack. Thank you for your contribution!
27+
28+
## 10.4.0
29+
30+
### Important Changes
31+
32+
- **fix(browser): Ensure IP address is only inferred by Relay if `sendDefaultPii` is `true`**
33+
34+
This release includes a fix for a [behaviour change](https://docs.sentry.io/platforms/javascript/migration/v8-to-v9/#behavior-changes)
35+
that was originally introduced with v9 of the SDK: User IP Addresses should only be added to Sentry events automatically,
36+
if `sendDefaultPii` was set to `true`.
37+
38+
However, the change in v9 required further internal adjustment, which should have been included in v10 of the SDK.
39+
Unfortunately, the change did not make it into the initial v10 version but is now applied with `10.4.0`.
40+
There is _no API_ breakage involved and hence it is safe to update.
41+
However, after updating the SDK, events (errors, traces, replays, etc.) sent from the browser, will only include
42+
user IP addresses, if you set `sendDefaultPii: true` in your `Sentry.init` options.
43+
44+
We apologize for any inconvenience caused!
45+
46+
- **feat(node): Add `ignoreStaticAssets` ([#17370](https://github.com/getsentry/sentry-javascript/pull/17370))**
47+
48+
This release adds a new option to `httpIntegration` to ignore requests for static assets (e.g. `favicon.xml` or `robots.txt`). The option defaults to `true`, meaning that going forward, such requests will not be traced by default. You can still enable tracing for these requests by setting the option to `false`:
49+
50+
```js
51+
Sentry.init({
52+
integrations: [
53+
Sentry.httpIntegration({
54+
// defaults to true, set to false to enable traces for static assets
55+
ignoreStaticAssets: false,
56+
}),
57+
],
58+
});
59+
```
60+
61+
### Other Changes
62+
63+
- fix(nuxt): Do not drop parametrized routes ([#17357](https://github.com/getsentry/sentry-javascript/pull/17357))
64+
65+
<details>
66+
<summary> <strong>Internal Changes</strong> </summary>
67+
68+
- ref(node): Split up incoming & outgoing http handling ([#17358](https://github.com/getsentry/sentry-javascript/pull/17358))
69+
- test(node): Enable additionalDependencies in integration runner ([#17361](https://github.com/getsentry/sentry-javascript/pull/17361))
70+
71+
</details>
72+
73+
## 10.3.0
74+
75+
- feat(core): MCP Server - Capture prompt results from prompt function calls (#17284)
76+
- feat(bun): Export `skipOpenTelemetrySetup` option ([#17349](https://github.com/getsentry/sentry-javascript/pull/17349))
77+
- feat(sveltekit): Streamline build logs ([#17306](https://github.com/getsentry/sentry-javascript/pull/17306))
78+
- fix(browser): Handle data urls in errors caught by `globalHandlersIntegration` ([#17216](https://github.com/getsentry/sentry-javascript/pull/17216))
79+
- fix(browser): Improve navigation vs. redirect detection ([#17275](https://github.com/getsentry/sentry-javascript/pull/17275))
80+
- fix(react-router): Ensure source map upload fails silently if Sentry CLI fails ([#17081](https://github.com/getsentry/sentry-javascript/pull/17081))
81+
- fix(react): Add support for React Router sub-routes from `handle` ([#17277](https://github.com/getsentry/sentry-javascript/pull/17277))
82+
783
## 10.2.0
884

985
### Important Changes

MIGRATION.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ The removal entails **no breaking API changes**. However, in rare cases, you mig
8080
- If you set up Sentry Alerts that depend on FID, be aware that these could trigger once you upgrade the SDK, due to a lack of new values.
8181
To replace them, adjust your alerts (or dashbaords) to use INP.
8282

83+
### Update: User IP Address collection gated by `sendDefaultPii`
84+
85+
Version `10.4.0` introduced a change that should have ideally been introduced with `10.0.0` of the SDK.
86+
Originally destined for [version `9.0.0`](https://docs.sentry.io/platforms/javascript/migration/v8-to-v9/#behavior-changes), but having not the desired effect until v10,
87+
SDKs will now control IP address inference of user IP addresses depending on the value of the top level `sendDefaultPii` init option.
88+
89+
- If `sendDefaultPii` is `true`, Sentry will infer the IP address of users' devices to events (errors, traces, replays, etc) in all browser-based SDKs.
90+
- If `sendDefaultPii` is `false` or not set, Sentry will not infer or collect IP address data.
91+
92+
Given that this was already the advertised behaviour since v9, we classify the change [as a fix](https://github.com/getsentry/sentry-javascript/pull/17364),
93+
though we recognize the potential impact of it. We apologize for any inconvenience caused.
94+
8395
## No Version Support Timeline
8496

8597
Version support timelines are stressful for everybody using the SDK, so we won't be defining one.

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": "10.2.0",
3+
"version": "10.5.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.53.2",
4545
"@sentry-internal/rrweb": "2.34.0",
46-
"@sentry/browser": "10.2.0",
46+
"@sentry/browser": "10.5.0",
4747
"@supabase/supabase-js": "2.49.3",
4848
"axios": "1.8.2",
4949
"babel-loader": "^8.2.2",

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ sentryTest('should capture feedback with custom button', async ({ getLocalTestUr
6161
version: expect.any(String),
6262
name: 'sentry.javascript.browser',
6363
packages: expect.anything(),
64+
settings: {
65+
infer_ip: 'never',
66+
},
6467
},
6568
request: {
6669
url: `${TEST_HOST}/index.html`,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ sentryTest('should capture feedback', async ({ getLocalTestUrl, page }) => {
6161
version: expect.any(String),
6262
name: 'sentry.javascript.browser',
6363
packages: expect.anything(),
64+
settings: {
65+
infer_ip: 'never',
66+
},
6467
},
6568
request: {
6669
url: `${TEST_HOST}/index.html`,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestUrl
9595
version: expect.any(String),
9696
name: 'sentry.javascript.browser',
9797
packages: expect.anything(),
98+
settings: {
99+
infer_ip: 'never',
100+
},
98101
},
99102
request: {
100103
url: `${TEST_HOST}/index.html`,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ sentryTest('should capture feedback', async ({ getLocalTestUrl, page }) => {
6161
version: expect.any(String),
6262
name: 'sentry.javascript.browser',
6363
packages: expect.anything(),
64+
settings: {
65+
infer_ip: 'never',
66+
},
6467
},
6568
request: {
6669
url: `${TEST_HOST}/index.html`,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const workerCode = `
2+
self.addEventListener('message', (event) => {
3+
if (event.data.type === 'error') {
4+
throw new Error('Error thrown in worker');
5+
}
6+
});
7+
`;
8+
9+
const worker = new Worker(`data:text/javascript;base64,${btoa(workerCode)}`);
10+
11+
worker.postMessage({ type: 'error' });

0 commit comments

Comments
 (0)