Skip to content

Commit 9a90e11

Browse files
authored
Merge pull request #17339 from getsentry/prepare-release/10.2.0
meta(changelog): Update changelog for 10.2.0
2 parents 135b7a3 + bcbb6af commit 9a90e11

File tree

171 files changed

+7360
-3687
lines changed

Some content is hidden

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

171 files changed

+7360
-3687
lines changed

.cursor/BUGBOT.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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`.

CHANGELOG.md

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

dev-packages/browser-integration-tests/suites/errors/fetch/test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sentryTest('handles fetch network errors @firefox', async ({ getLocalTestUrl, pa
2424
value: error,
2525
mechanism: {
2626
handled: false,
27-
type: 'onunhandledrejection',
27+
type: 'auto.browser.global_handlers.onunhandledrejection',
2828
},
2929
});
3030
});
@@ -51,7 +51,7 @@ sentryTest('handles fetch network errors on subdomains @firefox', async ({ getLo
5151
value: error,
5252
mechanism: {
5353
handled: false,
54-
type: 'onunhandledrejection',
54+
type: 'auto.browser.global_handlers.onunhandledrejection',
5555
},
5656
});
5757
});
@@ -78,7 +78,7 @@ sentryTest('handles fetch invalid header name errors @firefox', async ({ getLoca
7878
value: error,
7979
mechanism: {
8080
handled: false,
81-
type: 'onunhandledrejection',
81+
type: 'auto.browser.global_handlers.onunhandledrejection',
8282
},
8383
stacktrace: {
8484
frames: expect.any(Array),
@@ -110,7 +110,7 @@ sentryTest('handles fetch invalid header value errors @firefox', async ({ getLoc
110110
value: error,
111111
mechanism: {
112112
handled: false,
113-
type: 'onunhandledrejection',
113+
type: 'auto.browser.global_handlers.onunhandledrejection',
114114
},
115115
stacktrace: {
116116
frames: expect.any(Array),
@@ -152,7 +152,7 @@ sentryTest('handles fetch invalid URL scheme errors @firefox', async ({ getLocal
152152
value: error,
153153
mechanism: {
154154
handled: false,
155-
type: 'onunhandledrejection',
155+
type: 'auto.browser.global_handlers.onunhandledrejection',
156156
},
157157
stacktrace: {
158158
frames: expect.any(Array),
@@ -184,7 +184,7 @@ sentryTest('handles fetch credentials in url errors @firefox', async ({ getLocal
184184
value: error,
185185
mechanism: {
186186
handled: false,
187-
type: 'onunhandledrejection',
187+
type: 'auto.browser.global_handlers.onunhandledrejection',
188188
},
189189
stacktrace: {
190190
frames: expect.any(Array),
@@ -215,7 +215,7 @@ sentryTest('handles fetch invalid mode errors @firefox', async ({ getLocalTestUr
215215
value: error,
216216
mechanism: {
217217
handled: false,
218-
type: 'onunhandledrejection',
218+
type: 'auto.browser.global_handlers.onunhandledrejection',
219219
},
220220
stacktrace: {
221221
frames: expect.any(Array),
@@ -245,7 +245,7 @@ sentryTest('handles fetch invalid request method errors @firefox', async ({ getL
245245
value: error,
246246
mechanism: {
247247
handled: false,
248-
type: 'onunhandledrejection',
248+
type: 'auto.browser.global_handlers.onunhandledrejection',
249249
},
250250
stacktrace: {
251251
frames: expect.any(Array),
@@ -277,7 +277,7 @@ sentryTest(
277277
value: error,
278278
mechanism: {
279279
handled: false,
280-
type: 'onunhandledrejection',
280+
type: 'auto.browser.global_handlers.onunhandledrejection',
281281
},
282282
stacktrace: {
283283
frames: expect.any(Array),

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ sentryTest(
3333
type: 'Error',
3434
value: 'Object captured as exception with keys: otherKey, type',
3535
mechanism: {
36-
type: 'onerror',
36+
type: 'auto.browser.global_handlers.onerror',
3737
handled: false,
3838
},
3939
stacktrace: {

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ sentryTest('should catch syntax errors', async ({ getLocalTestUrl, page, browser
2828
type: 'SyntaxError',
2929
value: "Failed to execute 'appendChild' on 'Node': Unexpected token '{'",
3030
mechanism: {
31-
type: 'onerror',
31+
type: 'auto.browser.global_handlers.onerror',
3232
handled: false,
3333
},
3434
stacktrace: {

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ sentryTest('should catch thrown errors', async ({ getLocalTestUrl, page, browser
2828
type: 'Error',
2929
value: 'realError',
3030
mechanism: {
31-
type: 'onerror',
31+
type: 'auto.browser.global_handlers.onerror',
3232
handled: false,
3333
},
3434
stacktrace: {

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-objects/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sentryTest('should catch thrown objects', async ({ getLocalTestUrl, page, browse
3030
type: 'Error',
3131
value: 'Object captured as exception with keys: error, somekey',
3232
mechanism: {
33-
type: 'onerror',
33+
type: 'auto.browser.global_handlers.onerror',
3434
handled: false,
3535
},
3636
stacktrace: {

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ sentryTest('should catch thrown strings', async ({ getLocalTestUrl, page, browse
2828
type: 'Error',
2929
value: 'stringError',
3030
mechanism: {
31-
type: 'onerror',
31+
type: 'auto.browser.global_handlers.onerror',
3232
handled: false,
3333
},
3434
stacktrace: {

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/custom-event/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sentryTest(
2020
type: 'Error',
2121
value: 'promiseError',
2222
mechanism: {
23-
type: 'onunhandledrejection',
23+
type: 'auto.browser.global_handlers.onunhandledrejection',
2424
handled: false,
2525
},
2626
stacktrace: {

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/event/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ sentryTest('should capture a random Event with type unhandledrejection', async (
1515
type: 'Event',
1616
value: 'Event `Event` (type=unhandledrejection) captured as promise rejection',
1717
mechanism: {
18-
type: 'onunhandledrejection',
18+
type: 'auto.browser.global_handlers.onunhandledrejection',
1919
handled: false,
2020
},
2121
});

0 commit comments

Comments
 (0)