Skip to content

Commit 763bcad

Browse files
committed
Merge branch 'develop' into nh/instrument-interceptors-after-route
2 parents 2081e1a + 51ef02d commit 763bcad

File tree

317 files changed

+7029
-1787
lines changed

Some content is hidden

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

317 files changed

+7029
-1787
lines changed

.craft.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ targets:
114114
- name: npm
115115
id: '@sentry/remix'
116116
includeNames: /^sentry-remix-\d.*\.tgz$/
117+
- name: npm
118+
id: '@sentry/solidstart'
119+
includeNames: /^sentry-solidstart-\d.*\.tgz$/
117120
- name: npm
118121
id: '@sentry/sveltekit'
119122
includeNames: /^sentry-sveltekit-\d.*\.tgz$/
@@ -203,6 +206,8 @@ targets:
203206
onlyIfPresent: /^sentry-remix-\d.*\.tgz$/
204207
'npm:@sentry/solid':
205208
onlyIfPresent: /^sentry-solid-\d.*\.tgz$/
209+
'npm:@sentry/solidstart':
210+
onlyIfPresent: /^sentry-solidstart-\d.*\.tgz$/
206211
'npm:@sentry/svelte':
207212
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
208213
'npm:@sentry/sveltekit':

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: "Install Playwright dependencies"
22
description: "Installs Playwright dependencies and caches them."
3+
inputs:
4+
browsers:
5+
description: 'What browsers to install.'
6+
default: 'chromium webkit firefox'
37

48
runs:
59
using: "composite"
@@ -17,12 +21,13 @@ runs:
1721
~/.cache/ms-playwright
1822
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
1923

24+
# We always install all browsers, if uncached
2025
- name: Install Playwright dependencies (uncached)
2126
run: npx playwright install chromium webkit firefox --with-deps
2227
if: steps.playwright-cache.outputs.cache-hit != 'true'
2328
shell: bash
2429

2530
- name: Install Playwright system dependencies only (cached)
26-
run: npx playwright install-deps chromium webkit firefox
31+
run: npx playwright install-deps ${{ inputs.browsers || 'chromium webkit firefox' }}
2732
if: steps.playwright-cache.outputs.cache-hit == 'true'
2833
shell: bash

.github/workflows/build.yml

Lines changed: 61 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ jobs:
9696
profiling_node:
9797
- 'packages/profiling-node/**'
9898
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
99+
any_code:
100+
- '!**/*.md'
99101
100102
101103
- name: Get PR labels
@@ -109,6 +111,8 @@ jobs:
109111
is_release: ${{ startsWith(github.ref, 'refs/heads/release/') }}
110112
changed_profiling_node: ${{ steps.changed.outputs.profiling_node == 'true' }}
111113
changed_ci: ${{ steps.changed.outputs.workflow == 'true' }}
114+
changed_any_code: ${{ steps.changed.outputs.any_code == 'true' }}
115+
112116
# When merging into master, or from master
113117
is_gitflow_sync: ${{ github.head_ref == 'master' || github.ref == 'refs/heads/master' }}
114118
has_gitflow_label:
@@ -123,6 +127,7 @@ jobs:
123127
runs-on: ubuntu-20.04
124128
timeout-minutes: 15
125129
if: |
130+
needs.job_get_metadata.outputs.changed_any_code == 'true' &&
126131
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false')
127132
steps:
128133
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
@@ -274,24 +279,37 @@ jobs:
274279

275280
job_check_format:
276281
name: Check file formatting
277-
needs: [job_get_metadata, job_build]
282+
needs: [job_get_metadata]
278283
timeout-minutes: 10
279284
runs-on: ubuntu-20.04
280285
steps:
281286
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
282287
uses: actions/checkout@v4
283288
with:
284289
ref: ${{ env.HEAD_COMMIT }}
290+
285291
- name: Set up Node
286292
uses: actions/setup-node@v4
287293
with:
288294
node-version-file: 'package.json'
295+
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+
289302
- name: Check dependency cache
290-
uses: actions/cache/restore@v4
303+
uses: actions/cache@v4
304+
id: cache_dependencies
291305
with:
292306
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
293-
key: ${{ needs.job_build.outputs.dependency_cache_key }}
294-
fail-on-cache-miss: true
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
312+
295313
- name: Check file formatting
296314
run: yarn lint:prettier && yarn lint:biome
297315

@@ -528,7 +546,7 @@ jobs:
528546
run: yarn lerna run test --scope @sentry/profiling-node
529547

