Skip to content

Commit 4c88cc3

Browse files
authored
Merge pull request #17372 from getsentry/prepare-release/10.4.0
meta(changelog): Update changelog for 10.4.0
2 parents e685f29 + d698748 commit 4c88cc3

File tree

53 files changed

+1338
-544
lines changed

Some content is hidden

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

53 files changed

+1338
-544
lines changed

CHANGELOG.md

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

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

7+
## 10.4.0
8+
9+
### Important Changes
10+
11+
- **fix(browser): Ensure IP address is only inferred by Relay if `sendDefaultPii` is `true`**
12+
13+
This release includes a fix for a [behaviour change](https://docs.sentry.io/platforms/javascript/migration/v8-to-v9/#behavior-changes)
14+
that was originally introduced with v9 of the SDK: User IP Addresses should only be added to Sentry events automatically,
15+
if `sendDefaultPii` was set to `true`.
16+
17+
However, the change in v9 required further internal adjustment, which should have been included in v10 of the SDK.
18+
Unfortunately, the change did not make it into the initial v10 version but is now applied with `10.4.0`.
19+
There is _no API_ breakage involved and hence it is safe to update.
20+
However, after updating the SDK, events (errors, traces, replays, etc.) sent from the browser, will only include
21+
user IP addresses, if you set `sendDefaultPii: true` in your `Sentry.init` options.
22+
23+
We apologize for any inconvenience caused!
24+
25+
- **feat(node): Add `ignoreStaticAssets` ([#17370](https://github.com/getsentry/sentry-javascript/pull/17370))**
26+
27+
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`:
28+
29+
```js
30+
Sentry.init({
31+
integrations: [
32+
Sentry.httpIntegration({
33+
// defaults to true, set to false to enable traces for static assets
34+
ignoreStaticAssets: false,
35+
}),
36+
],
37+
});
38+
```
39+
40+
### Other Changes
41+
42+
- fix(nuxt): Do not drop parametrized routes ([#17357](https://github.com/getsentry/sentry-javascript/pull/17357))
43+
44+
<details>
45+
<summary> <strong>Internal Changes</strong> </summary>
46+
47+
- ref(node): Split up incoming & outgoing http handling ([#17358](https://github.com/getsentry/sentry-javascript/pull/17358))
48+
- test(node): Enable additionalDependencies in integration runner ([#17361](https://github.com/getsentry/sentry-javascript/pull/17361))
49+
50+
</details>
51+
752
## 10.3.0
853

954
- feat(core): MCP Server - Capture prompt results from prompt function calls (#17284)

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/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`,

dev-packages/browser-integration-tests/suites/manual-client/browser-context/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ sentryTest('allows to setup a client manually & capture exceptions', async ({ ge
4141
name: 'sentry.javascript.browser',
4242
version: expect.any(String),
4343
packages: [{ name: expect.any(String), version: expect.any(String) }],
44+
settings: {
45+
infer_ip: 'never',
46+
},
4447
},
4548
contexts: {
4649
trace: { trace_id: expect.stringMatching(/[a-f0-9]{32}/), span_id: expect.stringMatching(/[a-f0-9]{16}/) },

dev-packages/browser-integration-tests/suites/public-api/captureException/simpleError/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@ sentryTest('should capture correct SDK metadata', async ({ getLocalTestUrl, page
3939
version: SDK_VERSION,
4040
},
4141
],
42+
settings: {
43+
infer_ip: 'never',
44+
},
4245
});
4346
});
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { expect } from '@playwright/test';
2-
import type { Event } from '@sentry/core';
32
import { sentryTest } from '../../../../utils/fixtures';
4-
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
3+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
54

6-
sentryTest('should default user to {{auto}} on errors when sendDefaultPii: true', async ({ getLocalTestUrl, page }) => {
7-
const url = await getLocalTestUrl({ testDir: __dirname });
8-
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
9-
expect(eventData.user?.ip_address).toBe('{{auto}}');
10-
});
5+
sentryTest(
6+
'sets sdk.settings.infer_ip to "auto" on errors when sendDefaultPii: true',
7+
async ({ getLocalTestUrl, page }) => {
8+
const url = await getLocalTestUrl({ testDir: __dirname });
9+
const eventData = await envelopeRequestParser(await waitForErrorRequestOnUrl(page, url));
10+
expect(eventData.sdk?.settings?.infer_ip).toBe('auto');
11+
},
12+
);

dev-packages/browser-integration-tests/suites/public-api/sendDefaultPii/performance/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from '../../../../utils/helpers';
88

99
sentryTest(
10-
'should default user to {{auto}} on transactions when sendDefaultPii: true',
10+
'sets user.ip_address to "auto" on transactions when sendDefaultPii: true',
1111
async ({ getLocalTestUrl, page }) => {
1212
if (shouldSkipTracingTest()) {
1313
sentryTest.skip();
@@ -16,6 +16,6 @@ sentryTest(
1616
const url = await getLocalTestUrl({ testDir: __dirname });
1717
const req = await waitForTransactionRequestOnUrl(page, url);
1818
const transaction = envelopeRequestParser(req);
19-
expect(transaction.user?.ip_address).toBe('{{auto}}');
19+
expect(transaction.sdk?.settings?.infer_ip).toBe('auto');
2020
},
2121
);

0 commit comments

Comments
 (0)