Skip to content

meta: Update CHANGELOG for 7.45.0 #7588

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 35 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 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
047fbc8
meta: Update CHANGELOG for 7.45.0
Lms24 Mar 23, 2023
f832d4e
Update CHANGELOG.md
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
Prev Previous commit
Next Next commit
test(replay): Add replay E2E test (#7486)
---------

Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
  • Loading branch information
mydea and Lms24 authored Mar 23, 2023
commit 551aedcc8eb6392f66af840c0b6a4c45032ba05e
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
interface Window {
recordedTransactions?: string[];
capturedExceptionId?: string;
sentryReplayId?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {
import Index from './pages/Index';
import User from './pages/User';

const replay = new Sentry.Replay();

Sentry.init({
dsn: process.env.REACT_APP_E2E_TEST_DSN,
integrations: [
Expand All @@ -26,11 +28,22 @@ Sentry.init({
matchRoutes,
),
}),
replay,
],
// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,
release: 'e2e-test',

// Always capture replays, so we can test this properly
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 0.0,
});

Object.defineProperty(window, 'sentryReplayId', {
get() {
return replay['_replay'].session.id;
},
});

Sentry.addGlobalEventProcessor(event => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test, expect } from '@playwright/test';
import axios, { AxiosError } from 'axios';
import { ReplayRecordingData } from './fixtures/ReplayRecordingData';

const EVENT_POLLING_TIMEOUT = 30_000;

Expand Down Expand Up @@ -169,3 +170,85 @@ test('Sends a navigation transaction to Sentry', async ({ page }) => {

expect(hadPageNavigationTransaction).toBe(true);
});

test('Sends a Replay recording to Sentry', async ({ browser }) => {
const context = await browser.newContext();
const page = await context.newPage();

await page.goto('/');

const replayId = await page.waitForFunction(() => {
return window.sentryReplayId;
});

// Wait for replay to be sent

if (replayId === undefined) {
throw new Error("Application didn't set a replayId");
}

console.log(`Polling for replay with ID: ${replayId}`);

await expect
.poll(
async () => {
try {
const response = await axios.get(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/replays/${replayId}/`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

return response.status;
} catch (e) {
if (e instanceof AxiosError && e.response) {
if (e.response.status !== 404) {
throw e;
} else {
return e.response.status;
}
} else {
throw e;
}
}
},
{
timeout: EVENT_POLLING_TIMEOUT,
},
)
.toBe(200);

// now fetch the first recording segment
await expect
.poll(
async () => {
try {
const response = await axios.get(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/replays/${replayId}/recording-segments/?cursor=100%3A0%3A1`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

return {
status: response.status,
data: response.data,
};
} catch (e) {
if (e instanceof AxiosError && e.response) {
if (e.response.status !== 404) {
throw e;
} else {
return e.response.status;
}
} else {
throw e;
}
}
},
{
timeout: EVENT_POLLING_TIMEOUT,
},
)
.toEqual({
status: 200,
data: ReplayRecordingData,
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
import { expect } from '@playwright/test';

export const ReplayRecordingData = [
[
{ type: 4, data: { href: 'http://localhost:3000/', width: 1280, height: 720 }, timestamp: expect.any(Number) },
{
type: 2,
data: {
node: {
type: 0,
childNodes: [
{ type: 1, name: 'html', publicId: '', systemId: '', id: 2 },
{
type: 2,
tagName: 'html',
attributes: { lang: 'en' },
childNodes: [
{
type: 2,
tagName: 'head',
attributes: {},
childNodes: [
{ type: 2, tagName: 'meta', attributes: { charset: 'utf-8' }, childNodes: [], id: 5 },
{
type: 2,
tagName: 'meta',
attributes: { name: 'viewport', content: 'width=device-width,initial-scale=1' },
childNodes: [],
id: 6,
},
{
type: 2,
tagName: 'meta',
attributes: { name: 'theme-color', content: '#000000' },
childNodes: [],
id: 7,
},
{
type: 2,
tagName: 'title',
attributes: {},
childNodes: [{ type: 3, textContent: '***** ***', id: 9 }],
id: 8,
},
],
id: 4,
},
{
type: 2,
tagName: 'body',
attributes: {},
childNodes: [
{
type: 2,
tagName: 'noscript',
attributes: {},
childNodes: [{ type: 3, textContent: '*** **** ** ****** ********** ** *** **** ****', id: 12 }],
id: 11,
},
{ type: 2, tagName: 'div', attributes: { id: 'root' }, childNodes: [], id: 13 },
],
id: 10,
},
],
id: 3,
},
],
id: 1,
},
initialOffset: { left: 0, top: 0 },
},
timestamp: expect.any(Number),
},
{
type: 5,
timestamp: expect.any(Number),
data: {
tag: 'performanceSpan',
payload: {
op: 'memory',
description: 'memory',
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
data: {
memory: {
jsHeapSizeLimit: expect.any(Number),
totalJSHeapSize: expect.any(Number),
usedJSHeapSize: expect.any(Number),
},
},
},
},
},
{
type: 3,
data: {
source: 0,
texts: [],
attributes: [],
removes: [],
adds: [
{
parentId: 13,
nextId: null,
node: {
type: 2,
tagName: 'a',
attributes: { id: 'navigation', href: 'http://localhost:3000/user/5' },
childNodes: [],
id: 14,
},
},
{ parentId: 14, nextId: null, node: { type: 3, textContent: '********', id: 15 } },
{
parentId: 13,
nextId: 14,
node: {
type: 2,
tagName: 'input',
attributes: { type: 'button', id: 'exception-button', value: '******* *********' },
childNodes: [],
id: 16,
},
},
],
},
timestamp: expect.any(Number),
},
{
type: 3,
data: { source: 5, text: 'Capture Exception', isChecked: false, id: 16 },
timestamp: expect.any(Number),
},
],
[
{
type: 5,
timestamp: expect.any(Number),
data: {
tag: 'performanceSpan',
payload: {
op: 'navigation.navigate',
description: 'http://localhost:3000/',
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
data: { size: expect.any(Number), duration: expect.any(Number) },
},
},
},
{
type: 5,
timestamp: expect.any(Number),
data: {
tag: 'performanceSpan',
payload: {
op: 'resource.script',
description: expect.stringMatching(/http:\/\/localhost:3000\/static\/js\/main.(\w+).js/),
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
data: { size: expect.any(Number), encodedBodySize: expect.any(Number) },
},
},
},
{
type: 5,
timestamp: expect.any(Number),
data: {
tag: 'performanceSpan',
payload: {
op: 'largest-contentful-paint',
description: 'largest-contentful-paint',
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
data: { value: expect.any(Number), size: expect.any(Number), nodeId: 16 },
},
},
},
{
type: 5,
timestamp: expect.any(Number),
data: {
tag: 'performanceSpan',
payload: {
op: 'paint',
description: 'first-paint',
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
},
},
},
{
type: 5,
timestamp: expect.any(Number),
data: {
tag: 'performanceSpan',
payload: {
op: 'paint',
description: 'first-contentful-paint',
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
},
},
},
{
type: 5,
timestamp: expect.any(Number),
data: {
tag: 'performanceSpan',
payload: {
op: 'memory',
description: 'memory',
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
data: {
memory: {
jsHeapSizeLimit: expect.any(Number),
totalJSHeapSize: expect.any(Number),
usedJSHeapSize: expect.any(Number),
},
},
},
},
},
],
];