530548
job_browser_playwright_tests:
531-
name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/{1}', matrix.shard, matrix.shards) || ''}}) Tests
549+
name: Playwright ${{ matrix.bundle }}${{ matrix.project && matrix.project != 'chromium' && format(' {0}', matrix.project) || ''}}${{ matrix.shard && format(' ({0}/{1})', matrix.shard, matrix.shards) || ''}} Tests
532550
needs: [job_get_metadata, job_build]
533551
if: needs.job_build.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
534552
runs-on: ubuntu-20.04-large-js
@@ -548,31 +566,30 @@ jobs:
548566
project:
549567
- chromium
550568
include:
551-
# Only check all projects for esm & full bundle
569+
# Only check all projects for full bundle
552570
# We also shard the tests as they take the longest
553571
- bundle: bundle_tracing_replay_feedback_min
554-
project: ''
555-
shard: 1
556-
shards: 2
572+
project: 'webkit'
557573
- bundle: bundle_tracing_replay_feedback_min
558-
project: ''
559-
shard: 2
560-
shards: 2
574+
project: 'firefox'
561575
- bundle: esm
562-
project: ''
576+
project: chromium
563577
shard: 1
564-
shards: 3
578+
shards: 4
565579
- bundle: esm
580+
project: chromium
566581
shard: 2
567-
shards: 3
582+
shards: 4
568583
- bundle: esm
569-
project: ''
584+
project: chromium
570585
shard: 3
571-
shards: 3
586+
shards: 4
587+
- bundle: esm
588+
project: chromium
589+
shard: 4
590+
shards: 4
572591
exclude:
573-
# Do not run the default chromium-only tests
574-
- bundle: bundle_tracing_replay_feedback_min
575-
project: 'chromium'
592+
# Do not run the un-sharded esm tests
576593
- bundle: esm
577594
project: 'chromium'
578595

@@ -592,12 +609,15 @@ jobs:
592609

593610
- name: Install Playwright
594611
uses: ./.github/actions/install-playwright
612+
with:
613+
browsers: ${{ matrix.project }}
595614

596615
- name: Run Playwright tests
597616
env:
598617
PW_BUNDLE: ${{ matrix.bundle }}
599618
working-directory: dev-packages/browser-integration-tests
600619
run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/{1}', matrix.shard, matrix.shards) || '' }}
620+
601621
- name: Upload Playwright Traces
602622
uses: actions/upload-artifact@v3
603623
if: always()
@@ -606,7 +626,7 @@ jobs:
606626
path: dev-packages/browser-integration-tests/test-results
607627

608628
job_browser_loader_tests:
609-
name: Playwright Loader (${{ matrix.bundle }}) Tests
629+
name: PW ${{ matrix.bundle }} Tests
610630
needs: [job_get_metadata, job_build]
611631
if: needs.job_build.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
612632
runs-on: ubuntu-20.04
@@ -639,6 +659,8 @@ jobs:
639659

640660
- name: Install Playwright
641661
uses: ./.github/actions/install-playwright
662+
with:
663+
browsers: chromium
642664

643665
- name: Run Playwright Loader tests
644666
env:
@@ -750,8 +772,12 @@ jobs:
750772
uses: ./.github/actions/restore-cache
751773
env:
752774
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
775+
753776
- name: Install Playwright
754777
uses: ./.github/actions/install-playwright
778+
with:
779+
browsers: chromium
780+
755781
- name: Run integration tests
756782
env:
757783
NODE_VERSION: ${{ matrix.node }}
@@ -810,10 +836,10 @@ jobs:
810836
pattern: profiling-node-binaries-${{ github.sha }}-*
811837
path: ${{ github.workspace }}/packages/profiling-node/lib/
812838
merge-multiple: true
839+
# End rebuild profiling
813840

814-
- name: Build Profiling tarball
841+
- name: Build tarballs
815842
run: yarn build:tarball
816-
# End rebuild profiling
817843

