Skip to content

Commit c80217d

Browse files
authored
Merge branch 'develop' into fixing-outcome-flushing-replay
2 parents 6de50dc + e50b75c commit c80217d

File tree

151 files changed

+2071
-367
lines changed

Some content is hidden

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

151 files changed

+2071
-367
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,11 @@ jobs:
568568
- bundle_min
569569
- bundle_replay
570570
- bundle_tracing
571+
- bundle_tracing_logs_metrics
571572
- bundle_tracing_replay
572573
- bundle_tracing_replay_feedback
573574
- bundle_tracing_replay_feedback_min
575+
- bundle_tracing_replay_feedback_logs_metrics
574576
project:
575577
- chromium
576578
include:

.github/workflows/external-contributors.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,17 @@ jobs:
3535
name: ${{ github.event.pull_request.user.login }}
3636
author_association: ${{ github.event.pull_request.author_association }}
3737

38+
- name: Generate GitHub App token
39+
id: app-token
40+
uses: actions/create-github-app-token@v1
41+
with:
42+
app-id: ${{ vars.GITFLOW_APP_ID }}
43+
private-key: ${{ secrets.GITFLOW_APP_PRIVATE_KEY }}
44+
3845
- name: Create PR with changes
3946
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
4047
with:
41-
# This token is scoped to Daniel Griesser
42-
# If we used the default GITHUB_TOKEN, the resulting PR would not trigger CI :(
43-
token: ${{ secrets.REPO_SCOPED_TOKEN }}
48+
token: ${{ steps.app-token.outputs.token }}
4449
commit-message: 'chore: Add external contributor to CHANGELOG.md'
4550
title: 'chore: Add external contributor to CHANGELOG.md'
4651
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'

.github/workflows/gitflow-sync-develop.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ jobs:
2525
- name: git checkout
2626
uses: actions/checkout@v6
2727

28+
- name: Generate GitHub App token
29+
id: app-token
30+
uses: actions/create-github-app-token@v1
31+
with:
32+
app-id: ${{ vars.GITFLOW_APP_ID }}
33+
private-key: ${{ secrets.GITFLOW_APP_PRIVATE_KEY }}
34+
2835
# https://github.com/marketplace/actions/github-pull-request-action
2936
- name: Create Pull Request
3037
id: open-pr
@@ -35,8 +42,7 @@ jobs:
3542
pr_title: '[Gitflow] Merge ${{ env.SOURCE_BRANCH }} into ${{ env.TARGET_BRANCH }}'
3643
pr_body: 'Merge ${{ env.SOURCE_BRANCH }} branch into ${{ env.TARGET_BRANCH }}'
3744
pr_label: 'Dev: Gitflow'
38-
# This token is scoped to Daniel Griesser
39-
github_token: ${{ secrets.REPO_SCOPED_TOKEN }}
45+
github_token: ${{ steps.app-token.outputs.token }}
4046

4147
- name: Enable automerge for PR
4248
if: steps.open-pr.outputs.pr_number != ''

