Skip to content

meta(changelog): Update changelog for 7.46.0 #7666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9309b3b
Merge pull request #7605 from getsentry/master
github-actions[bot] Mar 24, 2023
b830f87
ci: Fix CodeQL by skipping tsconfig.json (#7607)
mydea Mar 24, 2023
dce26c9
build(tracing-internal): Remove circular dependency (#7608)
mydea Mar 24, 2023
11704a3
feat(sveltekit): Add meta tag for backend -> frontend (#7574)
AbhiPrasad Mar 24, 2023
68c2301
build: Remove `test/tsconfig.json` files (#7606)
mydea Mar 24, 2023
a2103f3
feat(replay): Capture replay mutation breadcrumbs & add experiment (#…
mydea Mar 24, 2023
5abe629
ref(sveltekit): Distinguish spans of server-only and universal load f…
Lms24 Mar 24, 2023
e1af1e6
feat(node): Auto discovery only returns integrations where dependency…
timfish Mar 24, 2023
a2bd1e0
test: Try to fix flaky tests? (#7597)
mydea Mar 27, 2023
b589685
fix(nextjs): Rewrite `abs_path` frames (#7619)
Mar 27, 2023
02d065d
build(cdn): Make integration CDN bundles build in parallel (#7621)
mydea Mar 27, 2023
2e5d850
chore(browser): Add attribution and licences for stack parsers (#7620)
timfish Mar 27, 2023
f6ce5c9
fix(sveltekit): Fix `<meta>` tag injection (#7612)
Lms24 Mar 27, 2023
0fab403
fix(core): Remove `abs_path` from stack trace (reverting #7167) (#7623)
Mar 27, 2023
0ed4f87
build(cdn): Move tracing CDN bundle generation to `@sentry/browser` (…
mydea Mar 27, 2023
6162fb8
chore(browser): Add attribution and licences for stack parsers (#7620)
timfish Mar 27, 2023
46f996e
feat(node): Undici integration (#7582)
AbhiPrasad Mar 27, 2023
ee59584
chore(node): Remove src/declarations.d.ts (#7627)
AbhiPrasad Mar 27, 2023
7d080dc
feat(replay): Add `responseStatus`, `decodedBodySize` to perf entries…
billyvg Mar 27, 2023
d330c2f
test(utils): Add test for global rate limit response with scope (#7631)
Lms24 Mar 28, 2023
3ba8265
feat(core): Add `ignoreTransactions` option (#7594)
mydea Mar 28, 2023
849297a
feat(tracing): Ensure `pageload` transaction starts at timeOrigin (#7…
mydea Mar 28, 2023
0743e98
chore(vue): Add attribution license (#7633)
AbhiPrasad Mar 28, 2023
30f2c24
feat(replay): Add experiment to capture request/response bodies (#7589)
mydea Mar 29, 2023
2974ff1
fix(nextjs): Use Next.js internal AsyncStorage (#7630)
Mar 29, 2023
f033ede
chore(utils): Add license to vendor attribution (#7635)
AbhiPrasad Mar 29, 2023
32675e8
test(node): Add tests for Undici (#7628)
AbhiPrasad Mar 29, 2023
b068c68
chore(remix): Add license text to vendored files (#7629)
AbhiPrasad Mar 29, 2023
773f180
fix(sveltekit): Handle nested server calls in `sentryHandle` (#7598)
Lms24 Mar 29, 2023
e7a0b1c
fix(nextjs): Add loading component type to server component wrapping …
Mar 29, 2023
9619432
tests(e2e): Undo intentional error (#7643)
Mar 29, 2023
ccd5f27
meta: Add CODEOWNERS (for replay only) (#7636)
billyvg Mar 29, 2023
0643828
fix(nextjs): Don't report `NEXT_NOT_FOUND` and `NEXT_REDIRECT` errors…
Mar 29, 2023
8a25d00
fix(node): Convert debugging code to callbacks to fix memory leak in …
timfish Mar 29, 2023
3a91a62
fix(nextjs): Show errors and warnings only once during build (#7651)
Mar 29, 2023
1b04113
ref(node): Clean up Undici options (#7646)
AbhiPrasad Mar 29, 2023
9e98330
feat(nextjs): Add Undici integration automatically (#7648)
AbhiPrasad Mar 29, 2023
120ae6d
feat(sveltekit): Add Undici integration by default (#7650)
AbhiPrasad Mar 29, 2023
a3dfde6
fix(sveltekit): Explicitly export Node SDK exports (#7644)
Lms24 Mar 30, 2023
6678a4a
doc(sveltekit): Update README (#7653)
Lms24 Mar 30, 2023
dc0179c
ref(sveltekit): Split up universal and server load wrappers (#7652)
Lms24 Mar 30, 2023
e055f27
feat(tracing): Add custom finishReason for when interaction is interr…
0Calories Mar 30, 2023
d98ac5d
feat(tracing): Do not create interactions if `navigation` or `pageloa…
0Calories Mar 30, 2023
bb11a2e
feat(node): Add Sentry tRPC middleware (#7511)
Mar 30, 2023
cefd523
ref(sveltekit): Inject init plugin only if sentry config files exist …
Lms24 Mar 30, 2023
1eb271a
doc(sveltekit): Move SDK initialization to hooks and restructure setu…
Lms24 Mar 30, 2023
65c44ec
perf(build): Use @rollup/plugin-typescript for es5 builds (#7665)
AbhiPrasad Mar 30, 2023
9ecd152
feat(node): Sanitize URLs in Span descriptions and breadcrumbs (#7667)
Lms24 Mar 30, 2023
1403e77
test: Make E2E tests async & parallelizable (#7466)
mydea Mar 30, 2023
d94a017
fix(docs): Remove references to `@sentry/tracing` from READMEs (#7600)
timfish Mar 30, 2023
5e288f5
meta(changelog): Update changelog for 7.46.0
AbhiPrasad Mar 30, 2023
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
4 changes: 4 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths-ignore:
# Our tsconfig files contain comments, which CodeQL complains about
- '**/tsconfig.json'
- '**/tsconfig.*.json'
23 changes: 9 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
name: Build
needs: [job_get_metadata, job_install_deps]
runs-on: ubuntu-20.04
timeout-minutes: 20
timeout-minutes: 30
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand Down Expand Up @@ -371,7 +371,6 @@ jobs:
path: |
${{ github.workspace }}/packages/browser/build/bundles/**
${{ github.workspace }}/packages/integrations/build/bundles/**
${{ github.workspace }}/packages/tracing/build/bundles/**
${{ github.workspace }}/packages/replay/build/bundles/**
${{ github.workspace }}/packages/**/*.tgz

Expand Down Expand Up @@ -482,7 +481,7 @@ jobs:
yarn test:integration

job_browser_playwright_tests:
name: Playwright (${{ matrix.bundle }})${{ (matrix.tracing_only && ' tracing only') || '' }} Tests
name: Playwright (${{ matrix.bundle }}) Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All @@ -499,16 +498,13 @@ jobs:
- bundle_es6_min
- bundle_replay_es6
- bundle_replay_es6_min
tracing_only:
- true
- false
exclude:
# `tracing_only` only makes a difference for bundles - tests of the esm and cjs builds always include the
# tracing tests
- bundle: esm
tracing_only: false
- bundle: cjs
tracing_only: false
- bundle_tracing_es5
- bundle_tracing_es5_min
- bundle_tracing_es6
- bundle_tracing_es6_min
- bundle_tracing_replay_es6
- bundle_tracing_replay_es6_min

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand Down Expand Up @@ -543,7 +539,6 @@ jobs:
- name: Run Playwright tests
env:
PW_BUNDLE: ${{ matrix.bundle }}
PW_TRACING_ONLY: ${{ matrix.tracing_only }}
run: |
cd packages/browser-integration-tests
yarn test:ci
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ module.exports = [
},
{
name: '@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)',
path: 'packages/tracing/build/bundles/bundle.tracing.es5.min.js',
path: 'packages/browser/build/bundles/bundle.tracing.es5.min.js',
gzip: true,
limit: '37 KB',
},
{
name: '@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)',
path: 'packages/tracing/build/bundles/bundle.tracing.min.js',
path: 'packages/browser/build/bundles/bundle.tracing.min.js',
gzip: true,
limit: '35 KB',
},
Expand All @@ -80,7 +80,7 @@ module.exports = [
},
{
name: '@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified)',
path: 'packages/tracing/build/bundles/bundle.tracing.replay.min.js',
path: 'packages/browser/build/bundles/bundle.tracing.replay.min.js',
gzip: true,
limit: '80 KB',
},
Expand Down
76 changes: 76 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,82 @@

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

## 7.46.0

### Important Changes

- **feat(sveltekit)**: Add Performance Monitoring for SvelteKit
- feat(sveltekit): Add meta tag for backend -> frontend (#7574)
- fix(sveltekit): Explicitly export Node SDK exports (#7644)
- fix(sveltekit): Handle nested server calls in `sentryHandle` (#7598)
- ref(sveltekit): Split up universal and server load wrappers (#7652)

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.

- **feat(core)**: Add `ignoreTransactions` option (#7594)

You can now easily filter out certain transactions from being sent to Sentry based on their name.

```ts
Sentry.init({
ignoreTransactions: ['/api/healthcheck', '/ping'],
})
```

- **feat(node)**: Undici integration (#7582)
- feat(nextjs): Add Undici integration automatically (#7648)
- feat(sveltekit): Add Undici integration by default (#7650)

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.

```ts
Sentry.init({
integrations: [new Sentry.Integrations.Undici()],
})
```

In our Next.js and SvelteKit SDKs, this integration is automatically added.

- **feat(node)**: Add Sentry tRPC middleware (#7511)

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

```ts
import { initTRPC } from '@trpc/server';
import * as Sentry from '@sentry/node';

const t = initTRPC.context().create();
const sentryMiddleware = t.middleware(
Sentry.Handlers.trpcMiddleware({
attachRpcInput: true,
}),
);

const sentrifiedProcedure = t.procedure.use(sentryMiddleware);
```

- **fix(node)**: Convert debugging code to callbacks to fix memory leak in `LocalVariables` integration (#7637)

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`.

### Additional Features and Fixes

- feat(node): Auto discovery only returns integrations where dependency loads (#7603)
- feat(node): Sanitize URLs in Span descriptions and breadcrumbs (PII) (#7667)
- feat(replay): Add `responseStatus`, `decodedBodySize` to perf entries (#7613)
- feat(replay): Add experiment to capture request/response bodies (#7589)
- feat(replay): Capture replay mutation breadcrumbs & add experiment (#7568)
- feat(tracing): Ensure `pageload` transaction starts at timeOrigin (#7632)
- fix(core): Remove `abs_path` from stack trace (reverting #7167) (#7623)
- fix(nextjs): Add loading component type to server component wrapping (#7639)
- fix(nextjs): Don't report `NEXT_NOT_FOUND` and `NEXT_REDIRECT` errors (#7642)
- fix(nextjs): Rewrite `abs_path` frames (#7619)
- fix(nextjs): Show errors and warnings only once during build (#7651)
- fix(nextjs): Use Next.js internal AsyncStorage (#7630)
- fix(nextjs): Gracefully handle undefined `beforeFiles` in rewrites (#7649)

Work in this release contributed by @aldenquimby and @bertho-zero. Thank you for your contributions!

## 7.45.0

- build(cdn): Ensure ES5 bundles do not use non-ES5 code (#7550)
Expand Down
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages/replay @getsentry/replay-sdk
packages/replay-worker @getsentry/replay-sdk
packages/browser-integration-tests/suites/replay @getsentry/replay-sdk
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
"rollup-plugin-cleanup": "3.2.1",
"rollup-plugin-license": "^2.6.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.31.2",
"sinon": "^7.3.2",
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
Expand Down
15 changes: 7 additions & 8 deletions packages/angular-ivy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,25 @@ see `ErrorHandlerOptions` interface in `src/errorhandler.ts`.

### Tracing

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

#### Install

Registering a Trace Service is a 3-step process.

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

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

init({
dsn: '__DSN__',
integrations: [
new TracingIntegrations.BrowserTracing({
new BrowserTracing({
tracingOrigins: ['localhost', 'https://yourserver.io/api'],
routingInstrumentation: instrumentAngularRouting,
}),
Expand Down
13 changes: 6 additions & 7 deletions packages/angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,25 @@ see `ErrorHandlerOptions` interface in `src/errorhandler.ts`.

### Tracing

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

#### Install

Registering a Trace Service is a 3-step process.

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

```javascript
import { init, instrumentAngularRouting } from '@sentry/angular';
import { Integrations as TracingIntegrations } from '@sentry/tracing';
import { init, instrumentAngularRouting, BrowserTracing } from '@sentry/angular';

init({
dsn: '__DSN__',
integrations: [
new TracingIntegrations.BrowserTracing({
new BrowserTracing({
tracingOrigins: ['localhost', 'https://yourserver.io/api'],
routingInstrumentation: instrumentAngularRouting,
}),
Expand Down
8 changes: 0 additions & 8 deletions packages/angular/test/tsconfig.json

This file was deleted.

6 changes: 6 additions & 0 deletions packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"test:bundle:es6:min": "PW_BUNDLE=bundle_es6_min yarn test",
"test:bundle:replay:es6": "PW_BUNDLE=bundle_replay_es6 yarn test",
"test:bundle:replay:es6:min": "PW_BUNDLE=bundle_replay_es6_min yarn test",
"test:bundle:tracing:es5": "PW_BUNDLE=bundle_tracing_es5 yarn test",
"test:bundle:tracing:es5:min": "PW_BUNDLE=bundle_tracing_es5_min yarn test",
"test:bundle:tracing:es6": "PW_BUNDLE=bundle_tracing_es6 yarn test",
"test:bundle:tracing:es6:min": "PW_BUNDLE=bundle_tracing_es6_min yarn test",
"test:bundle:tracing:replay:es6": "PW_BUNDLE=bundle_tracing_replay_es6 yarn test",
"test:bundle:tracing:replay:es6:min": "PW_BUNDLE=bundle_tracing_replay_es6_min yarn test",
"test:cjs": "PW_BUNDLE=cjs yarn test",
"test:esm": "PW_BUNDLE=esm yarn test",
"test:ci": "playwright test ./suites --browser='all' --reporter='line'",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
const transaction = Sentry.startTransaction({ name: 'test_transaction_1' });
const span_1 = transaction.startChild({
op: 'span_1',
data: {
foo: 'bar',
baz: [1, 2, 3],
},
});
for (let i = 0; i < 2000; i++);
async function run() {
const transaction = Sentry.startTransaction({ name: 'test_transaction_1' });
const span_1 = transaction.startChild({
op: 'span_1',
data: {
foo: 'bar',
baz: [1, 2, 3],
},
});

// span_1 finishes
span_1.finish();
await new Promise(resolve => setTimeout(resolve, 1));

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

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

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

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

// span_3 also finishes
span_3.finish();
// span_5 is another child of span_3 but finishes.
const span_5 = span_3.startChild({ op: 'span_5' }).finish();

transaction.finish();
// span_3 also finishes
span_3.finish();

transaction.finish();
}

run();
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import { expect } from '@playwright/test';
import type { Event } from '@sentry/types';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';

sentryTest('should report a transaction in an envelope', async ({ getLocalTestPath, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);

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

sentryTest('should report finished spans as children of the root transaction', async ({ getLocalTestPath, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import { expect } from '@playwright/test';
import type { Event } from '@sentry/types';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';

sentryTest('should be able to handle circular data', async ({ getLocalTestPath, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import { expect } from '@playwright/test';
import type { Event } from '@sentry/types';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';

sentryTest('should attach measurement to transaction', async ({ getLocalTestPath, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });
const event = await getFirstSentryEnvelopeRequest<Event>(page, url);

Expand Down
Loading