Skip to content

Commit eb898f5

Browse files
authored
Merge pull request #7666 from getsentry/prepare-release/7.46.0
meta(changelog): Update changelog for 7.46.0
2 parents ca704ef + 5e288f5 commit eb898f5

File tree

293 files changed

+7158
-3705
lines changed

Some content is hidden

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

293 files changed

+7158
-3705
lines changed

.github/codeql/codeql-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
paths-ignore:
2+
# Our tsconfig files contain comments, which CodeQL complains about
3+
- '**/tsconfig.json'
4+
- '**/tsconfig.*.json'

.github/workflows/build.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ jobs:
185185
name: Build
186186
needs: [job_get_metadata, job_install_deps]
187187
runs-on: ubuntu-20.04
188-
timeout-minutes: 20
188+
timeout-minutes: 30
189189
steps:
190190
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
191191
uses: actions/checkout@v3
@@ -371,7 +371,6 @@ jobs:
371371
path: |
372372
${{ github.workspace }}/packages/browser/build/bundles/**
373373
${{ github.workspace }}/packages/integrations/build/bundles/**
374-
${{ github.workspace }}/packages/tracing/build/bundles/**
375374
${{ github.workspace }}/packages/replay/build/bundles/**
376375
${{ github.workspace }}/packages/**/*.tgz
377376
@@ -482,7 +481,7 @@ jobs:
482481
yarn test:integration
483482
484483
job_browser_playwright_tests:
485-
name: Playwright (${{ matrix.bundle }})${{ (matrix.tracing_only && ' tracing only') || '' }} Tests
484+
name: Playwright (${{ matrix.bundle }}) Tests
486485
needs: [job_get_metadata, job_build]
487486
if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
488487
runs-on: ubuntu-20.04
@@ -499,16 +498,13 @@ jobs:
499498
- bundle_es6_min
500499
- bundle_replay_es6
501500
- bundle_replay_es6_min
502-
tracing_only:
503-
- true
504-
- false
505-
exclude:
506-
# `tracing_only` only makes a difference for bundles - tests of the esm and cjs builds always include the
507-
# tracing tests
508-
- bundle: esm
509-
tracing_only: false
510-
- bundle: cjs
511-
tracing_only: false
501+
- bundle_tracing_es5
502+
- bundle_tracing_es5_min
503+
- bundle_tracing_es6
504+
- bundle_tracing_es6_min
505+
- bundle_tracing_replay_es6
506+
- bundle_tracing_replay_es6_min
507+
512508
steps:
513509
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
514510
uses: actions/checkout@v3
@@ -543,7 +539,6 @@ jobs:
543539
- name: Run Playwright tests
544540
env:
545541
PW_BUNDLE: ${{ matrix.bundle }}
546-
PW_TRACING_ONLY: ${{ matrix.tracing_only }}
547542
run: |
548543
cd packages/browser-integration-tests
549544
yarn test:ci

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
- name: Initialize CodeQL
5151
uses: github/codeql-action/init@v2
5252
with:
53+
config-file: ./.github/codeql/codeql-config.yml
5354
languages: ${{ matrix.language }}
5455
# If you wish to specify custom queries, you can do so here or in a config file.
5556
# By default, queries listed here will override any specified in a config file.

.size-limit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ module.exports = [
5353
},
5454
{
5555
name: '@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)',
56-
path: 'packages/tracing/build/bundles/bundle.tracing.es5.min.js',
56+
path: 'packages/browser/build/bundles/bundle.tracing.es5.min.js',
5757
gzip: true,
5858
limit: '37 KB',
5959
},
6060
{
6161
name: '@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)',
62-
path: 'packages/tracing/build/bundles/bundle.tracing.min.js',
62+
path: 'packages/browser/build/bundles/bundle.tracing.min.js',
6363
gzip: true,
6464
limit: '35 KB',
6565
},
@@ -80,7 +80,7 @@ module.exports = [
8080
},
8181
{
8282
name: '@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified)',
83-
path: 'packages/tracing/build/bundles/bundle.tracing.replay.min.js',
83+
path: 'packages/browser/build/bundles/bundle.tracing.replay.min.js',
8484
gzip: true,
8585
limit: '80 KB',
8686
},

CHANGELOG.md

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

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

