Skip to content

Commit 66549ef

Browse files
chore: resolve merge conflicts with upstream
2 parents 76bb9f9 + 5ee2597 commit 66549ef

File tree

342 files changed

+12340
-5424
lines changed

Some content is hidden

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

342 files changed

+12340
-5424
lines changed

.cursor/BUGBOT.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# PR Review Guidelines for Cursor Bot
2+
3+
You are reviewing a pull request for the Sentry JavaScript SDK.
4+
Flag any of the following indicators or missing requirements.
5+
If you find anything to flag, mention that you flagged this in the review because it was mentioned in this rules file.
6+
These issues are only relevant for production code.
7+
Do not flag the issues below if they appear in tests.
8+
9+
## Critical Issues to Flag
10+
11+
### Security Vulnerabilities
12+
13+
- Exposed secrets, API keys, tokens or creentials in code or comments
14+
- Unsafe use of `eval()`, `Function()`, or `innerHTML`
15+
- Unsafe regular expressions that could cause ReDoS attacks
16+
17+
### Breaking Changes
18+
19+
- Public API changes without proper deprecation notices
20+
- Removal of publicly exported functions, classes, or types. Internal removals are fine!
21+
- Changes to function signatures in public APIs
22+
23+
## SDK-relevant issues
24+
25+
### Performance Issues
26+
27+
- Multiple loops over the same array (for example, using `.filter`, .`foreach`, chained). Suggest a classic `for` loop as a replacement.
28+
- Memory leaks from event listeners, timers, or closures not being cleaned up or unsubscribing
29+
- Large bundle size increases in browser packages. Sometimes they're unavoidable but flag them anyway.
30+
31+
### Auto instrumentation, SDK integrations, Sentry-specific conventions
32+
33+
- When calling any `startSpan` API (`startInactiveSpan`, `startSpanManual`, etc), always ensure that the following span attributes are set:
34+
- `SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN` (`'sentry.origin'`) with a proper span origin
35+
- `SEMANTIC_ATTRIBUTE_SENTRY_OP` (`'sentry.op'`) with a proper span op
36+
- When calling `captureException`, always make sure that the `mechanism` is set:
37+
- `handled`: must be set to `true` or `false`
38+
- `type`: must be set to a proper origin (i.e. identify the integration and part in the integration that caught the exception).
39+
- The type should align with the `SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN` if a span wraps the `captureException` call.
40+
- If there's no direct span that's wrapping the captured exception, apply a proper `type` value, following the same naming
41+
convention as the `SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN` value.
42+
- 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:

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ module.exports = [
233233
import: createImport('init'),
234234
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
235235
gzip: true,
236-
limit: '147 KB',
236+
limit: '148 KB',
237237
},
238238
{
239239
name: '@sentry/node - without tracing',

CHANGELOG.md

Lines changed: 224 additions & 3071 deletions
Large diffs are not rendered by default.

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.1.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.1.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`,

0 commit comments

Comments
 (0)