Skip to content

Commit 48cb0be

Browse files
authored
Merge branch 'develop' into onur/wrapHandleErrorWithSentry
2 parents 3d75040 + 00e7a2e commit 48cb0be

File tree

328 files changed

+7240
-2488
lines changed

Some content is hidden

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

328 files changed

+7240
-2488
lines changed

.github/workflows/build.yml

Lines changed: 74 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
echo "COMMIT_MESSAGE=$(git log -n 1 --pretty=format:%s $COMMIT_SHA)" >> $GITHUB_ENV
8080
8181
- name: Determine changed packages
82-
uses: getsentry/paths-filter@v2.11.1
82+
uses: dorny/paths-filter@v3.0.0
8383
id: changed
8484
with:
8585
filters: |
@@ -126,6 +126,7 @@ jobs:
126126
node:
127127
- *shared
128128
- 'packages/node/**'
129+
- 'packages/node-experimental/**'
129130
- 'dev-packages/node-integration-tests/**'
130131
deno:
131132
- *shared
@@ -136,7 +137,7 @@ jobs:
136137
137138
- name: Get PR labels
138139
id: pr-labels
139-
uses: mydea/pr-labels-action@update-core
140+
uses: mydea/pr-labels-action@fn/bump-node20
140141

141142
outputs:
142143
commit_label: '${{ env.COMMIT_SHA }}: ${{ env.COMMIT_MESSAGE }}'
@@ -165,8 +166,7 @@ jobs:
165166
runs-on: ubuntu-20.04
166167
timeout-minutes: 15
167168
if: |
168-
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false') &&
169-
(needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request')
169+
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false')
170170
steps:
171171
- name: 'Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})'
172172
uses: actions/checkout@v4
@@ -213,8 +213,10 @@ jobs:
213213
job_build:
214214
name: Build
215215
needs: [job_get_metadata, job_install_deps]
216-
runs-on: ubuntu-20.04
216+
runs-on: ubuntu-20.04-large-js
217217
timeout-minutes: 30
218+
if: |
219+
(needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request')
218220
steps:
219221
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
220222
uses: actions/checkout@v4
@@ -319,10 +321,33 @@ jobs:
319321
env:
320322
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
321323
- name: Lint source files
322-
run: yarn lint
324+
run: yarn lint:lerna
323325
- name: Validate ES5 builds
324326
run: yarn validate:es5
325327

328+
job_check_format:
329+
name: Check file formatting
330+
needs: [job_get_metadata, job_install_deps]
331+
timeout-minutes: 10
332+
runs-on: ubuntu-20.04
333+
steps:
334+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
335+
uses: actions/checkout@v4
336+
with:
337+
ref: ${{ env.HEAD_COMMIT }}
338+
- name: Set up Node
339+
uses: actions/setup-node@v4
340+
with:
341+
node-version-file: 'package.json'
342+
- name: Check dependency cache
343+
uses: actions/cache/restore@v3
344+
with:
345+
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
346+
key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}
347+
fail-on-cache-miss: true
348+
- name: Check file formatting
349+
run: yarn lint:prettier && yarn lint:biome
350+
326351
job_circular_dep_check:
327352
name: Circular Dependency Check
328353
needs: [job_get_metadata, job_build]
@@ -381,7 +406,7 @@ jobs:
381406
name: Browser Unit Tests
382407
needs: [job_get_metadata, job_build]
383408
timeout-minutes: 10
384-
runs-on: ubuntu-latest
409+
runs-on: ubuntu-20.04
385410
steps:
386411
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
387412
uses: actions/checkout@v4
@@ -545,17 +570,16 @@ jobs:
545570
yarn test:integration
546571
547572
job_browser_playwright_tests:
548-
name: Playwright (${{ matrix.bundle }}) Tests
573+
name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/{1}', matrix.shard, matrix.shards) || ''}}) Tests
549574
needs: [job_get_metadata, job_build]
550575
if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
551-
runs-on: ubuntu-20.04
576+
runs-on: ubuntu-20.04-large-js
552577
timeout-minutes: 25
553578
strategy:
554579
fail-fast: false
555580
matrix:
556581
bundle:
557582
- esm
558-
- cjs
559583
- bundle_es5
560584
- bundle_es5_min
561585
- bundle_es6
@@ -568,6 +592,36 @@ jobs:
568592
- bundle_tracing_es6_min
569593
- bundle_tracing_replay_es6
570594
- bundle_tracing_replay_es6_min
595+
project:
596+
- chromium
597+
include:
598+
# Only check all projects for esm & full bundle
599+
# We also shard the tests as they take the longest
600+
- bundle: bundle_tracing_replay_es6_min
601+
project: ''
602+
shard: 1
603+
shards: 2
604+
- bundle: bundle_tracing_replay_es6_min
605+
project: ''
606+
shard: 2
607+
shards: 2
608+
- bundle: esm
609+
project: ''
610+
shard: 1
611+
shards: 3
612+
- bundle: esm
613+
shard: 2
614+
shards: 3
615+
- bundle: esm
616+
project: ''
617+
shard: 3
618+
shards: 3
619+
exclude:
620+
# Do not run the default chromium-only tests
621+
- bundle: bundle_tracing_replay_es6_min
622+
project: 'chromium'
623+
- bundle: esm
624+
project: 'chromium'
571625

572626
steps:
573627
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -605,9 +659,8 @@ jobs:
605659
- name: Run Playwright tests
606660
env:
607661
PW_BUNDLE: ${{ matrix.bundle }}
608-
run: |
609-
cd dev-packages/browser-integration-tests
610-
yarn test:ci
662+
working-directory: dev-packages/browser-integration-tests
663+
run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/{1}', matrix.shard, matrix.shards) || '' }}
611664

612665
job_browser_loader_tests:
613666
name: Playwright Loader (${{ matrix.bundle }}) Tests
@@ -670,7 +723,7 @@ jobs:
670723
name: Browser (${{ matrix.browser }}) Tests
671724
needs: [job_get_metadata, job_build]
672725
if: needs.job_get_metadata.outputs.changed_browser == 'true' || github.event_name != 'pull_request'
673-
runs-on: ubuntu-20.04
726+
runs-on: ubuntu-20.04-large-js
674727
timeout-minutes: 20
675728
strategy:
676729
fail-fast: false
@@ -840,7 +893,7 @@ jobs:
840893
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
841894
github.actor != 'dependabot[bot]'
842895
needs: [job_get_metadata, job_build]
843-
runs-on: ubuntu-20.04
896+
runs-on: ubuntu-20.04-large-js
844897
timeout-minutes: 15
845898
steps:
846899
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -894,6 +947,7 @@ jobs:
894947
matrix:
895948
test-application:
896949
[
950+
'angular-17',
897951
'cloudflare-astro',
898952
'node-express-app',
899953
'create-react-app',
@@ -913,6 +967,7 @@ jobs:
913967
'generic-ts3.8',
914968
'node-experimental-fastify-app',
915969
'node-hapi-app',
970+
'node-exports-test-app',
916971
]
917972
build-command:
918973
- false
@@ -946,6 +1001,9 @@ jobs:
9461001
uses: actions/setup-node@v4
9471002
with:
9481003
node-version-file: 'dev-packages/e2e-tests/package.json'
1004+
- name: Set up Bun
1005+
if: matrix.test-application == 'node-exports-test-app'
1006+
uses: oven-sh/setup-bun@v1
9491007
- name: Restore caches
9501008
uses: ./.github/actions/restore-cache
9511009
env:
@@ -1011,6 +1069,7 @@ jobs:
10111069
job_e2e_tests,
10121070
job_artifacts,
10131071
job_lint,
1072+
job_check_format,
10141073
job_circular_dep_check,
10151074
]
10161075
# Always run this, even if a dependent job failed

