Skip to content

meta: Update CHANGELOG for 7.45.0 #7599

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 39 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
15a36bc
feat(sveltekit): Add performance monitoring to Sveltekit server handl…
AbhiPrasad Mar 21, 2023
a11283c
Merge pull request #7547 from getsentry/master
github-actions[bot] Mar 21, 2023
6426b58
feat(hub): Make scope always defined on the hub (#7551)
AbhiPrasad Mar 21, 2023
5c5ac2c
ref(browser): Remove `sendBeacon` API usage (#7552)
AbhiPrasad Mar 21, 2023
7b9198f
fix(browser): Ensure keepalive flag is correctly set for parallel req…
mydea Mar 21, 2023
72dca3e
chore(otel): Update docs for using propagator (#7548)
AbhiPrasad Mar 21, 2023
2738b5f
ref(core): Remove guards around scope usage (#7554)
AbhiPrasad Mar 21, 2023
95b0a6c
feat(node): Export tracing from `@sentry/node` (#7503)
timfish Mar 21, 2023
86b89b9
feat(tracing): Migrate some imports away from `@sentry/tracing` (#7539)
timfish Mar 21, 2023
baff7dd
feat(nextjs): Remove `@sentry/tracing` dependency from nextjs SDK (#7…
timfish Mar 22, 2023
a73f58b
fix(node): Consider tracing error handler for process exit (#7558)
timfish Mar 22, 2023
4f34b5a
feat(core): Add trace function (#7556)
AbhiPrasad Mar 22, 2023
89b5720
fix(tracing): Account for case where startTransaction returns undefin…
AbhiPrasad Mar 22, 2023
e97b097
feat(sveltekit): Add SvelteKit routing instrumentation (#7565)
Lms24 Mar 22, 2023
d265fe5
ref(sveltekit): Rewrite `sentryHandle` using trace func (#7559)
AbhiPrasad Mar 22, 2023
714a9eb
feat(sveltekit): Add performance monitoring for server load (#7536)
AbhiPrasad Mar 22, 2023
046c0c2
fix(nextjs): Add tracing extension methods in `wrapServerComponentWit…
Lms24 Mar 22, 2023
09ee30b
feat(sveltekit): Add performance monitoring for client load (#7537)
AbhiPrasad Mar 22, 2023
8e78e6e
fix(react): Handle case where error.cause already defined (#7557)
AbhiPrasad Mar 22, 2023
aca5249
ci: Improve flaky test detector performance (#7569)
mydea Mar 22, 2023
21dd20d
feat(replay): Capture fetch body size for replay events (#7524)
mydea Mar 22, 2023
0e3552d
build(cdn): Ensure ES5 bundles do not use non-ES5 code (#7550)
mydea Mar 22, 2023
ff469ab
feat(tracing): Remove some more `@sentry/tracing` references (#7570)
timfish Mar 22, 2023
eb1a87c
feat(otel): Remove `@sentry/tracing` dependency from `opentelemetry-n…
timfish Mar 22, 2023
98b6a1c
feat(remix): Remove `@sentry/tracing` dependency from Remix SDK (#7575)
timfish Mar 22, 2023
f38ad39
feat(gatsby): Remove `@sentry/tracing` dependency from Gatsby SDK (#7…
timfish Mar 22, 2023
383e929
feat(serverless): Remove `@sentry/tracing` dependency from serverless…
timfish Mar 22, 2023
551aedc
test(replay): Add replay E2E test (#7486)
mydea Mar 23, 2023
0a1a567
fix(core): Ensure `ignoreErrors` only applies to error events (#7573)
mydea Mar 23, 2023
579d119
feat(replay): Add `replay_id` to transaction DSC (#7571)
mydea Mar 23, 2023
b0be4dd
feat(ember): Remove `@sentry/tracing` dependency from Ember SDK (#7583)
timfish Mar 23, 2023
f1128bd
fix(sveltekit): Termporarily disable serverside load tracing (#7587)
Lms24 Mar 23, 2023
1121507
fix(sveltekit): Handle same origin and destination navigations correc…
Lms24 Mar 23, 2023
1418582
fix(otel): Make sure we use correct hub on finish (#7577)
AbhiPrasad Mar 23, 2023
a818cc7
ci: Get release tag name from event (#7591)
mydea Mar 23, 2023
c4fbb1f
test(e2e): Add E2E test with & without @sentry/tracing import (#7590)
mydea Mar 23, 2023
c5f8e48
fix(tracing): Export key tracing types from node and browser SDKs (#7…
timfish Mar 23, 2023
0a4a072
fix(sveltekit): Handle server-only and shared load functions (#7581)
Lms24 Mar 23, 2023
210b70f
meta: Update CHANGELOG for 7.45.0
Lms24 Mar 23, 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: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,10 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Run linter
- name: Lint source files
run: yarn lint
- name: Validate ES5 builds
run: yarn validate:es5

job_circular_dep_check:
name: Circular Dependency Check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flaky-test-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ jobs:
working-directory: packages/browser-integration-tests
env:
CHANGED_TEST_PATHS: ${{ steps.changed.outputs.browser_integration_files }}
# Run 100 times when detecting changed test(s), else run all tests 5x
TEST_RUN_COUNT: ${{ steps.changed.outputs.browser_integration == 'true' && 100 || 5 }}
# Run 50 times when detecting changed test(s), else run all tests 5x
TEST_RUN_COUNT: ${{ steps.changed.outputs.browser_integration == 'true' && 50 || 5 }}
11 changes: 1 addition & 10 deletions .github/workflows/release-size-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,9 @@ jobs:
name: 'Add size-limit info to release'

steps:
# https://github.com/actions-ecosystem/action-regex-match
- name: Extract version from ref
uses: actions-ecosystem/action-regex-match@v2
id: head_version
with:
# Parse version from head ref, which is refs/tags/<tag_name>
text: ${{ env.GITHUB_REF }}
regex: '^refs\/tags\/([\d.]+)$'

- name: Get version
id: get_version
run: echo "version=${{ github.event.inputs.version || steps.head_version.outputs.group1 }}" >> $GITHUB_OUTPUT
run: echo "version=${{ github.event.inputs.version || github.event.release.tag_name }}" >> $GITHUB_OUTPUT

- name: Update Github Release
if: steps.get_version.outputs.version != ''
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@

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

## 7.45.0

- build(cdn): Ensure ES5 bundles do not use non-ES5 code (#7550)
- feat(core): Add trace function (#7556)
- feat(hub): Make scope always defined on the hub (#7551)
- feat(replay): Add `replay_id` to transaction DSC (#7571)
- feat(replay): Capture fetch body size for replay events (#7524)
- feat(sveltekit): Add performance monitoring for client load (#7537)
- feat(sveltekit): Add performance monitoring for server load (#7536)
- feat(sveltekit): Add performance monitoring to Sveltekit server handle (#7532)
- feat(sveltekit): Add SvelteKit routing instrumentation (#7565)
- fix(browser): Ensure keepalive flag is correctly set for parallel requests (#7553)
- fix(core): Ensure `ignoreErrors` only applies to error events (#7573)
- fix(node): Consider tracing error handler for process exit (#7558)
- fix(otel): Make sure we use correct hub on finish (#7577)
- fix(react): Handle case where error.cause already defined (#7557)

## 7.44.2

- fix(cdn): Fix ES5 CDN bundles (#7544)
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"link:yarn": "lerna exec yarn link",
"lint": "lerna run lint",
"lint:eslint": "lerna run lint:eslint",
"validate:es5": "lerna run validate:es5",
"postpublish": "lerna run --stream --concurrency 1 postpublish",
"test": "lerna run --ignore @sentry-internal/* test",
"test:unit": "lerna run --ignore @sentry-internal/* test:unit",
Expand Down Expand Up @@ -89,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
"jest-environment-node": "^27.5.1",
Expand Down
76 changes: 48 additions & 28 deletions packages/browser-integration-tests/scripts/detectFlakyTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,72 @@ import { promisify } from 'util';
const exec = promisify(childProcess.exec);

async function run(): Promise<void> {
let testPaths = getTestPaths();
let failed = [];
let testPaths: string[] = [];

try {
const changedPaths: string[] = process.env.CHANGED_TEST_PATHS ? JSON.parse(process.env.CHANGED_TEST_PATHS) : [];
const changedPaths: string[] = process.env.CHANGED_TEST_PATHS ? JSON.parse(process.env.CHANGED_TEST_PATHS) : [];

if (changedPaths.length > 0) {
console.log(`Detected changed test paths:
if (changedPaths.length > 0) {
console.log(`Detected changed test paths:
${changedPaths.join('\n')}

`);

testPaths = testPaths.filter(p => changedPaths.some(changedPath => changedPath.includes(p)));
testPaths = getTestPaths().filter(p => changedPaths.some(changedPath => changedPath.includes(p)));
if (testPaths.length === 0) {
console.log('Could not find matching tests, aborting...');
process.exit(1);
}
} catch {
console.log('Could not detect changed test paths, running all tests.');
}

const cwd = path.join(__dirname, '../');
const runCount = parseInt(process.env.TEST_RUN_COUNT || '10');

for (const testPath of testPaths) {
console.log(`Running test: ${testPath}`);
const start = Date.now();
try {
await new Promise<void>((resolve, reject) => {
const cp = childProcess.spawn(
`yarn playwright test ${
testPaths.length ? testPaths.join(' ') : './suites'
} --browser='all' --reporter='line' --repeat-each ${runCount}`,
{ shell: true, cwd },
);

let error: Error | undefined;

cp.stdout.on('data', data => {
console.log(data ? (data as object).toString() : '');
});

try {
await exec(`yarn playwright test ${testPath} --browser='all' --repeat-each ${runCount}`, {
cwd,
cp.stderr.on('data', data => {
console.log(data ? (data as object).toString() : '');
});
const end = Date.now();
console.log(` ☑️ Passed ${runCount} times, avg. duration ${Math.ceil((end - start) / runCount)}ms`);
} catch (error) {
logError(error);
failed.push(testPath);
}
}

console.log('');
console.log('');
cp.on('error', e => {
console.error(e);
error = e;
});

if (failed.length > 0) {
console.error(`⚠️ ${failed.length} test(s) failed.`);
cp.on('close', status => {
const err = error || (status !== 0 ? new Error(`Process exited with status ${status}`) : undefined);

if (err) {
reject(err);
} else {
resolve();
}
});
});
} catch (error) {
console.log('');
console.log('');

console.error(`⚠️ Some tests failed.`);
console.error(error);
process.exit(1);
} else {
console.log(`☑️ ${testPaths.length} test(s) passed.`);
}

console.log('');
console.log('');
console.log(`☑️ All tests passed.`);
}

function getTestPaths(): string[] {
Expand Down
23 changes: 23 additions & 0 deletions packages/browser-integration-tests/suites/replay/dsc/init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as Sentry from '@sentry/browser';
import { Integrations } from '@sentry/tracing';

window.Sentry = Sentry;
window.Replay = new Sentry.Replay({
flushMinDelay: 200,
flushMaxDelay: 200,
useCompression: false,
});

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [new Integrations.BrowserTracing({ tracingOrigins: [/.*/] }), window.Replay],
environment: 'production',
tracesSampleRate: 1,
replaysSessionSampleRate: 0.0,
replaysOnErrorSampleRate: 1.0,
});

Sentry.configureScope(scope => {
scope.setUser({ id: 'user123', segment: 'segmentB' });
scope.setTransactionName('testTransactionDSC');
});
33 changes: 33 additions & 0 deletions packages/browser-integration-tests/suites/replay/dsc/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { expect } from '@playwright/test';
import type { EventEnvelopeHeaders } from '@sentry/types';

import { sentryTest } from '../../../utils/fixtures';
import { envelopeHeaderRequestParser, getFirstSentryEnvelopeRequest } from '../../../utils/helpers';
import { getReplaySnapshot, shouldSkipReplayTest, waitForReplayRunning } from '../../../utils/replayHelpers';

sentryTest('should add replay_id to dsc of transactions', async ({ getLocalTestPath, page, browserName }) => {
// This is flaky on webkit, so skipping there...
if (shouldSkipReplayTest() || browserName === 'webkit') {
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });
await page.goto(url);

const envHeader = await getFirstSentryEnvelopeRequest<EventEnvelopeHeaders>(page, url, envelopeHeaderRequestParser);

await waitForReplayRunning(page);
const replay = await getReplaySnapshot(page);

expect(replay.session?.id).toBeDefined();

expect(envHeader.trace).toBeDefined();
expect(envHeader.trace).toEqual({
environment: 'production',
user_segment: 'segmentB',
sample_rate: '1',
trace_id: expect.any(String),
public_key: 'public',
replay_id: replay.session?.id,
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { expect } from '@playwright/test';

import { sentryTest } from '../../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequest } from '../../../../../utils/helpers';
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';
import {
getCustomRecordingEvents,
shouldSkipReplayTest,
waitForReplayRequest,
} from '../../../../../utils/replayHelpers';

sentryTest('parses response_body_size from Content-Length header if available', async ({ getLocalTestPath, page }) => {
if (shouldSkipReplayTest()) {
Expand All @@ -22,7 +26,17 @@ sentryTest('parses response_body_size from Content-Length header if available',
});
});

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

const requestPromise = waitForErrorRequest(page);
const replayRequestPromise1 = waitForReplayRequest(page, 0);

const url = await getLocalTestPath({ testDir: __dirname });
await page.goto(url);

Expand Down Expand Up @@ -58,4 +72,20 @@ sentryTest('parses response_body_size from Content-Length header if available',
url: 'http://localhost:7654/foo',
},
});

const replayReq1 = await replayRequestPromise1;
const { performanceSpans: performanceSpans1 } = getCustomRecordingEvents(replayReq1);
expect(performanceSpans1.filter(span => span.op === 'resource.fetch')).toEqual([
{
data: {
method: 'GET',
responseBodySize: 789,
statusCode: 200,
},
description: 'http://localhost:7654/foo',
endTimestamp: expect.any(Number),
op: 'resource.fetch',
startTimestamp: expect.any(Number),
},
]);
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { expect } from '@playwright/test';

import { sentryTest } from '../../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequest } from '../../../../../utils/helpers';
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';
import {
getCustomRecordingEvents,
shouldSkipReplayTest,
waitForReplayRequest,
} from '../../../../../utils/replayHelpers';

sentryTest('does not capture response_body_size without Content-Length header', async ({ getLocalTestPath, page }) => {
if (shouldSkipReplayTest()) {
Expand All @@ -22,7 +26,17 @@ sentryTest('does not capture response_body_size without Content-Length header',
});
});

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

const requestPromise = waitForErrorRequest(page);
const replayRequestPromise1 = waitForReplayRequest(page, 0);

const url = await getLocalTestPath({ testDir: __dirname });
await page.goto(url);

Expand Down Expand Up @@ -57,4 +71,20 @@ sentryTest('does not capture response_body_size without Content-Length header',
url: 'http://localhost:7654/foo',
},
});

const replayReq1 = await replayRequestPromise1;
const { performanceSpans: performanceSpans1 } = getCustomRecordingEvents(replayReq1);
expect(performanceSpans1.filter(span => span.op === 'resource.fetch')).toEqual([
{
data: {
method: 'GET',
responseBodySize: 29,
statusCode: 200,
},
description: 'http://localhost:7654/foo',
endTimestamp: expect.any(Number),
op: 'resource.fetch',
startTimestamp: expect.any(Number),
},
]);
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { expect } from '@playwright/test';

import { sentryTest } from '../../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequest } from '../../../../../utils/helpers';
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';
import {
getCustomRecordingEvents,
shouldSkipReplayTest,
waitForReplayRequest,
} from '../../../../../utils/replayHelpers';

sentryTest('calculates body sizes for non-string bodies', async ({ getLocalTestPath, page }) => {
if (shouldSkipReplayTest()) {
Expand All @@ -19,7 +23,17 @@ sentryTest('calculates body sizes for non-string bodies', async ({ getLocalTestP
});
});

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

const requestPromise = waitForErrorRequest(page);
const replayRequestPromise1 = waitForReplayRequest(page, 0);

const url = await getLocalTestPath({ testDir: __dirname });
await page.goto(url);

Expand Down Expand Up @@ -60,4 +74,21 @@ sentryTest('calculates body sizes for non-string bodies', async ({ getLocalTestP
url: 'http://localhost:7654/foo',
},
});

const replayReq1 = await replayRequestPromise1;
const { performanceSpans: performanceSpans1 } = getCustomRecordingEvents(replayReq1);
expect(performanceSpans1.filter(span => span.op === 'resource.fetch')).toEqual([
{
data: {
method: 'POST',
requestBodySize: 26,
responseBodySize: 24,
statusCode: 200,
},
description: 'http://localhost:7654/foo',
endTimestamp: expect.any(Number),
op: 'resource.fetch',
startTimestamp: expect.any(Number),
},
]);
});
Loading