.size-limit.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ module.exports = [
186186
gzip: true,
187187
limit: '43 KB',
188188
},
189+
{
190+
name: 'CDN Bundle (incl. Tracing, Logs, Metrics)',
191+
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
192+
gzip: true,
193+
limit: '44 KB',
194+
},
189195
{
190196
name: 'CDN Bundle (incl. Tracing, Replay)',
191197
path: createCDNPath('bundle.tracing.replay.min.js'),
@@ -198,6 +204,12 @@ module.exports = [
198204
gzip: true,
199205
limit: '86 KB',
200206
},
207+
{
208+
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)',
209+
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
210+
gzip: true,
211+
limit: '86 KB',
212+
},
201213
// browser CDN bundles (non-gzipped)
202214
{
203215
name: 'CDN Bundle - uncompressed',
@@ -213,6 +225,13 @@ module.exports = [
213225
brotli: false,
214226
limit: '127 KB',
215227
},
228+
{
229+
name: 'CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed',
230+
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
231+
gzip: false,
232+
brotli: false,
233+
limit: '130 KB',
234+
},
216235
{
217236
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
218237
path: createCDNPath('bundle.tracing.replay.min.js'),
@@ -227,6 +246,13 @@ module.exports = [
227246
brotli: false,
228247
limit: '264 KB',
229248
},
249+
{
250+
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed',
251+
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
252+
gzip: false,
253+
brotli: false,
254+
limit: '264 KB',
255+
},
230256
// Next.js SDK (ESM)
231257
{
232258
name: '@sentry/nextjs (client)',

CHANGELOG.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,43 @@
44

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

7-
- **feat(tanstackstart-react): Add `wrapMiddlewaresWithSentry` for manual middleware instrumentation**
7+
- **feat(tanstackstart-react): Add `sentryTanstackStart` Vite plugin for source maps upload**
8+
9+
You can now configure source maps upload for TanStack Start using the `sentryTanstackStart` Vite plugin:
10+
11+
```ts
12+
// vite.config.ts
13+
import { defineConfig } from 'vite';
14+
import { sentryTanstackStart } from '@sentry/tanstackstart-react';
15+
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
16+
17+
export default defineConfig({
18+
plugins: [
19+
sentryTanstackStart({
20+
authToken: process.env.SENTRY_AUTH_TOKEN,
21+
org: 'your-org',
22+
project: 'your-project',
23+
}),
24+
tanstackStart(),
25+
],
26+
});
27+
```
28+
29+
Work in this release was contributed by @rreckonerr. Thank you for your contribution!
30+
31+
## 10.34.0
32+
33+
### Important Changes
34+
35+
- **feat(core): Add option to enhance the fetch error message ([#18466](https://github.com/getsentry/sentry-javascript/pull/18466))**
36+
37+
You can now enable enhanced fetch error messages by setting the `enhancedFetchErrorMessage` option. When enabled, the SDK will include additional context in fetch error messages to help with debugging.
38+
39+
- **feat(nextjs): Add routeManifestInjection option to exclude routes from client bundle ([#18798](https://github.com/getsentry/sentry-javascript/pull/18798))**
40+
41+
A new `routeManifestInjection` option allows you to exclude sensitive routes from being injected into the client bundle.
42+
43+
- **feat(tanstackstart-react): Add `wrapMiddlewaresWithSentry` for manual middleware instrumentation ([#18680](https://github.com/getsentry/sentry-javascript/pull/18680))**
844

945
You can now wrap your middlewares using `wrapMiddlewaresWithSentry`, allowing you to trace middleware execution in your TanStack Start application.
1046

@@ -20,6 +56,23 @@
2056
export const [wrappedLoggingMiddleware] = wrapMiddlewaresWithSentry({ loggingMiddleware });
2157
```
2258

59+
### Other Changes
60+
61+
- feat(browser): Add CDN bundle for `tracing.logs.metrics` ([#18784](https://github.com/getsentry/sentry-javascript/pull/18784))
62+
- feat(core,node-core): Consolidate bun and node types with ServerRuntimeOptions ([#18734](https://github.com/getsentry/sentry-javascript/pull/18734))
63+
- feat(nextjs): Remove tracing from generation function template ([#18733](https://github.com/getsentry/sentry-javascript/pull/18733))
64+
- fix(core): Don't record outcomes for failed client reports ([#18808](https://github.com/getsentry/sentry-javascript/pull/18808))
65+
- fix(deno,cloudflare): Prioritize name from params over name from options ([#18800](https://github.com/getsentry/sentry-javascript/pull/18800))
66+
- fix(web-vitals): Add error handling for invalid object keys in `WeakMap` ([#18809](https://github.com/getsentry/sentry-javascript/pull/18809))
67+
68+
<details>
69+
<summary><strong>Internal Changes</strong></summary>
70+
71+
- ref(nextjs): Split `withSentryConfig` ([#18777](https://github.com/getsentry/sentry-javascript/pull/18777))
72+
- test(e2e): Pin @shopify/remix-oxygen to unblock ci ([#18811](https://github.com/getsentry/sentry-javascript/pull/18811))
73+
74+
</details>
75+
2376
## 10.33.0
2477

2578
### Important Changes

dev-packages/browser-integration-tests/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ To filter tests by their title:
7474

7575
You can refer to [Playwright documentation](https://playwright.dev/docs/test-cli) for other CLI options.
7676

77-
You can set env variable `PW_BUNDLE` to set specific build or bundle to test against. Available options: `esm`, `cjs`,
78-
`bundle`, `bundle_min`
77+
You can set env variable `PW_BUNDLE` to set specific build or bundle to test against. Available options include: `esm`, `cjs`,
78+
`bundle`, `bundle_min`, `bundle_tracing`, `bundle_tracing_logs_metrics`, `bundle_replay`, `bundle_tracing_replay_feedback`, and more.
79+
See `package.json` scripts for the full list of `test:bundle:*` commands.
7980

8081
### Troubleshooting
8182

dev-packages/browser-integration-tests/package.json

Lines changed: 8 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.33.0",
3+
"version": "10.34.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -23,8 +23,14 @@
2323
"test:bundle:replay:min": "PW_BUNDLE=bundle_replay_min yarn test",
2424
"test:bundle:tracing": "PW_BUNDLE=bundle_tracing yarn test",
2525
"test:bundle:tracing:min": "PW_BUNDLE=bundle_tracing_min yarn test",
26+
"test:bundle:tracing_logs_metrics": "PW_BUNDLE=bundle_tracing_logs_metrics yarn test",
27+
"test:bundle:tracing_logs_metrics:min": "PW_BUNDLE=bundle_tracing_logs_metrics_min yarn test",
28+
"test:bundle:tracing_logs_metrics:debug_min": "PW_BUNDLE=bundle_tracing_logs_metrics_debug_min yarn test",
2629
"test:bundle:full": "PW_BUNDLE=bundle_tracing_replay_feedback yarn test",
2730
"test:bundle:full:min": "PW_BUNDLE=bundle_tracing_replay_feedback_min yarn test",
31+
"test:bundle:tracing_replay_feedback_logs_metrics": "PW_BUNDLE=bundle_tracing_replay_feedback_logs_metrics yarn test",
32+
"test:bundle:tracing_replay_feedback_logs_metrics:min": "PW_BUNDLE=bundle_tracing_replay_feedback_logs_metrics_min yarn test",
33+
"test:bundle:tracing_replay_feedback_logs_metrics:debug_min": "PW_BUNDLE=bundle_tracing_replay_feedback_logs_metrics_debug_min yarn test",
2834
"test:cjs": "PW_BUNDLE=cjs yarn test",
2935
"test:esm": "PW_BUNDLE=esm yarn test",
3036
"test:loader": "npx playwright test -c playwright.loader.config.ts --project='chromium'",
@@ -43,7 +49,7 @@
4349
"@babel/preset-typescript": "^7.16.7",
4450
"@playwright/test": "~1.56.0",
4551
"@sentry-internal/rrweb": "2.34.0",
46-
"@sentry/browser": "10.33.0",
52+
"@sentry/browser": "10.34.0",
4753
"@supabase/supabase-js": "2.49.3",
4854
"axios": "^1.12.2",
4955
"babel-loader": "^8.2.2",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
5+
// consoleLoggingIntegration should not actually work, but still not error out
6+
Sentry.init({
7+
dsn: 'https://public@dsn.ingest.sentry.io/1337',
8+
sampleRate: 1,
9+
integrations: [Sentry.consoleLoggingIntegration()],
10+
});
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { expect } from '@playwright/test';
2+
import { sentryTest } from '../../../../utils/fixtures';
3+
4+
sentryTest('exports a shim consoleLoggingIntegration for non-logs bundles', async ({ getLocalTestUrl, page }) => {
5+
const bundle = process.env.PW_BUNDLE;
6+
7+
// Only run this for CDN bundles that do NOT include logs
8+
// Skip minified bundles because DEBUG_BUILD is false and warnings won't appear
9+
if (!bundle?.startsWith('bundle') || bundle.includes('logs') || bundle.includes('min')) {
10+
sentryTest.skip();
11+
}
12+
13+
const consoleMessages: string[] = [];
14+
page.on('console', msg => consoleMessages.push(msg.text()));
15+
16+
let requestCount = 0;
17+
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
18+
requestCount++;
19+
return route.fulfill({
20+
status: 200,
21+
contentType: 'application/json',
22+
body: JSON.stringify({ id: 'test-id' }),
23+
});
24+
});
25+
26+
const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true });
27+
28+
await page.goto(url);
29+
30+
// Wait a bit to ensure no requests are made
31+
await page.waitForTimeout(500);
32+
33+
expect(requestCount).toBe(0);
34+
expect(consoleMessages).toEqual([
35+
'You are using consoleLoggingIntegration() even though this bundle does not include logs.',
36+
]);
37+
});

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { sentryTest } from '../../../../utils/fixtures';
44
import {
55
getFirstSentryEnvelopeRequest,
66
properFullEnvelopeRequestParser,
7-
testingCdnBundle,
7+
shouldSkipLogsTest,
88
} from '../../../../utils/helpers';
99

1010
sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
11-
// Only run this for npm package exports
12-
sentryTest.skip(testingCdnBundle());
11+
// Only run this for npm package exports and CDN bundles with logs
12+
sentryTest.skip(shouldSkipLogsTest());
1313

1414
const url = await getLocalTestUrl({ testDir: __dirname });
1515

0 commit comments

Comments
 (0)