Skip to content

Commit 8525aa8

Browse files
authored
Merge branch 'develop' into fix/node-fastify-deprecation
2 parents 66cbaed + fc319ea commit 8525aa8

File tree

131 files changed

+1166
-984
lines changed

Some content is hidden

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

131 files changed

+1166
-984
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Install yarn dependencies"
2+
description: "Installs yarn dependencies and caches them."
3+
4+
outputs:
5+
cache_key:
6+
description: "The dependency cache key"
7+
value: ${{ steps.compute_lockfile_hash.outputs.hash }}
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
13+
# so no need to reinstall them
14+
- name: Compute dependency cache key
15+
id: compute_lockfile_hash
16+
run: echo "hash=dependencies-${{ hashFiles('yarn.lock', 'packages/*/package.json', 'dev-packages/*/package.json') }}" >> "$GITHUB_OUTPUT"
17+
shell: bash
18+
19+
- name: Check dependency cache
20+
uses: actions/cache@v4
21+
id: cache_dependencies
22+
with:
23+
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
24+
key: ${{ steps.compute_lockfile_hash.outputs.hash }}
25+
26+
- name: Install dependencies
27+
if: steps.cache_dependencies.outputs.cache-hit != 'true'
28+
run: yarn install --ignore-engines --frozen-lockfile
29+
shell: bash

.github/actions/install-playwright/action.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,23 @@ runs:
1313
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
1414
shell: bash
1515

16-
- name: Cache playwright binaries
17-
uses: actions/cache@v4
16+
- name: Restore cached playwright binaries
17+
uses: actions/cache/restore@v4
1818
id: playwright-cache
1919
with:
2020
path: |
2121
~/.cache/ms-playwright
2222
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
2323

24+
# Only store cache on develop branch
25+
- name: Store cached playwright binaries
26+
uses: actions/cache/save@v4
27+
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
28+
with:
29+
path: |
30+
~/.cache/ms-playwright
31+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
32+
2433
# We always install all browsers, if uncached
2534
- name: Install Playwright dependencies (uncached)
2635
run: npx playwright install chromium webkit firefox --with-deps

.github/workflows/build.yml

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,9 @@ jobs:
146146
with:
147147
node-version-file: 'package.json'
148148

149-
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
150-
# so no need to reinstall them
151-
- name: Compute dependency cache key
152-
id: compute_lockfile_hash
153-
run: echo "hash=${{ hashFiles('yarn.lock', '**/package.json') }}" >> "$GITHUB_OUTPUT"
154-
155-
- name: Check dependency cache
156-
uses: actions/cache@v4
157-
id: cache_dependencies
158-
with:
159-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
160-
key: ${{ steps.compute_lockfile_hash.outputs.hash }}
161-
162-
- name: Install dependencies
163-
if: steps.cache_dependencies.outputs.cache-hit != 'true'
164-
run: yarn install --ignore-engines --frozen-lockfile
149+
- name: Install Dependencies
150+
uses: ./.github/actions/install-dependencies
151+
id: install_dependencies
165152

166153
- name: Check for Affected Nx Projects
167154
uses: dkhunt27/[email protected]
@@ -200,7 +187,7 @@ jobs:
200187
run: yarn build
201188

202189
outputs:
203-
dependency_cache_key: ${{ steps.compute_lockfile_hash.outputs.hash }}
190+
dependency_cache_key: ${{ steps.install_dependencies.outputs.cache_key }}
204191
changed_node_integration: ${{ needs.job_get_metadata.outputs.changed_ci == 'true' || contains(steps.checkForAffected.outputs.affected, '@sentry-internal/node-integration-tests') }}
205192
changed_remix: ${{ needs.job_get_metadata.outputs.changed_ci == 'true' || contains(steps.checkForAffected.outputs.affected, '@sentry/remix') }}
206193
changed_node: ${{ needs.job_get_metadata.outputs.changed_ci == 'true' || contains(steps.checkForAffected.outputs.affected, '@sentry/node') }}
@@ -293,22 +280,9 @@ jobs:
293280
with:
294281
node-version-file: 'package.json'
295282

296-
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
297-
# so no need to reinstall them
298-
- name: Compute dependency cache key
299-
id: compute_lockfile_hash
300-
run: echo "hash=${{ hashFiles('yarn.lock', '**/package.json') }}" >> "$GITHUB_OUTPUT"
301-
302-
- name: Check dependency cache
303-
uses: actions/cache@v4
304-
id: cache_dependencies
305-
with:
306-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
307-
key: ${{ steps.compute_lockfile_hash.outputs.hash }}
308-
309-
- name: Install dependencies
310-
if: steps.cache_dependencies.outputs.cache-hit != 'true'
311-
run: yarn install --ignore-engines --frozen-lockfile
283+
- name: Install Dependencies
284+
uses: ./.github/actions/install-dependencies
285+
id: install_dependencies
312286

313287
- name: Check file formatting
314288
run: yarn lint:prettier && yarn lint:biome

CHANGELOG.md

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

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