7+
## 7.46.0
8+
9+
### Important Changes
10+
11+
- **feat(sveltekit)**: Add Performance Monitoring for SvelteKit
12+
- feat(sveltekit): Add meta tag for backend -> frontend (#7574)
13+
- fix(sveltekit): Explicitly export Node SDK exports (#7644)
14+
- fix(sveltekit): Handle nested server calls in `sentryHandle` (#7598)
15+
- ref(sveltekit): Split up universal and server load wrappers (#7652)
16+
17+
This release adds support for Performance Monitoring in our SvelteKit SDK for the client/server. We've also changed how you should initialize your SDK. Please read our updated [SvelteKit README instructions](./packages/sveltekit/README.md) for more details.
18+
19+
- **feat(core)**: Add `ignoreTransactions` option (#7594)
20+
21+
You can now easily filter out certain transactions from being sent to Sentry based on their name.
22+
23+
```ts
24+
Sentry.init({
25+
ignoreTransactions: ['/api/healthcheck', '/ping'],
26+
})
27+
```
28+
29+
- **feat(node)**: Undici integration (#7582)
30+
- feat(nextjs): Add Undici integration automatically (#7648)
31+
- feat(sveltekit): Add Undici integration by default (#7650)
32+
33+
We've added an integration that automatically instruments [Undici](https://github.com/nodejs/undici) and Node server side fetch. This supports Undici `v4.7.0` or higher and requires Node `v16.7.0` or higher. After adding the integration outgoing requests made by Undici will have associated spans and breadcrumbs in Sentry.
34+
35+
```ts
36+
Sentry.init({
37+
integrations: [new Sentry.Integrations.Undici()],
38+
})
39+
```
40+
41+
In our Next.js and SvelteKit SDKs, this integration is automatically added.
42+
43+
- **feat(node)**: Add Sentry tRPC middleware (#7511)
44+
45+
We've added a new middleware for [trpc](https://trpc.io/) that automatically adds TRPC information to Sentry transactions. This middleware is meant to be used in combination with a Sentry server integration (Next.js, Express, etc).
46+
47+
```ts
48+
import { initTRPC } from '@trpc/server';
49+
import * as Sentry from '@sentry/node';
50+
51+
const t = initTRPC.context().create();
52+
const sentryMiddleware = t.middleware(
53+
Sentry.Handlers.trpcMiddleware({
54+
attachRpcInput: true,
55+
}),
56+
);
57+
58+
const sentrifiedProcedure = t.procedure.use(sentryMiddleware);
59+
```
60+
61+
- **fix(node)**: Convert debugging code to callbacks to fix memory leak in `LocalVariables` integration (#7637)
62+
63+
This fixes a memory leak in the opt-in [`LocalVariables` integration](https://blog.sentry.io/2023/02/01/local-variables-for-nodejs-in-sentry/), which adds local variables to the stacktraces sent to Sentry. The minimum recommended version to use the `LocalVariables` is now `7.46.0`.
64+
65+
### Additional Features and Fixes
66+
67+
- feat(node): Auto discovery only returns integrations where dependency loads (#7603)
68+
- feat(node): Sanitize URLs in Span descriptions and breadcrumbs (PII) (#7667)
69+
- feat(replay): Add `responseStatus`, `decodedBodySize` to perf entries (#7613)
70+
- feat(replay): Add experiment to capture request/response bodies (#7589)
71+
- feat(replay): Capture replay mutation breadcrumbs & add experiment (#7568)
72+
- feat(tracing): Ensure `pageload` transaction starts at timeOrigin (#7632)
73+
- fix(core): Remove `abs_path` from stack trace (reverting #7167) (#7623)
74+
- fix(nextjs): Add loading component type to server component wrapping (#7639)
75+
- fix(nextjs): Don't report `NEXT_NOT_FOUND` and `NEXT_REDIRECT` errors (#7642)
76+
- fix(nextjs): Rewrite `abs_path` frames (#7619)
77+
- fix(nextjs): Show errors and warnings only once during build (#7651)
78+
- fix(nextjs): Use Next.js internal AsyncStorage (#7630)
79+
- fix(nextjs): Gracefully handle undefined `beforeFiles` in rewrites (#7649)
80+
81+
Work in this release contributed by @aldenquimby and @bertho-zero. Thank you for your contributions!
82+
783
## 7.45.0
884

985
- build(cdn): Ensure ES5 bundles do not use non-ES5 code (#7550)

CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
packages/replay @getsentry/replay-sdk
2+
packages/replay-worker @getsentry/replay-sdk
3+
packages/browser-integration-tests/suites/replay @getsentry/replay-sdk

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
"rollup-plugin-cleanup": "3.2.1",
111111
"rollup-plugin-license": "^2.6.1",
112112
"rollup-plugin-terser": "^7.0.2",
113-
"rollup-plugin-typescript2": "^0.31.2",
114113
"sinon": "^7.3.2",
115114
"size-limit": "^4.5.5",
116115
"ts-jest": "^27.1.4",

packages/angular-ivy/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,26 +80,25 @@ see `ErrorHandlerOptions` interface in `src/errorhandler.ts`.
8080

8181
### Tracing
8282

83-
`@sentry/angular-ivy` exports a Trace Service, Directive and Decorators that leverage the `@sentry/tracing` Tracing
84-
integration to add Angular related spans to transactions. If the Tracing integration is not enabled, this functionality
85-
will not work. The service itself tracks route changes and durations, where directive and decorators are tracking
86-
components initializations.
83+
`@sentry/angular-ivy` exports a Trace Service, Directive and Decorators that leverage the tracing features to add
84+
Angular-related spans to transactions. If tracing is not enabled, this functionality will not work. The SDK's
85+
`TraceService` itself tracks route changes and durations, while directive and decorators are tracking components
86+
initializations.
8787

8888
#### Install
8989

9090
Registering a Trace Service is a 3-step process.
9191

92-
1. Register and configure the `BrowserTracing` integration from `@sentry/tracing`, including custom Angular routing
92+
1. Register and configure the `BrowserTracing` integration, including custom Angular routing
9393
instrumentation:
9494

9595
```javascript
96-
import { init, instrumentAngularRouting } from '@sentry/angular-ivy';
97-
import { Integrations as TracingIntegrations } from '@sentry/tracing';
96+
import { init, instrumentAngularRouting, BrowserTracing } from '@sentry/angular-ivy';
9897

9998
init({
10099
dsn: '__DSN__',
101100
integrations: [
102-
new TracingIntegrations.BrowserTracing({
101+
new BrowserTracing({
103102
tracingOrigins: ['localhost', 'https://yourserver.io/api'],
104103
routingInstrumentation: instrumentAngularRouting,
105104
}),

packages/angular/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,25 @@ see `ErrorHandlerOptions` interface in `src/errorhandler.ts`.
7676

7777
### Tracing
7878

79-
`@sentry/angular` exports a Trace Service, Directive and Decorators that leverage the `@sentry/tracing` Tracing
80-
integration to add Angular related spans to transactions. If the Tracing integration is not enabled, this functionality
81-
will not work. The service itself tracks route changes and durations, where directive and decorators are tracking
79+
`@sentry/angular` exports a Trace Service, Directive and Decorators that leverage the tracing
80+
features to add Angular-related spans to transactions. If tracing is not enabled, this functionality
81+
will not work. The SDK's `TraceService` itself tracks route changes and durations, while directive and decorators are tracking
8282
components initializations.
8383

8484
#### Install
8585

8686
Registering a Trace Service is a 3-step process.
8787

88-
1. Register and configure the `BrowserTracing` integration from `@sentry/tracing`, including custom Angular routing
88+
1. Register and configure the `BrowserTracing` integration, including custom Angular routing
8989
instrumentation:
9090

9191
```javascript
92-
import { init, instrumentAngularRouting } from '@sentry/angular';
93-
import { Integrations as TracingIntegrations } from '@sentry/tracing';
92+
import { init, instrumentAngularRouting, BrowserTracing } from '@sentry/angular';
9493

9594
init({
9695
dsn: '__DSN__',
9796
integrations: [
98-
new TracingIntegrations.BrowserTracing({
97+
new BrowserTracing({
9998
tracingOrigins: ['localhost', 'https://yourserver.io/api'],
10099
routingInstrumentation: instrumentAngularRouting,
101100
}),

packages/angular/test/tsconfig.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/browser-integration-tests/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
"test:bundle:es6:min": "PW_BUNDLE=bundle_es6_min yarn test",
2626
"test:bundle:replay:es6": "PW_BUNDLE=bundle_replay_es6 yarn test",
2727
"test:bundle:replay:es6:min": "PW_BUNDLE=bundle_replay_es6_min yarn test",
28+
"test:bundle:tracing:es5": "PW_BUNDLE=bundle_tracing_es5 yarn test",
29+
"test:bundle:tracing:es5:min": "PW_BUNDLE=bundle_tracing_es5_min yarn test",
30+
"test:bundle:tracing:es6": "PW_BUNDLE=bundle_tracing_es6 yarn test",
31+
"test:bundle:tracing:es6:min": "PW_BUNDLE=bundle_tracing_es6_min yarn test",
32+
"test:bundle:tracing:replay:es6": "PW_BUNDLE=bundle_tracing_replay_es6 yarn test",
33+
"test:bundle:tracing:replay:es6:min": "PW_BUNDLE=bundle_tracing_replay_es6_min yarn test",
2834
"test:cjs": "PW_BUNDLE=cjs yarn test",
2935
"test:esm": "PW_BUNDLE=esm yarn test",
3036
"test:ci": "playwright test ./suites --browser='all' --reporter='line'",
Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
1-
const transaction = Sentry.startTransaction({ name: 'test_transaction_1' });
2-
const span_1 = transaction.startChild({
3-
op: 'span_1',
4-
data: {
5-
foo: 'bar',
6-
baz: [1, 2, 3],
7-
},
8-
});
9-
for (let i = 0; i < 2000; i++);
1+
async function run() {
2+
const transaction = Sentry.startTransaction({ name: 'test_transaction_1' });
3+
const span_1 = transaction.startChild({
4+
op: 'span_1',
5+
data: {
6+
foo: 'bar',
7+
baz: [1, 2, 3],
8+
},
9+
});
1010

11-
// span_1 finishes
12-
span_1.finish();
11+
await new Promise(resolve => setTimeout(resolve, 1));
1312

14-
// span_2 doesn't finish
15-
const span_2 = transaction.startChild({ op: 'span_2' });
16-
for (let i = 0; i < 4000; i++);
13+
// span_1 finishes
14+
span_1.finish();
1715

18-
const span_3 = transaction.startChild({ op: 'span_3' });
19-
for (let i = 0; i < 4000; i++);
16+
// span_2 doesn't finish
17+
const span_2 = transaction.startChild({ op: 'span_2' });
18+
await new Promise(resolve => setTimeout(resolve, 1));
2019

21-
// span_4 is the child of span_3 but doesn't finish.
22-
const span_4 = span_3.startChild({ op: 'span_4', data: { qux: 'quux' } });
20+
const span_3 = transaction.startChild({ op: 'span_3' });
21+
await new Promise(resolve => setTimeout(resolve, 1));
2322

24-
// span_5 is another child of span_3 but finishes.
25-
const span_5 = span_3.startChild({ op: 'span_5' }).finish();
23+
// span_4 is the child of span_3 but doesn't finish.
24+
const span_4 = span_3.startChild({ op: 'span_4', data: { qux: 'quux' } });
2625

27-
// span_3 also finishes
28-
span_3.finish();
26+
// span_5 is another child of span_3 but finishes.
27+
const span_5 = span_3.startChild({ op: 'span_5' }).finish();
2928

30-
transaction.finish();
29+
// span_3 also finishes
30+
span_3.finish();
31+
32+
transaction.finish();
33+
}
34+
35+
run();

packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ import { expect } from '@playwright/test';
22
import type { Event } from '@sentry/types';
33

44
import { sentryTest } from '../../../../utils/fixtures';
5-
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
5+
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
66

77
sentryTest('should report a transaction in an envelope', async ({ getLocalTestPath, page }) => {
8+
if (shouldSkipTracingTest()) {
9+
sentryTest.skip();
10+
}
11+
812
const url = await getLocalTestPath({ testDir: __dirname });
913
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);
1014

@@ -13,6 +17,10 @@ sentryTest('should report a transaction in an envelope', async ({ getLocalTestPa
1317
});
1418

1519
sentryTest('should report finished spans as children of the root transaction', async ({ getLocalTestPath, page }) => {
20+
if (shouldSkipTracingTest()) {
21+
sentryTest.skip();
22+
}
23+
1624
const url = await getLocalTestPath({ testDir: __dirname });
1725
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);
1826

packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ import { expect } from '@playwright/test';
22
import type { Event } from '@sentry/types';
33

44
import { sentryTest } from '../../../../utils/fixtures';
5-
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
5+
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
66

77
sentryTest('should be able to handle circular data', async ({ getLocalTestPath, page }) => {
8+
if (shouldSkipTracingTest()) {
9+
sentryTest.skip();
10+
}
11+
812
const url = await getLocalTestPath({ testDir: __dirname });
913
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
1014

packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ import { expect } from '@playwright/test';
22
import type { Event } from '@sentry/types';
33

44
import { sentryTest } from '../../../../utils/fixtures';
5-
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
5+
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
66

77
sentryTest('should attach measurement to transaction', async ({ getLocalTestPath, page }) => {
8+
if (shouldSkipTracingTest()) {
9+
sentryTest.skip();
10+
}
11+
812
const url = await getLocalTestPath({ testDir: __dirname });
913
const event = await getFirstSentryEnvelopeRequest<Event>(page, url);
1014

0 commit comments

Comments
 (0)