.github/workflows/flaky-test-detector.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ concurrency:
2323

2424
jobs:
2525
flaky-detector:
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-20.04-large-js
2727
timeout-minutes: 60
2828
name: 'Check tests for flakiness'
2929
# Also skip if PR is from master -> develop
@@ -71,7 +71,7 @@ jobs:
7171
run: npx playwright install-deps
7272

7373
- name: Determine changed tests
74-
uses: getsentry/paths-filter@v2.11.1
74+
uses: dorny/paths-filter@v3.0.0
7575
id: changed
7676
with:
7777
list-files: json

CHANGELOG.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,43 @@
44

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

7+
## 7.99.0
8+
9+
### Important Changes
10+
11+
#### Deprecations
12+
13+
This release includes some deprecations for span related methods and integrations in our Deno SDK, `@sentry/deno`. For
14+
more details please look at our
15+
[migration guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md).
16+
17+
- feat(core): Deprecate `Span.setHttpStatus` in favor of `setHttpStatus` (#10268)
18+
- feat(core): Deprecate `spanStatusfromHttpCode` in favour of `getSpanStatusFromHttpCode` (#10361)
19+
- feat(core): Deprecate `StartSpanOptions.origin` in favour of passing attribute (#10274)
20+
- feat(deno): Expose functional integrations to replace classes (#10355)
21+
22+
### Other Changes
23+
24+
- feat(bun): Add missing `@sentry/node` re-exports (#10396)
25+
- feat(core): Add `afterAllSetup` hook for integrations (#10345)
26+
- feat(core): Ensure `startSpan()` can handle spans that require parent (#10386)
27+
- feat(core): Read propagation context off scopes in `startSpan` APIs (#10300)
28+
- feat(remix): Export missing `@sentry/node` functions (#10385, #10391)
29+
- feat(serverless): Add missing `@sentry/node` re-exports (#10390)
30+
- feat(sveltekit): Add more missing `@sentry/node` re-exports (#10392)
31+
- feat(tracing): Export proper type for browser tracing (#10411)
32+
- feat(tracing): Expose new `browserTracingIntegration` (#10351)
33+
- fix: Ensure `afterAllSetup` is called when using `addIntegration()` (#10372)
34+
- fix(core): Export `spanToTraceContext` function from span utils (#10364)
35+
- fix(core): Make `FunctionToString` integration use SETUP_CLIENTS weakmap (#10358)
36+
- fix(deno): Call function if client is not setup (#10354)
37+
- fix(react): Fix attachReduxState option (#10381)
38+
- fix(spotlight): Use unpatched http.request (#10369)
39+
- fix(tracing): Only create request span if there is active span (#10375)
40+
- ref: Read propagation context off of scope and isolation scope when propagating and applying trace context (#10297)
41+
42+
Work in this release contributed by @AleshaOleg. Thank you for your contribution!
43+
744
## 7.98.0
845

946
This release primarily fixes some type declaration errors:
@@ -20,7 +57,7 @@ Note: The 7.96.0 release was incomplete. This release is partially encompassing
2057

2158
## 7.96.0
2259

23-
Note: This release was incomplete. Not all Sentry SDK packages were released for this version. Please upgrade to 7.97.0
60+
Note: This release was incomplete. Not all Sentry SDK packages were released for this version. Please upgrade to 7.98.0
2461
directly.
2562

2663
### Important Changes
@@ -1103,7 +1140,7 @@ finished. This is useful for event emitters or similar.
11031140
function middleware(_req, res, next) {
11041141
return Sentry.startSpanManual({ name: 'middleware' }, (span, finish) => {
11051142
res.once('finish', () => {
1106-
span?.setHttpStatus(res.status);
1143+
setHttpStatus(span, res.status);
11071144
finish();
11081145
});
11091146
return next();

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ able to use it. From the top level of the repo, there are three commands availab
3737
dependencies (`utils`, `core`, `browser`, etc), and all packages which depend on it (currently `gatsby` and `nextjs`))
3838
- `yarn build:dev:watch`, which runs `yarn build:dev` in watch mode (recommended)
3939

40+
You can also run a production build via `yarn build`, which will build everything except for the tarballs for publishing
41+
to NPM. You can use this if you want to bundle Sentry yourself. The build output can be found in the packages `build/`
42+
folder, e.g. `packages/browser/build`. Bundled files can be found in `packages/browser/build/bundles`. Note that there
43+
are no guarantees about the produced file names etc., so make sure to double check which files are generated after
44+
upgrading.
45+
4046
## Testing SDK Packages Locally
4147

4248
To test local versions of SDK packages, for instance in test projects, you have a couple of options:

0 commit comments

Comments
 (0)