Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e29ac20
Merge pull request #18924 from getsentry/master
github-actions[bot] Jan 21, 2026
1b2eea3
feat(core): simplify truncation logic to only keep the newest message…
nicohrubec Jan 21, 2026
80b4705
feat(tanstackstart-react): Auto-instrument global middleware (#18844)
nicohrubec Jan 21, 2026
9bf03cf
Merge pull request #18948 from getsentry/ab/fix-hydrogen-ci
andreiborza Jan 23, 2026
56f5098
feat(node): pass prisma instrumentation options through (#18900)
sebws Jan 23, 2026
40a814d
chore: Add external contributor to CHANGELOG.md (#18952)
javascript-sdk-gitflow[bot] Jan 23, 2026
bb40be1
feat(nextjs): Update default ignore list for sourcemaps (#18938)
chargome Jan 23, 2026
58d3206
feat(core): Support new client discard reason `invalid` (#18901)
chargome Jan 23, 2026
6119cf2
chore(e2e): Add Makefile to make running specific e2e test apps easie…
andreiborza Jan 23, 2026
a2f7fad
feat(replay): Update client report discard reason for invalid session…
harshit078 Jan 23, 2026
6432b00
fix(profiling): Add `platform` to envelope item header (#18954)
s1gr1d Jan 23, 2026
41810c9
feat(nuxt): Don't run source maps related code on Nuxt "prepare" (#18…
s1gr1d Jan 23, 2026
078de5c
ref(tests): use constants in ai integration tests and add missing one…
nicohrubec Jan 23, 2026
d5d61fa
chore(e2e): Add e2e claude skill (#18957)
andreiborza Jan 23, 2026
ac5e91e
chore: Add external contributor to CHANGELOG.md (#18955)
javascript-sdk-gitflow[bot] Jan 23, 2026
e0ee7b4
chore(e2e): Modify e2e skill to also account for untracked files (#18…
andreiborza Jan 23, 2026
c5e3249
feat(core): Add scope-level conversation ID API to support linking AI…
RulaKhaled Jan 23, 2026
2c9def0
fix(core): Report well known values in gen_ai.operation.name attribut…
RulaKhaled Jan 23, 2026
2de71df
feat(deps): Bump OpenTelemetry instrumentations (#18934)
andreiborza Jan 23, 2026
d90c116
ref(core): rename `gen_ai.request.messages` to `gen_ai.input.messages…
nicohrubec Jan 26, 2026
3e6d0dd
fix(astro): Do not show warnings for valid options (#18947)
JPeer264 Jan 26, 2026
0e597c2
ref(core): rename `gen_ai.input.messages.original_length` to `sentry.…
nicohrubec Jan 26, 2026
a8677e0
fix(node-core): ignore vercel `AbortError` by default on unhandled re…
nicohrubec Jan 26, 2026
1ba55a1
fix(nuxt): include sentry.config.server.ts in nuxt app types (#18971)
fedetorre Jan 26, 2026
f915139
fix(react): Defer React Router span finalization until lazy routes lo…
onurtemizkan Jan 26, 2026
75f0e20
feat(react-router): Add support for React Router instrumentation API …
onurtemizkan Jan 26, 2026
693ca47
test(nextjs): Added nextjs CF workers test app (#18928)
logaretm Jan 26, 2026
cf738e7
deps: Bump version of sentry-bundler-plugins (#18972)
s1gr1d Jan 26, 2026
9a2b6a4
chore: Add external contributor to CHANGELOG.md (#18977)
javascript-sdk-gitflow[bot] Jan 26, 2026
b0add63
ref(core): Set system message as separate attribute (#18978)
RulaKhaled Jan 26, 2026
93a91cc
test(prisma): Move to yarn prisma (#18975)
JPeer264 Jan 27, 2026
11f38a7
feat(winston): Add customLevelMap for winston transport (#18922)
JPeer264 Jan 27, 2026
429ac16
meta(changelog): Update changelog for 10.37.0
andreiborza Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 200 additions & 0 deletions .claude/skills/e2e/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
---
name: e2e
description: Run E2E tests for Sentry JavaScript SDK test applications
argument-hint: <test-app-name> [--variant <variant-name>]
---

# E2E Test Runner Skill

This skill runs end-to-end tests for Sentry JavaScript SDK test applications. It ensures SDK packages are built before running tests.

## Input

The user provides a test application name and optionally a variant:

- `e2e-tests/test-applications/nextjs-app-dir` (full path)
- `nextjs-app-dir` (just the app name)
- `nextjs-app-dir --variant nextjs-15` (with variant)

## Workflow

### Step 1: Parse the Test Application Name

Extract the test app name from user input:

- Strip `e2e-tests/test-applications/` prefix if present
- Extract variant flag if provided (e.g., `--variant nextjs-15`)
- Store the clean app name (e.g., `nextjs-app-dir`)

### Step 2: Determine Which Packages Need Rebuilding

If the user recently edited files in `packages/*`, identify which packages were modified:

```bash
# Check which packages have uncommitted changes (including untracked files)
git status --porcelain | grep "^[ MARC?][ MD?] packages/" | cut -d'/' -f2 | sort -u
```

For each modified package, rebuild its tarball:

```bash
cd packages/<package-name>
yarn build && yarn build:tarball
cd ../..
```

**Option C: User Specifies Packages**

If the user says "I changed @sentry/node" or similar, rebuild just that package:

```bash
cd packages/node
yarn build && yarn build:tarball
cd ../..
```

### Step 3: Verify Test Application Exists

Check that the test app exists:

```bash
ls -d dev-packages/e2e-tests/test-applications/<app-name>
```

If it doesn't exist, list available test apps:

```bash
ls dev-packages/e2e-tests/test-applications/
```

Ask the user which one they meant.

### Step 4: Run the E2E Test

Navigate to the e2e-tests directory and run the test:

```bash
cd dev-packages/e2e-tests
yarn test:run <app-name>
```

If a variant was specified:

```bash
cd dev-packages/e2e-tests
yarn test:run <app-name> --variant <variant-name>
```

### Step 5: Report Results

After the test completes, provide a summary:

**If tests passed:**

```
✅ E2E tests passed for <app-name>

All tests completed successfully. Your SDK changes work correctly with this test application.
```

**If tests failed:**

```
❌ E2E tests failed for <app-name>

[Include relevant error output]
```

**If package rebuild was needed:**

```
📦 Rebuilt SDK packages: <list of packages>
🧪 Running E2E tests for <app-name>...
```

## Error Handling

- **No tarballs found**: Run `yarn build && yarn build:tarball` at repository root
- **Test app not found**: List available apps and ask user to clarify
- **Verdaccio not running**: Tests should start Verdaccio automatically, but if issues occur, check Docker
- **Build failures**: Fix build errors before running tests

## Common Test Applications

Here are frequently tested applications:

- `nextjs-app-dir` - Next.js App Router
- `nextjs-15` - Next.js 15.x
- `react-create-hash-router` - React with React Router
- `node-express-esm-loader` - Node.js Express with ESM
- `sveltekit-2` - SvelteKit 2.x
- `remix-2` - Remix 2.x
- `nuxt-3` - Nuxt 3.x

To see all available test apps:

```bash
ls dev-packages/e2e-tests/test-applications/
```

## Example Workflows

### Example 1: After modifying @sentry/node

```bash
# User: "Run e2e tests for node-express-esm-loader"

# Step 1: Detect recent changes to packages/node
# Step 2: Rebuild the modified package
cd packages/node
yarn build && yarn build:tarball
cd ../..

# Step 3: Run the test
cd dev-packages/e2e-tests
yarn test:run node-express-esm-loader
```

### Example 2: First-time test run

```bash
# User: "Run e2e tests for nextjs-app-dir"

# Step 1: Check for existing tarballs
# Step 2: None found, build all packages
yarn build && yarn build:tarball

# Step 3: Run the test
cd dev-packages/e2e-tests
yarn test:run nextjs-app-dir
```

### Example 3: With variant

```bash
# User: "Run e2e tests for nextjs-app-dir with nextjs-15 variant"

# Step 1: Rebuild if needed
# Step 2: Run with variant
cd dev-packages/e2e-tests
yarn test:run nextjs-app-dir --variant nextjs-15
```

## Tips

- **Always rebuild after SDK changes**: Tarballs contain the compiled SDK code
- **Watch build output**: Build errors must be fixed before testing

## Integration with Development Workflow

This skill integrates with the standard SDK development workflow:

1. Make changes to SDK code in `packages/*`
2. Run `/e2e <app-name>` to test your changes
3. Fix any test failures

The skill automates the tedious parts of:

- Remembering to rebuild tarballs
- Navigating to the correct directory
- Running tests with the right flags
16 changes: 8 additions & 8 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,21 @@ module.exports = [
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'feedbackIntegration'),
gzip: true,
limit: '42 KB',
limit: '43 KB',
},
{
name: '@sentry/browser (incl. sendFeedback)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'sendFeedback'),
gzip: true,
limit: '30 KB',
limit: '31 KB',
},
{
name: '@sentry/browser (incl. FeedbackAsync)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'feedbackAsyncIntegration'),
gzip: true,
limit: '35 KB',
limit: '36 KB',
},
{
name: '@sentry/browser (incl. Metrics)',
Expand Down Expand Up @@ -140,7 +140,7 @@ module.exports = [
import: createImport('init', 'ErrorBoundary'),
ignore: ['react/jsx-runtime'],
gzip: true,
limit: '27 KB',
limit: '28 KB',
},
{
name: '@sentry/react (incl. Tracing)',
Expand Down Expand Up @@ -208,7 +208,7 @@ module.exports = [
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)',
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
gzip: true,
limit: '86 KB',
limit: '87 KB',
},
// browser CDN bundles (non-gzipped)
{
Expand All @@ -223,7 +223,7 @@ module.exports = [
path: createCDNPath('bundle.tracing.min.js'),
gzip: false,
brotli: false,
limit: '127 KB',
limit: '128 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed',
Expand Down Expand Up @@ -278,7 +278,7 @@ module.exports = [
import: createImport('init'),
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '52 KB',
limit: '53 KB',
},
// Node SDK (ESM)
{
Expand All @@ -287,7 +287,7 @@ module.exports = [
import: createImport('init'),
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '166 KB',
limit: '167 KB',
},
{
name: '@sentry/node - without tracing',
Expand Down
73 changes: 73 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,79 @@

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

## 10.37.0

### Important Changes

- **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))**

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.

```javascript
import * as Sentry from '@sentry/node';

// Set conversation ID for all subsequent spans
Sentry.setConversationId('conv_abc123');

// All AI spans will now include the gen_ai.conversation.id attribute
await openai.chat.completions.create({...});
```

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.
The conversation ID is stored on the isolation scope and automatically applied to spans via the new `conversationIdIntegration`.

- **feat(tanstackstart-react): Auto-instrument global middleware in `sentryTanstackStart` Vite plugin ([#18844](https://github.com/getsentry/sentry-javascript/pull/18844))**

The `sentryTanstackStart` Vite plugin now automatically instruments `requestMiddleware` and `functionMiddleware` arrays in `createStart()`. This captures performance data without requiring manual wrapping.

Auto-instrumentation is enabled by default. To disable it:

```ts
// vite.config.ts
sentryTanstackStart({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: 'your-org',
project: 'your-project',
autoInstrumentMiddleware: false,
});
```

### Other Changes

- feat(core): simplify truncation logic to only keep the newest message ([#18906](https://github.com/getsentry/sentry-javascript/pull/18906))
- feat(core): Support new client discard reason `invalid` ([#18901](https://github.com/getsentry/sentry-javascript/pull/18901))
- feat(deps): Bump OpenTelemetry instrumentations ([#18934](https://github.com/getsentry/sentry-javascript/pull/18934))
- feat(nextjs): Update default ignore list for sourcemaps ([#18938](https://github.com/getsentry/sentry-javascript/pull/18938))
- feat(node): pass prisma instrumentation options through ([#18900](https://github.com/getsentry/sentry-javascript/pull/18900))
- feat(nuxt): Don't run source maps related code on Nuxt "prepare" ([#18936](https://github.com/getsentry/sentry-javascript/pull/18936))
- feat(replay): Update client report discard reason for invalid sessions ([#18796](https://github.com/getsentry/sentry-javascript/pull/18796))
- feat(winston): Add customLevelMap for winston transport ([#18922](https://github.com/getsentry/sentry-javascript/pull/18922))
- feat(react-router): Add support for React Router instrumentation API ([#18580](https://github.com/getsentry/sentry-javascript/pull/18580))
- fix(astro): Do not show warnings for valid options ([#18947](https://github.com/getsentry/sentry-javascript/pull/18947))
- fix(core): Report well known values in gen_ai.operation.name attribute ([#18925](https://github.com/getsentry/sentry-javascript/pull/18925))
- fix(node-core): ignore vercel `AbortError` by default on unhandled rejection ([#18973](https://github.com/getsentry/sentry-javascript/pull/18973))
- fix(nuxt): include sentry.config.server.ts in nuxt app types ([#18971](https://github.com/getsentry/sentry-javascript/pull/18971))
- fix(profiling): Add `platform` to envelope item header ([#18954](https://github.com/getsentry/sentry-javascript/pull/18954))
- fix(react): Defer React Router span finalization until lazy routes load ([#18881](https://github.com/getsentry/sentry-javascript/pull/18881))
- 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))
- ref(core): rename `gen_ai.request.messages` to `gen_ai.input.messages` ([#18944](https://github.com/getsentry/sentry-javascript/pull/18944))
- ref(core): Set system message as separate attribute ([#18978](https://github.com/getsentry/sentry-javascript/pull/18978))
- deps: Bump version of sentry-bundler-plugins ([#18972](https://github.com/getsentry/sentry-javascript/pull/18972))

<details>
<summary><strong>Internal Changes</strong></summary>

- chore(e2e): Add e2e claude skill ([#18957](https://github.com/getsentry/sentry-javascript/pull/18957))
- chore(e2e): Add Makefile to make running specific e2e test apps easier ([#18953](https://github.com/getsentry/sentry-javascript/pull/18953))
- chore(e2e): Modify e2e skill to also account for untracked files ([#18959](https://github.com/getsentry/sentry-javascript/pull/18959))
- ref(tests): use constants in ai integration tests and add missing ones ([#18945](https://github.com/getsentry/sentry-javascript/pull/18945))
- test(nextjs): Added nextjs CF workers test app ([#18928](https://github.com/getsentry/sentry-javascript/pull/18928))
- test(prisma): Move to yarn prisma ([#18975](https://github.com/getsentry/sentry-javascript/pull/18975))

</details>

Work in this release was contributed by @sebws, @harshit078, and @fedetorre. Thank you for your contributions!

## 10.36.0

- feat(node): Add Prisma v7 support ([#18908](https://github.com/getsentry/sentry-javascript/pull/18908))
Expand Down
12 changes: 1 addition & 11 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,7 @@ Without this file, pnpm installs from the public npm registry instead of Verdacc

#### Running a Single E2E Test

```bash
# Build packages first
yarn build && yarn build:tarball

# Run a specific test app
cd dev-packages/e2e-tests
yarn test:run <app-name>

# Run with a specific variant (e.g., Next.js 15)
yarn test:run <app-name> --variant <variant-name>
```
Run the e2e skill.

#### Common Pitfalls and Debugging

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ sentryTest('sends profile_chunk envelopes in manual mode', async ({ page, getLoc
const envelopeItemHeader = profileChunkEnvelopeItem[0];
const envelopeItemPayload1 = profileChunkEnvelopeItem[1];

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

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

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

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