Skip to content

Commit d219b6f

Browse files
author
Luca Forstner
authored
Merge branch 'v8' into lforst-prisma-v5-compat-layer
2 parents 2fe187f + 3673689 commit d219b6f

File tree

67 files changed

+625
-800
lines changed

Some content is hidden

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

67 files changed

+625
-800
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@
1010

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

13+
## 8.53.0
14+
15+
- feat(v8/nuxt): Add `url` to `SourcemapsUploadOptions` (#15202)
16+
- fix(v8/react): `fromLocation` can be undefined in Tanstack Router Instrumentation (#15237)
17+
18+
Work in this release was contributed by @tannerlinsley. Thank you for your contribution!
19+
20+
## 8.52.1
21+
22+
- fix(v8/nextjs): Fix nextjs build warning (#15226)
23+
- ref(v8/browser): Add protocol attributes to resource spans #15224
24+
- ref(v8/core): Don't set `this.name` to `new.target.prototype.constructor.name` (#15222)
25+
26+
Work in this release was contributed by @Zen-cronic. Thank you for your contribution!
27+
1328
## 8.52.0
1429

1530
### Important Changes

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

Lines changed: 2 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": "8.52.0",
3+
"version": "8.53.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -43,7 +43,7 @@
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "^1.44.1",
4545
"@sentry-internal/rrweb": "2.31.0",
46-
"@sentry/browser": "8.52.0",
46+
"@sentry/browser": "8.53.0",
4747
"axios": "1.7.7",
4848
"babel-loader": "^8.2.2",
4949
"html-webpack-plugin": "^5.5.0",
Lines changed: 116 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,44 @@
11
import type { Route } from '@playwright/test';
22
import { expect } from '@playwright/test';
3-
import type { Event } from '@sentry/core';
3+
import { type Event, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
44

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

8-
sentryTest('should add resource spans to pageload transaction', async ({ getLocalTestUrl, page }) => {
8+
sentryTest('should add resource spans to pageload transaction', async ({ getLocalTestUrl, page, browserName }) => {
99
if (shouldSkipTracingTest()) {
1010
sentryTest.skip();
1111
}
1212

13+
const isWebkitRun = browserName === 'webkit';
14+
1315
// Intercepting asset requests to avoid network-related flakiness and random retries (on Firefox).
1416
await page.route('https://example.com/path/to/image.svg', (route: Route) =>
15-
route.fulfill({ path: `${__dirname}/assets/image.svg` }),
17+
route.fulfill({
18+
path: `${__dirname}/assets/image.svg`,
19+
headers: {
20+
'Timing-Allow-Origin': '*',
21+
'Content-Type': 'image/svg+xml',
22+
},
23+
}),
1624
);
1725
await page.route('https://example.com/path/to/script.js', (route: Route) =>
18-
route.fulfill({ path: `${__dirname}/assets/script.js` }),
26+
route.fulfill({
27+
path: `${__dirname}/assets/script.js`,
28+
headers: {
29+
'Timing-Allow-Origin': '*',
30+
'Content-Type': 'application/javascript',
31+
},
32+
}),
1933
);
2034
await page.route('https://example.com/path/to/style.css', (route: Route) =>
21-
route.fulfill({ path: `${__dirname}/assets/style.css` }),
35+
route.fulfill({
36+
path: `${__dirname}/assets/style.css`,
37+
headers: {
38+
'Timing-Allow-Origin': '*',
39+
'Content-Type': 'text/css',
40+
},
41+
}),
2242
);
2343

2444
const url = await getLocalTestUrl({ testDir: __dirname });
@@ -27,11 +47,14 @@ sentryTest('should add resource spans to pageload transaction', async ({ getLoca
2747
const resourceSpans = eventData.spans?.filter(({ op }) => op?.startsWith('resource'));
2848

2949
const scriptSpans = resourceSpans?.filter(({ op }) => op === 'resource.script');
30-
const linkSpans = resourceSpans?.filter(({ op }) => op === 'resource.link');
31-
const imgSpans = resourceSpans?.filter(({ op }) => op === 'resource.img');
50+
const linkSpan = resourceSpans?.filter(({ op }) => op === 'resource.link')[0];
51+
const imgSpan = resourceSpans?.filter(({ op }) => op === 'resource.img')[0];
52+
53+
const spanId = eventData.contexts?.trace?.span_id;
54+
const traceId = eventData.contexts?.trace?.trace_id;
3255

33-
expect(imgSpans).toHaveLength(1);
34-
expect(linkSpans).toHaveLength(1);
56+
expect(spanId).toBeDefined();
57+
expect(traceId).toBeDefined();
3558

3659
const hasCdnBundle = (process.env.PW_BUNDLE || '').startsWith('bundle');
3760

@@ -41,11 +64,90 @@ sentryTest('should add resource spans to pageload transaction', async ({ getLoca
4164
}
4265

4366
expect(scriptSpans?.map(({ description }) => description).sort()).toEqual(expectedScripts);
67+
expect(scriptSpans?.map(({ parent_span_id }) => parent_span_id)).toEqual(expectedScripts.map(() => spanId));
4468

45-
const spanId = eventData.contexts?.trace?.span_id;
69+
const customScriptSpan = scriptSpans?.find(
70+
({ description }) => description === 'https://example.com/path/to/script.js',
71+
);
4672

47-
expect(spanId).toBeDefined();
48-
expect(imgSpans?.[0].parent_span_id).toBe(spanId);
49-
expect(linkSpans?.[0].parent_span_id).toBe(spanId);
50-
expect(scriptSpans?.map(({ parent_span_id }) => parent_span_id)).toEqual(expectedScripts.map(() => spanId));
73+
expect(imgSpan).toEqual({
74+
data: {
75+
'http.decoded_response_content_length': expect.any(Number),
76+
'http.response_content_length': expect.any(Number),
77+
'http.response_transfer_size': expect.any(Number),
78+
'network.protocol.name': '',
79+
'network.protocol.version': 'unknown',
80+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'resource.img',
81+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',
82+
'server.address': 'example.com',
83+
'url.same_origin': false,
84+
'url.scheme': 'https',
85+
...(!isWebkitRun && {
86+
'resource.render_blocking_status': 'non-blocking',
87+
'http.response_delivery_type': '',
88+
}),
89+
},
90+
description: 'https://example.com/path/to/image.svg',
91+
op: 'resource.img',
92+
origin: 'auto.resource.browser.metrics',
93+
parent_span_id: spanId,
94+
span_id: expect.stringMatching(/^[a-f0-9]{16}$/),
95+
start_timestamp: expect.any(Number),
96+
timestamp: expect.any(Number),
97+
trace_id: traceId,
98+
});
99+
100+
expect(linkSpan).toEqual({
101+
data: {
102+
'http.decoded_response_content_length': expect.any(Number),
103+
'http.response_content_length': expect.any(Number),
104+
'http.response_transfer_size': expect.any(Number),
105+
'network.protocol.name': '',
106+
'network.protocol.version': 'unknown',
107+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'resource.link',
108+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',
109+
'server.address': 'example.com',
110+
'url.same_origin': false,
111+
'url.scheme': 'https',
112+
...(!isWebkitRun && {
113+
'resource.render_blocking_status': 'non-blocking',
114+
'http.response_delivery_type': '',
115+
}),
116+
},
117+
description: 'https://example.com/path/to/style.css',
118+
op: 'resource.link',
119+
origin: 'auto.resource.browser.metrics',
120+
parent_span_id: spanId,
121+
span_id: expect.stringMatching(/^[a-f0-9]{16}$/),
122+
start_timestamp: expect.any(Number),
123+
timestamp: expect.any(Number),
124+
trace_id: traceId,
125+
});
126+
127+
expect(customScriptSpan).toEqual({
128+
data: {
129+
'http.decoded_response_content_length': expect.any(Number),
130+
'http.response_content_length': expect.any(Number),
131+
'http.response_transfer_size': expect.any(Number),
132+
'network.protocol.name': '',
133+
'network.protocol.version': 'unknown',
134+
'sentry.op': 'resource.script',
135+
'sentry.origin': 'auto.resource.browser.metrics',
136+
'server.address': 'example.com',
137+
'url.same_origin': false,
138+
'url.scheme': 'https',
139+
...(!isWebkitRun && {
140+
'resource.render_blocking_status': 'non-blocking',
141+
'http.response_delivery_type': '',
142+
}),
143+
},
144+
description: 'https://example.com/path/to/script.js',
145+
op: 'resource.script',
146+
origin: 'auto.resource.browser.metrics',
147+
parent_span_id: spanId,
148+
span_id: expect.stringMatching(/^[a-f0-9]{16}$/),
149+
start_timestamp: expect.any(Number),
150+
timestamp: expect.any(Number),
151+
trace_id: traceId,
152+
});
51153
});

dev-packages/bundle-analyzer-scenarios/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/bundle-analyzer-scenarios",
3-
"version": "8.52.0",
3+
"version": "8.53.0",
44
"description": "Scenarios to test bundle analysis with",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",

dev-packages/clear-cache-gh-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sentry-internal/clear-cache-gh-action",
33
"description": "An internal Github Action to clear GitHub caches.",
4-
"version": "8.52.0",
4+
"version": "8.53.0",
55
"license": "MIT",
66
"engines": {
77
"node": ">=18"

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/e2e-tests",
3-
"version": "8.52.0",
3+
"version": "8.53.0",
44
"license": "MIT",
55
"private": true,
66
"scripts": {

dev-packages/e2e-tests/test-applications/nextjs-app-dir/assert-build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const buildStderr = fs.readFileSync('.tmp_build_stderr', 'utf-8');
1010

1111
// Assert that there was no funky build time warning when we are on a stable (pinned) version
1212
if (nextjsVersion !== 'latest' && !nextjsVersion.includes('-canary') && !nextjsVersion.includes('-rc')) {
13-
assert.doesNotMatch(buildStderr, /Import trace for requested module/); // This is Next.js/Webpack speech for "something is off"
13+
assert.doesNotMatch(buildStderr, /Import trace for requested module/, `Build warning in output:\n${buildStderr}`); // This is Next.js/Webpack speech for "something is off"
1414
}
1515

1616
// Assert that all static components stay static and all dynamic components stay dynamic

dev-packages/external-contributor-gh-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sentry-internal/external-contributor-gh-action",
33
"description": "An internal Github Action to add external contributors to the CHANGELOG.md file.",
4-
"version": "8.52.0",
4+
"version": "8.53.0",
55
"license": "MIT",
66
"engines": {
77
"node": ">=18"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/node-integration-tests",
3-
"version": "8.52.0",
3+
"version": "8.53.0",
44
"license": "MIT",
55
"engines": {
66
"node": ">=14.18"
@@ -31,9 +31,9 @@
3131
"@nestjs/common": "10.4.6",
3232
"@nestjs/core": "10.4.6",
3333
"@nestjs/platform-express": "10.4.6",
34-
"@sentry/aws-serverless": "8.52.0",
35-
"@sentry/core": "8.52.0",
36-
"@sentry/node": "8.52.0",
34+
"@sentry/aws-serverless": "8.53.0",
35+
"@sentry/core": "8.53.0",
36+
"@sentry/node": "8.53.0",
3737
"@types/mongodb": "^3.6.20",
3838
"@types/mysql": "^2.15.21",
3939
"@types/pg": "^8.6.5",

dev-packages/rollup-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/rollup-utils",
3-
"version": "8.52.0",
3+
"version": "8.53.0",
44
"description": "Rollup utilities used at Sentry for the Sentry JavaScript SDK",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/rollup-utils",

0 commit comments

Comments
 (0)