818844
- name: Stores tarballs in cache
819845
uses: actions/cache/save@v4
@@ -859,6 +885,7 @@ jobs:
859885
'create-remix-app-express',
860886
'create-remix-app-express-legacy',
861887
'create-remix-app-express-vite-dev',
888+
'default-browser',
862889
'node-express-esm-loader',
863890
'node-express-esm-preload',
864891
'node-express-esm-without-loader',
@@ -878,6 +905,7 @@ jobs:
878905
'react-router-5',
879906
'react-router-6',
880907
'solid',
908+
'solidstart',
881909
'svelte-5',
882910
'sveltekit',
883911
'sveltekit-2',
@@ -949,9 +977,12 @@ jobs:
949977
with:
950978
path: ${{ github.workspace }}/packages/*/*.tgz
951979
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
980+
fail-on-cache-miss: true
952981

953982
- name: Install Playwright
954983
uses: ./.github/actions/install-playwright
984+
with:
985+
browsers: chromium
955986

956987
- name: Get node version
957988
id: versions
@@ -1046,9 +1077,12 @@ jobs:
10461077
with:
10471078
path: ${{ github.workspace }}/packages/*/*.tgz
10481079
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
1080+
fail-on-cache-miss: true
10491081

10501082
- name: Install Playwright
10511083
uses: ./.github/actions/install-playwright
1084+
with:
1085+
browsers: chromium
10521086

10531087
- name: Get node version
10541088
id: versions
@@ -1149,6 +1183,8 @@ jobs:
11491183

11501184
- name: Install Playwright
11511185
uses: ./.github/actions/install-playwright
1186+
with:
1187+
browsers: chromium
11521188

11531189
- name: Get node version
11541190
id: versions
@@ -1412,6 +1448,7 @@ jobs:
14121448
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
14131449
key: ${{ needs.job_build.outputs.dependency_cache_key }}
14141450
enableCrossOsArchive: true
1451+
fail-on-cache-miss: true
14151452

14161453
- name: Restore build cache
14171454
uses: actions/cache/restore@v4
@@ -1420,6 +1457,7 @@ jobs:
14201457
path: ${{ env.CACHED_BUILD_PATHS }}
14211458
key: ${{ needs.job_build.outputs.dependency_cache_key }}
14221459
enableCrossOsArchive: true
1460+
fail-on-cache-miss: true
14231461

14241462
- name: Configure safe directory
14251463
run: |
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Automation: Cleanup PR caches"
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
jobs:
8+
cleanup:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
# `actions:write` permission is required to delete caches
12+
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
13+
actions: write
14+
contents: read
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
19+
- name: Cleanup
20+
run: |
21+
gh extension install actions/gh-actions-cache
22+
23+
REPO=${{ github.repository }}
24+
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
25+
26+
echo "Fetching list of cache key"
27+
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
28+
29+
## Setting this to not fail the workflow while deleting cache keys.
30+
set +e
31+
echo "Deleting caches..."
32+
for cacheKey in $cacheKeysForPR
33+
do
34+
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
35+
done
36+
echo "Done"
37+
env:
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.size-limit.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module.exports = [
5555
path: 'packages/browser/build/npm/esm/index.js',
5656
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
5757
gzip: true,
58-
limit: '90 KB',
58+
limit: '91 KB',
5959
},
6060
{
6161
name: '@sentry/browser (incl. Tracing, Replay, Feedback, metrics)',
@@ -143,7 +143,7 @@ module.exports = [
143143
name: 'CDN Bundle (incl. Tracing)',
144144
path: createCDNPath('bundle.tracing.min.js'),
145145
gzip: true,
146-
limit: '37 KB',
146+
limit: '38 KB',
147147
},
148148
{
149149
name: 'CDN Bundle (incl. Tracing, Replay)',
@@ -170,7 +170,7 @@ module.exports = [
170170
path: createCDNPath('bundle.tracing.min.js'),
171171
gzip: false,
172172
brotli: false,
173-
limit: '110 KB',
173+
limit: '111 KB',
174174
},
175175
{
176176
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
@@ -193,7 +193,7 @@ module.exports = [
193193
import: createImport('init'),
194194
ignore: ['next/router', 'next/constants'],
195195
gzip: true,
196-
limit: '38 KB',
196+
limit: '39 KB',
197197
},
198198
// SvelteKit SDK (ESM)
199199
{

.vscode/settings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
],
3737
"deno.enablePaths": ["packages/deno/test"],
3838
"editor.codeActionsOnSave": {
39-
"source.organizeImports.biome": "explicit",
39+
"source.organizeImports.biome": "explicit"
4040
},
4141
"editor.defaultFormatter": "biomejs.biome",
4242
"[typescript]": {
4343
"editor.defaultFormatter": "biomejs.biome"
44-
}
44+
},
45+
"cSpell.words": ["arrayify", "OTEL"]
4546
}

0 commit comments

Comments
 (0)