Skip to content

Commit c60ca61

Browse files
andreiborzagithub-actions[bot]nicohrubecsebwsJPeer264
authored
meta(changelog): Update changelog for 10.37.0 (#18984)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nicolas Hrubec <nico.hrubec@sentry.io> Co-authored-by: sebws <53290489+sebws@users.noreply.github.com> Co-authored-by: JPeer264 <jan.peer@sentry.io> Co-authored-by: javascript-sdk-gitflow[bot] <255134079+javascript-sdk-gitflow[bot]@users.noreply.github.com> Co-authored-by: JPeer264 <10677263+JPeer264@users.noreply.github.com> Co-authored-by: Charly Gomez <charly.gomez@sentry.io> Co-authored-by: Harshit Singh <73997189+harshit078@users.noreply.github.com> Co-authored-by: Sigrid <32902192+s1gr1d@users.noreply.github.com> Co-authored-by: chargome <20254395+chargome@users.noreply.github.com> Co-authored-by: Rola Abuhasna <rola.abuhasna@sentry.io> Co-authored-by: fedetorre <fede.torre@gmail.com> Co-authored-by: Federico Torresan <federico.torresan@gruppoadorea.it> Co-authored-by: Onur Temizkan <onur@narval.co.uk> Co-authored-by: Abdelrahman Awad <abdelrahman.awad@sentry.io>
2 parents 922b587 + 429ac16 commit c60ca61

File tree

273 files changed

+12168
-3255
lines changed

Some content is hidden

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

273 files changed

+12168
-3255
lines changed

.claude/skills/e2e/SKILL.md

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
---
2+
name: e2e
3+
description: Run E2E tests for Sentry JavaScript SDK test applications
4+
argument-hint: <test-app-name> [--variant <variant-name>]
5+
---
6+
7+
# E2E Test Runner Skill
8+
9+
This skill runs end-to-end tests for Sentry JavaScript SDK test applications. It ensures SDK packages are built before running tests.
10+
11+
## Input
12+
13+
The user provides a test application name and optionally a variant:
14+
15+
- `e2e-tests/test-applications/nextjs-app-dir` (full path)
16+
- `nextjs-app-dir` (just the app name)
17+
- `nextjs-app-dir --variant nextjs-15` (with variant)
18+
19+
## Workflow
20+
21+
### Step 1: Parse the Test Application Name
22+
23+
Extract the test app name from user input:
24+
25+
- Strip `e2e-tests/test-applications/` prefix if present
26+
- Extract variant flag if provided (e.g., `--variant nextjs-15`)
27+
- Store the clean app name (e.g., `nextjs-app-dir`)
28+
29+
### Step 2: Determine Which Packages Need Rebuilding
30+
31+
If the user recently edited files in `packages/*`, identify which packages were modified:
32+
33+
```bash
34+
# Check which packages have uncommitted changes (including untracked files)
35+
git status --porcelain | grep "^[ MARC?][ MD?] packages/" | cut -d'/' -f2 | sort -u
36+
```
37+
38+
For each modified package, rebuild its tarball:
39+
40+
```bash
41+
cd packages/<package-name>
42+
yarn build && yarn build:tarball
43+
cd ../..
44+
```
45+
46+
**Option C: User Specifies Packages**
47+
48+
If the user says "I changed @sentry/node" or similar, rebuild just that package:
49+
50+
```bash
51+
cd packages/node
52+
yarn build && yarn build:tarball
53+
cd ../..
54+
```
55+
56+
### Step 3: Verify Test Application Exists
57+
58+
Check that the test app exists:
59+
60+
```bash
61+
ls -d dev-packages/e2e-tests/test-applications/<app-name>
62+
```
63+
64+
If it doesn't exist, list available test apps:
65+
66+
```bash
67+
ls dev-packages/e2e-tests/test-applications/
68+
```
69+
70+
Ask the user which one they meant.
71+
72+
### Step 4: Run the E2E Test
73+
74+
Navigate to the e2e-tests directory and run the test:
75+
76+
```bash
77+
cd dev-packages/e2e-tests
78+
yarn test:run <app-name>
79+
```
80+
81+
If a variant was specified:
82+
83+
```bash
84+
cd dev-packages/e2e-tests
85+
yarn test:run <app-name> --variant <variant-name>
86+
```
87+
88+
### Step 5: Report Results
89+
90+
After the test completes, provide a summary:
91+
92+
**If tests passed:**
93+
94+
```
95+
✅ E2E tests passed for <app-name>
96+
97+
All tests completed successfully. Your SDK changes work correctly with this test application.
98+
```
99+
100+
**If tests failed:**
101+
102+
```
103+
❌ E2E tests failed for <app-name>
104+
105+
[Include relevant error output]
106+
```
107+
108+
**If package rebuild was needed:**
109+
110+
```
111+
📦 Rebuilt SDK packages: <list of packages>
112+
🧪 Running E2E tests for <app-name>...
113+
```
114+
115+
## Error Handling
116+
117+
- **No tarballs found**: Run `yarn build && yarn build:tarball` at repository root
118+
- **Test app not found**: List available apps and ask user to clarify
119+
- **Verdaccio not running**: Tests should start Verdaccio automatically, but if issues occur, check Docker
120+
- **Build failures**: Fix build errors before running tests
121+
122+
## Common Test Applications
123+
124+
Here are frequently tested applications:
125+
126+
- `nextjs-app-dir` - Next.js App Router
127+
- `nextjs-15` - Next.js 15.x
128+
- `react-create-hash-router` - React with React Router
129+
- `node-express-esm-loader` - Node.js Express with ESM
130+
- `sveltekit-2` - SvelteKit 2.x
131+
- `remix-2` - Remix 2.x
132+
- `nuxt-3` - Nuxt 3.x
133+
134+
To see all available test apps:
135+
136+
```bash
137+
ls dev-packages/e2e-tests/test-applications/
138+
```
139+
140+
## Example Workflows
141+
142+
### Example 1: After modifying @sentry/node
143+
144+
```bash
145+
# User: "Run e2e tests for node-express-esm-loader"
146+
147+
# Step 1: Detect recent changes to packages/node
148+
# Step 2: Rebuild the modified package
149+
cd packages/node
150+
yarn build && yarn build:tarball
151+
cd ../..
152+
153+
# Step 3: Run the test
154+
cd dev-packages/e2e-tests
155+
yarn test:run node-express-esm-loader
156+
```
157+
158+
### Example 2: First-time test run
159+
160+
```bash
161+
# User: "Run e2e tests for nextjs-app-dir"
162+
163+
# Step 1: Check for existing tarballs
164+
# Step 2: None found, build all packages
165+
yarn build && yarn build:tarball
166+
167+
# Step 3: Run the test
168+
cd dev-packages/e2e-tests
169+
yarn test:run nextjs-app-dir
170+
```
171+
172+
### Example 3: With variant
173+
174+
```bash
175+
# User: "Run e2e tests for nextjs-app-dir with nextjs-15 variant"
176+
177+
# Step 1: Rebuild if needed
178+
# Step 2: Run with variant
179+
cd dev-packages/e2e-tests
180+
yarn test:run nextjs-app-dir --variant nextjs-15
181+
```
182+
183+
## Tips
184+
185+
- **Always rebuild after SDK changes**: Tarballs contain the compiled SDK code
186+
- **Watch build output**: Build errors must be fixed before testing
187+
188+
## Integration with Development Workflow
189+
190+
This skill integrates with the standard SDK development workflow:
191+
192+
1. Make changes to SDK code in `packages/*`
193+
2. Run `/e2e <app-name>` to test your changes
194+
3. Fix any test failures
195+
196+
The skill automates the tedious parts of:
197+
198+
- Remembering to rebuild tarballs
199+
- Navigating to the correct directory
200+
- Running tests with the right flags

.size-limit.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,21 @@ module.exports = [
9696
path: 'packages/browser/build/npm/esm/prod/index.js',
9797
import: createImport('init', 'feedbackIntegration'),
9898
gzip: true,
99-
limit: '42 KB',
99+
limit: '43 KB',
100100
},
101101
{
102102
name: '@sentry/browser (incl. sendFeedback)',
103103
path: 'packages/browser/build/npm/esm/prod/index.js',
104104
import: createImport('init', 'sendFeedback'),
105105
gzip: true,
106-
limit: '30 KB',
106+
limit: '31 KB',
107107
},
108108
{
109109
name: '@sentry/browser (incl. FeedbackAsync)',
110110
path: 'packages/browser/build/npm/esm/prod/index.js',
111111
import: createImport('init', 'feedbackAsyncIntegration'),
112112
gzip: true,
113-
limit: '35 KB',
113+
limit: '36 KB',
114114
},
115115
{
116116
name: '@sentry/browser (incl. Metrics)',
@@ -140,7 +140,7 @@ module.exports = [
140140
import: createImport('init', 'ErrorBoundary'),
141141
ignore: ['react/jsx-runtime'],
142142
gzip: true,
143-
limit: '27 KB',
143+
limit: '28 KB',
144144
},
145145
{
146146
name: '@sentry/react (incl. Tracing)',
@@ -208,7 +208,7 @@ module.exports = [
208208
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)',
209209
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
210210
gzip: true,
211-
limit: '86 KB',
211+
limit: '87 KB',
212212
},
213213
// browser CDN bundles (non-gzipped)
214214
{
@@ -223,7 +223,7 @@ module.exports = [
223223
path: createCDNPath('bundle.tracing.min.js'),
224224
gzip: false,
225225
brotli: false,
226-
limit: '127 KB',
226+
limit: '128 KB',
227227
},
228228
{
229229
name: 'CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed',
@@ -278,7 +278,7 @@ module.exports = [
278278
import: createImport('init'),
279279
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
280280
gzip: true,
281-
limit: '52 KB',
281+
limit: '53 KB',
282282
},
283283
// Node SDK (ESM)
284284
{
@@ -287,7 +287,7 @@ module.exports = [
287287
import: createImport('init'),
288288
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
289289
gzip: true,
290-
limit: '166 KB',
290+
limit: '167 KB',
291291
},
292292
{
293293
name: '@sentry/node - without tracing',

CHANGELOG.md

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

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

7+
## 10.37.0
8+
9+
### Important Changes
10+
11+
- **feat(core): Introduces a new `Sentry.setConversationId()` API to track multi turn AI conversations across API calls. ([#18909](https://github.com/getsentry/sentry-javascript/pull/18909))**
12+
13+
You can now set a conversation ID that will be automatically applied to spans within that scope. This allows you to link traces from the same conversation together.
14+
15+
```javascript
16+
import * as Sentry from '@sentry/node';
17+
18+
// Set conversation ID for all subsequent spans
19+
Sentry.setConversationId('conv_abc123');
20+
21+
// All AI spans will now include the gen_ai.conversation.id attribute
22+
await openai.chat.completions.create({...});
23+
```
24+
25+
This is particularly useful for tracking multiple AI API calls that are part of the same conversation, allowing you to analyze entire conversation flows in Sentry.
26+
The conversation ID is stored on the isolation scope and automatically applied to spans via the new `conversationIdIntegration`.
27+
28+
- **feat(tanstackstart-react): Auto-instrument global middleware in `sentryTanstackStart` Vite plugin ([#18844](https://github.com/getsentry/sentry-javascript/pull/18844))**
29+
30+
The `sentryTanstackStart` Vite plugin now automatically instruments `requestMiddleware` and `functionMiddleware` arrays in `createStart()`. This captures performance data without requiring manual wrapping.
31+
32+
Auto-instrumentation is enabled by default. To disable it:
33+
34+
```ts
35+
// vite.config.ts
36+
sentryTanstackStart({
37+
authToken: process.env.SENTRY_AUTH_TOKEN,
38+
org: 'your-org',
39+
project: 'your-project',
40+
autoInstrumentMiddleware: false,
41+
});
42+
```
43+
44+
### Other Changes
45+
46+
- feat(core): simplify truncation logic to only keep the newest message ([#18906](https://github.com/getsentry/sentry-javascript/pull/18906))
47+
- feat(core): Support new client discard reason `invalid` ([#18901](https://github.com/getsentry/sentry-javascript/pull/18901))
48+
- feat(deps): Bump OpenTelemetry instrumentations ([#18934](https://github.com/getsentry/sentry-javascript/pull/18934))
49+
- feat(nextjs): Update default ignore list for sourcemaps ([#18938](https://github.com/getsentry/sentry-javascript/pull/18938))
50+
- feat(node): pass prisma instrumentation options through ([#18900](https://github.com/getsentry/sentry-javascript/pull/18900))
51+
- feat(nuxt): Don't run source maps related code on Nuxt "prepare" ([#18936](https://github.com/getsentry/sentry-javascript/pull/18936))
52+
- feat(replay): Update client report discard reason for invalid sessions ([#18796](https://github.com/getsentry/sentry-javascript/pull/18796))
53+
- feat(winston): Add customLevelMap for winston transport ([#18922](https://github.com/getsentry/sentry-javascript/pull/18922))
54+
- feat(react-router): Add support for React Router instrumentation API ([#18580](https://github.com/getsentry/sentry-javascript/pull/18580))
55+
- fix(astro): Do not show warnings for valid options ([#18947](https://github.com/getsentry/sentry-javascript/pull/18947))
56+
- fix(core): Report well known values in gen_ai.operation.name attribute ([#18925](https://github.com/getsentry/sentry-javascript/pull/18925))
57+
- fix(node-core): ignore vercel `AbortError` by default on unhandled rejection ([#18973](https://github.com/getsentry/sentry-javascript/pull/18973))
58+
- fix(nuxt): include sentry.config.server.ts in nuxt app types ([#18971](https://github.com/getsentry/sentry-javascript/pull/18971))
59+
- fix(profiling): Add `platform` to envelope item header ([#18954](https://github.com/getsentry/sentry-javascript/pull/18954))
60+
- fix(react): Defer React Router span finalization until lazy routes load ([#18881](https://github.com/getsentry/sentry-javascript/pull/18881))
61+
- ref(core): rename `gen_ai.input.messages.original_length` to `sentry.sdk_meta.gen_ai.input.messages.original_length` ([#18970](https://github.com/getsentry/sentry-javascript/pull/18970))
62+
- ref(core): rename `gen_ai.request.messages` to `gen_ai.input.messages` ([#18944](https://github.com/getsentry/sentry-javascript/pull/18944))
63+
- ref(core): Set system message as separate attribute ([#18978](https://github.com/getsentry/sentry-javascript/pull/18978))
64+
- deps: Bump version of sentry-bundler-plugins ([#18972](https://github.com/getsentry/sentry-javascript/pull/18972))
65+
66+
<details>
67+
<summary><strong>Internal Changes</strong></summary>
68+
69+
- chore(e2e): Add e2e claude skill ([#18957](https://github.com/getsentry/sentry-javascript/pull/18957))
70+
- chore(e2e): Add Makefile to make running specific e2e test apps easier ([#18953](https://github.com/getsentry/sentry-javascript/pull/18953))
71+
- chore(e2e): Modify e2e skill to also account for untracked files ([#18959](https://github.com/getsentry/sentry-javascript/pull/18959))
72+
- ref(tests): use constants in ai integration tests and add missing ones ([#18945](https://github.com/getsentry/sentry-javascript/pull/18945))
73+
- test(nextjs): Added nextjs CF workers test app ([#18928](https://github.com/getsentry/sentry-javascript/pull/18928))
74+
- test(prisma): Move to yarn prisma ([#18975](https://github.com/getsentry/sentry-javascript/pull/18975))
75+
76+
</details>
77+
78+
Work in this release was contributed by @sebws, @harshit078, and @fedetorre. Thank you for your contributions!
79+
780
## 10.36.0
881

982
- feat(node): Add Prisma v7 support ([#18908](https://github.com/getsentry/sentry-javascript/pull/18908))

CLAUDE.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,7 @@ Without this file, pnpm installs from the public npm registry instead of Verdacc
145145

146146
#### Running a Single E2E Test
147147

148-
```bash
149-
# Build packages first
150-
yarn build && yarn build:tarball
151-
152-
# Run a specific test app
153-
cd dev-packages/e2e-tests
154-
yarn test:run <app-name>
155-
156-
# Run with a specific variant (e.g., Next.js 15)
157-
yarn test:run <app-name> --variant <variant-name>
158-
```
148+
Run the e2e skill.
159149

160150
#### Common Pitfalls and Debugging
161151

dev-packages/browser-integration-tests/suites/profiling/manualMode/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ sentryTest('sends profile_chunk envelopes in manual mode', async ({ page, getLoc
4848
const envelopeItemHeader = profileChunkEnvelopeItem[0];
4949
const envelopeItemPayload1 = profileChunkEnvelopeItem[1];
5050

51-
expect(envelopeItemHeader).toHaveProperty('type', 'profile_chunk');
51+
expect(envelopeItemHeader).toEqual({ type: 'profile_chunk', platform: 'javascript' });
5252
expect(envelopeItemPayload1.profile).toBeDefined();
5353

5454
const profilerId1 = envelopeItemPayload1.profiler_id;
@@ -71,7 +71,7 @@ sentryTest('sends profile_chunk envelopes in manual mode', async ({ page, getLoc
7171
const envelopeItemHeader2 = profileChunkEnvelopeItem2[0];
7272
const envelopeItemPayload2 = profileChunkEnvelopeItem2[1];
7373

74-
expect(envelopeItemHeader2).toHaveProperty('type', 'profile_chunk');
74+
expect(envelopeItemHeader2).toEqual({ type: 'profile_chunk', platform: 'javascript' });
7575
expect(envelopeItemPayload2.profile).toBeDefined();
7676

7777
expect(envelopeItemPayload2.profiler_id).toBe(profilerId1); // same profiler id for the whole session

0 commit comments

Comments
 (0)