13+
## 8.26.0
14+
15+
### Important Changes
16+
17+
- **feat(node): Add `fsInstrumentation` (#13291)**
18+
19+
This release adds `fsIntegration`, an integration that instruments the `fs` API to the Sentry Node SDK. The
20+
integration creates spans with naming patterns of `fs.readFile`, `fs.unlink`, and so on.
21+
22+
This integration is not enabled by default and needs to be registered in your `Sentry.init` call. You can configure
23+
via options whether to include path arguments or error messages as span attributes when an fs call fails:
24+
25+
```js
26+
Sentry.init({
27+
integrations: [
28+
Sentry.fsIntegration({
29+
recordFilePaths: true,
30+
recordErrorMessagesAsSpanAttributes: true,
31+
}),
32+
],
33+
});
34+
```
35+
36+
**WARNING:** This integration may add significant overhead to your application. Especially in scenarios with a lot of
37+
file I/O, like for example when running a framework dev server, including this integration can massively slow down
38+
your application.
39+
40+
### Other Changes
41+
42+
- feat(browser): Add spotlightBrowser integration (#13263)
43+
- feat(browser): Allow sentry in safari extension background page (#13209)
44+
- feat(browser): Send CLS as standalone span (experimental) (#13056)
45+
- feat(core): Add OpenTelemetry-specific `getTraceData` implementation (#13281)
46+
- feat(nextjs): Always add `browserTracingIntegration` (#13324)
47+
- feat(nextjs): Always transmit trace data to the client (#13337)
48+
- feat(nextjs): export SentryBuildOptions (#13296)
49+
- feat(nextjs): Update `experimental_captureRequestError` to reflect `RequestInfo.path` change in Next.js canary
50+
(#13344)
51+
52+
- feat(nuxt): Always add tracing meta tags (#13273)
53+
- feat(nuxt): Set transaction name for server error (#13292)
54+
- feat(replay): Add a replay-specific logger (#13256)
55+
- feat(sveltekit): Add bundle size optimizations to plugin options (#13318)
56+
- feat(sveltekit): Always add browserTracingIntegration (#13322)
57+
- feat(tracing): Make long animation frames opt-out (#13255)
58+
- fix(astro): Correctly extract request data (#13315)
59+
- fix(astro): Only track access request headers in dynamic page requests (#13306)
60+
- fix(nuxt): Add import line for disabled `autoImport` (#13342)
61+
- fix(nuxt): Add vue to excludeEsmLoaderHooks array (#13346)
62+
- fix(opentelemetry): Do not overwrite http span name if kind is internal (#13282)
63+
- fix(remix): Ensure `origin` is correctly set for remix server spans (#13305)
64+
1365
Work in this release was contributed by @MonstraG, @undead-voron and @Zen-cronic. Thank you for your contributions!
1466

1567
## 8.25.0

dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import fs from 'fs';
2-
import path from 'path';
1+
import * as fs from 'fs';
2+
import * as path from 'path';
33
import { expect } from '@playwright/test';
44

55
import { TEST_HOST, sentryTest } from '../../../../utils/fixtures';
@@ -28,19 +28,22 @@ sentryTest('it does not download the SDK if the SDK was loaded in the meanwhile'
2828
});
2929
});
3030

31+
const tmpDir = await getLocalTestUrl({ testDir: __dirname, skipRouteHandler: true });
32+
3133
await page.route(`${TEST_HOST}/*.*`, route => {
3234
const file = route.request().url().split('/').pop();
3335

3436
if (file === 'cdn.bundle.js') {
3537
cdnLoadedCount++;
3638
}
3739

38-
const filePath = path.resolve(__dirname, `./dist/${file}`);
40+
const filePath = path.resolve(tmpDir, `./${file}`);
3941

4042
return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue();
4143
});
4244

43-
const url = await getLocalTestUrl({ testDir: __dirname, skipRouteHandler: true });
45+
const url = `${TEST_HOST}/index.html`;
46+
4447
const req = await waitForErrorRequestOnUrl(page, url);
4548

4649
const eventData = envelopeRequestParser(req);

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.25.0",
3+
"version": "8.26.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.11.0",
46-
"@sentry/browser": "8.25.0",
46+
"@sentry/browser": "8.26.0",
4747
"axios": "1.6.7",
4848
"babel-loader": "^8.2.2",
4949
"html-webpack-plugin": "^5.5.0",

dev-packages/browser-integration-tests/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const config: PlaywrightTestConfig = {
3131
],
3232

3333
globalSetup: require.resolve('./playwright.setup.ts'),
34+
globalTeardown: require.resolve('./playwright.teardown.ts'),
3435
};
3536

3637
export default config;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import * as childProcess from 'child_process';
2+
3+
export default function globalTeardown(): void {
4+
childProcess.execSync('yarn clean', { stdio: 'inherit', cwd: process.cwd() });
5+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import * as Sentry from '@sentry/browser';
2+
// Import this separately so that generatePlugin can handle it for CDN scenarios
3+
import { feedbackIntegration } from '@sentry/browser';
4+
5+
window.Sentry = Sentry;
6+
7+
Sentry.init({
8+
dsn: 'https://[email protected]/1337',
9+
integrations: [
10+
feedbackIntegration({ tags: { from: 'integration init' }, styleNonce: 'foo1234', scriptNonce: 'foo1234' }),
11+
],
12+
});
13+
14+
document.addEventListener('securitypolicyviolation', () => {
15+
const container = document.querySelector('#csp-violation');
16+
if (container) {
17+
container.innerText = 'CSP Violation';
18+
}
19+
});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta
6+
http-equiv="Content-Security-Policy"
7+
content="style-src 'nonce-foo1234'; script-src sentry-test.io 'nonce-foo1234';"
8+
/>
9+
</head>
10+
<body>
11+
<div id="csp-violation" />
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)