Skip to content

Commit

Permalink
Merge pull request #14361 from getsentry/prepare-release/8.39.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst authored Nov 19, 2024
2 parents 6576ec4 + 8659f8d commit 5e6658a
Show file tree
Hide file tree
Showing 214 changed files with 5,175 additions and 1,223 deletions.
194 changes: 41 additions & 153 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ env:
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/core/src/version.ts
${{ github.workspace }}/packages/utils/cjs
${{ github.workspace }}/packages/utils/esm
Expand Down Expand Up @@ -801,7 +800,15 @@ jobs:
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
runs-on: ubuntu-20.04-large-js
timeout-minutes: 15
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
matrix-optional: ${{ steps.matrix-optional.outputs.matrix }}
steps:
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.base.sha }}
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -851,11 +858,21 @@ jobs:
path: ${{ github.workspace }}/packages/*/*.tgz
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}

- name: Determine which E2E test applications should be run
id: matrix
run: yarn --silent ci:build-matrix --base=${{ (github.event_name == 'pull_request' && github.event.pull_request.base.sha) || '' }} >> $GITHUB_OUTPUT
working-directory: dev-packages/e2e-tests

- name: Determine which optional E2E test applications should be run
id: matrix-optional
run: yarn --silent ci:build-matrix-optional --base=${{ (github.event_name == 'pull_request' && github.event.pull_request.base.sha) || '' }} >> $GITHUB_OUTPUT
working-directory: dev-packages/e2e-tests

job_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We need to add the `always()` check here because the previous step has this as well :(
# See: https://github.com/actions/runner/issues/2205
if: always() && needs.job_e2e_prepare.result == 'success'
if: always() && needs.job_e2e_prepare.result == 'success' && needs.job_e2e_prepare.outputs.matrix != '{"include":[]}'
needs: [job_get_metadata, job_build, job_e2e_prepare]
runs-on: ubuntu-20.04
timeout-minutes: 15
Expand All @@ -870,103 +887,7 @@ jobs:
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
fail-fast: false
matrix:
is_dependabot:
- ${{ github.actor == 'dependabot[bot]' }}
test-application:
[
'angular-17',
'angular-18',
'astro-4',
'aws-lambda-layer-cjs',
'aws-serverless-esm',
'node-express',
'create-react-app',
'create-next-app',
'create-remix-app',
'create-remix-app-legacy',
'create-remix-app-v2',
'create-remix-app-v2-legacy',
'create-remix-app-express',
'create-remix-app-express-legacy',
'create-remix-app-express-vite-dev',
'default-browser',
'node-express-esm-loader',
'node-express-esm-preload',
'node-express-esm-without-loader',
'node-express-cjs-preload',
'node-otel-sdk-node',
'node-otel-custom-sampler',
'node-otel-without-tracing',
'ember-classic',
'ember-embroider',
'nextjs-app-dir',
'nextjs-13',
'nextjs-14',
'nextjs-15',
'nextjs-turbo',
'nextjs-t3',
'react-17',
'react-19',
'react-create-hash-router',
'react-router-6-use-routes',
'react-router-5',
'react-router-6',
'solid',
'solidstart',
'solidstart-spa',
'svelte-5',
'sveltekit',
'sveltekit-2',
'sveltekit-2-svelte-5',
'sveltekit-2-twp',
'tanstack-router',
'generic-ts3.8',
'node-fastify',
'node-fastify-5',
'node-hapi',
'node-nestjs-basic',
'node-nestjs-distributed-tracing',
'nestjs-basic',
'nestjs-distributed-tracing',
'nestjs-with-submodules',
'nestjs-with-submodules-decorator',
'nestjs-basic-with-graphql',
'nestjs-graphql',
'node-exports-test-app',
'node-koa',
'node-connect',
'nuxt-3',
'nuxt-4',
'vue-3',
'webpack-4',
'webpack-5'
]
build-command:
- false
label:
- false
# Add any variations of a test app here
# You should provide an alternate build-command as well as a matching label
include:
- test-application: 'create-react-app'
build-command: 'test:build-ts3.8'
label: 'create-react-app (TS 3.8)'
- test-application: 'react-router-6'
build-command: 'test:build-ts3.8'
label: 'react-router-6 (TS 3.8)'
- test-application: 'create-next-app'
build-command: 'test:build-13'
label: 'create-next-app (next@13)'
- test-application: 'nextjs-app-dir'
build-command: 'test:build-13'
label: 'nextjs-app-dir (next@13)'
exclude:
- is_dependabot: true
test-application: 'cloudflare-astro'
- is_dependabot: true
test-application: 'cloudflare-workers'

matrix: ${{ fromJson(needs.job_e2e_prepare.outputs.matrix) }}
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v4
Expand Down Expand Up @@ -1067,6 +988,7 @@ jobs:
# See: https://github.com/actions/runner/issues/2205
if:
always() && needs.job_e2e_prepare.result == 'success' &&
needs.job_e2e_prepare.outputs.matrix-optional != '{"include":[]}' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
github.actor != 'dependabot[bot]'
needs: [job_get_metadata, job_build, job_e2e_prepare]
Expand All @@ -1083,58 +1005,7 @@ jobs:
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
fail-fast: false
matrix:
test-application:
[
'cloudflare-astro',
'cloudflare-workers',
'react-send-to-sentry',
'node-express-send-to-sentry',
'debug-id-sourcemaps',
]
build-command:
- false
assert-command:
- false
label:
- false
include:
- test-application: 'create-remix-app'
assert-command: 'test:assert-sourcemaps'
label: 'create-remix-app (sourcemaps)'
- test-application: 'create-remix-app-legacy'
assert-command: 'test:assert-sourcemaps'
label: 'create-remix-app-legacy (sourcemaps)'
- test-application: 'nextjs-app-dir'
build-command: 'test:build-canary'
label: 'nextjs-app-dir (canary)'
- test-application: 'nextjs-app-dir'
build-command: 'test:build-latest'
label: 'nextjs-app-dir (latest)'
- test-application: 'nextjs-13'
build-command: 'test:build-canary'
label: 'nextjs-13 (canary)'
- test-application: 'nextjs-13'
build-command: 'test:build-latest'
label: 'nextjs-13 (latest)'
- test-application: 'nextjs-14'
build-command: 'test:build-canary'
label: 'nextjs-14 (canary)'
- test-application: 'nextjs-14'
build-command: 'test:build-latest'
label: 'nextjs-14 (latest)'
- test-application: 'nextjs-15'
build-command: 'test:build-canary'
label: 'nextjs-15 (canary)'
- test-application: 'nextjs-15'
build-command: 'test:build-latest'
label: 'nextjs-15 (latest)'
- test-application: 'nextjs-turbo'
build-command: 'test:build-canary'
label: 'nextjs-turbo (canary)'
- test-application: 'nextjs-turbo'
build-command: 'test:build-latest'
label: 'nextjs-turbo (latest)'
matrix: ${{ fromJson(needs.job_e2e_prepare.outputs.matrix-optional) }}

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand Down Expand Up @@ -1234,7 +1105,7 @@ jobs:
(needs.job_get_metadata.outputs.is_release == 'true')
)
needs: [job_get_metadata, job_build, job_e2e_prepare]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
Expand All @@ -1254,19 +1125,24 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD_COMMIT }}

- uses: pnpm/action-setup@v4
with:
version: 9.4.0

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Restore caches
uses: ./.github/actions/restore-cache
with:
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Build Profiling Node
run: yarn lerna run build:lib --scope @sentry/profiling-node

- name: Extract Profiling Node Prebuilt Binaries
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -1305,6 +1181,18 @@ jobs:
env:
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}

- name: Setup xvfb and update ubuntu dependencies
run: |
sudo apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
libnotify-dev libgconf2-dev \
libasound2-dev libcap-dev libcups2-dev libxtst-dev \
libxss1 libnss3-dev gcc-multilib g++-multilib
- name: Install dependencies
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
run: yarn install --ignore-engines --frozen-lockfile

- name: Build E2E app
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 7
Expand All @@ -1313,7 +1201,7 @@ jobs:
- name: Run E2E test
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 10
run: yarn test:assert
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:assert

job_required_jobs_passed:
name: All required jobs passed or were skipped
Expand Down
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ module.exports = [
path: 'packages/vue/build/esm/index.js',
import: createImport('init', 'browserTracingIntegration'),
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Svelte SDK (ESM)
{
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@

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

## 8.39.0

### Important Changes

- **feat(nestjs): Instrument event handlers ([#14307](https://github.com/getsentry/sentry-javascript/pull/14307))**

The `@sentry/nestjs` SDK will now capture performance data for [NestJS Events (`@nestjs/event-emitter`)](https://docs.nestjs.com/techniques/events)

### Other Changes

- feat(nestjs): Add alias `@SentryExceptionCaptured` for `@WithSentry` ([#14322](https://github.com/getsentry/sentry-javascript/pull/14322))
- feat(nestjs): Duplicate `SentryService` behaviour into `@sentry/nestjs` SDK `init()` ([#14321](https://github.com/getsentry/sentry-javascript/pull/14321))
- feat(nestjs): Handle GraphQL contexts in `SentryGlobalFilter` ([#14320](https://github.com/getsentry/sentry-javascript/pull/14320))
- feat(node): Add alias `childProcessIntegration` for `processThreadBreadcrumbIntegration` and deprecate it ([#14334](https://github.com/getsentry/sentry-javascript/pull/14334))
- feat(node): Ensure request bodies are reliably captured for http requests ([#13746](https://github.com/getsentry/sentry-javascript/pull/13746))
- feat(replay): Upgrade rrweb packages to 2.29.0 ([#14160](https://github.com/getsentry/sentry-javascript/pull/14160))
- fix(cdn): Ensure `_sentryModuleMetadata` is not mangled ([#14344](https://github.com/getsentry/sentry-javascript/pull/14344))
- fix(core): Set `sentry.source` attribute to `custom` when calling `span.updateName` on `SentrySpan` ([#14251](https://github.com/getsentry/sentry-javascript/pull/14251))
- fix(mongo): rewrite Buffer as ? during serialization ([#14071](https://github.com/getsentry/sentry-javascript/pull/14071))
- fix(replay): Remove replay id from DSC on expired sessions ([#14342](https://github.com/getsentry/sentry-javascript/pull/14342))
- ref(profiling) Fix electron crash ([#14216](https://github.com/getsentry/sentry-javascript/pull/14216))
- ref(types): Deprecate `Request` type in favor of `RequestEventData` ([#14317](https://github.com/getsentry/sentry-javascript/pull/14317))
- ref(utils): Stop setting `transaction` in `requestDataIntegration` ([#14306](https://github.com/getsentry/sentry-javascript/pull/14306))
- ref(vue): Reduce bundle size for starting application render span ([#14275](https://github.com/getsentry/sentry-javascript/pull/14275))

## 8.38.0

- docs: Improve docstrings for node otel integrations ([#14217](https://github.com/getsentry/sentry-javascript/pull/14217))
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"dependencies": {
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "^1.44.1",
"@sentry-internal/rrweb": "2.11.0",
"@sentry-internal/rrweb": "2.29.0",
"@sentry/browser": "8.38.0",
"axios": "1.7.7",
"babel-loader": "^8.2.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
window.addEventListener('error', function (event) {
Sentry.captureException(event);
});

window.thisDoesNotExist();
Sentry.captureException(new ErrorEvent('something', { message: 'test error' }));
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import type { Event } from '@sentry/types';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';

sentryTest('should capture an ErrorEvent', async ({ getLocalTestPath, page }) => {
const url = await getLocalTestPath({ testDir: __dirname });
sentryTest('should capture an ErrorEvent', async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });

const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);

expect(eventData.exception?.values).toHaveLength(1);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'ErrorEvent',
value: 'Event `ErrorEvent` captured as exception with message `Script error.`',
value: 'Event `ErrorEvent` captured as exception with message `test error`',
mechanism: {
type: 'generic',
handled: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
window.calls = {};
const xhr = new XMLHttpRequest();
xhr.open('GET', 'test');
xhr.open('GET', 'http://example.com');
xhr.onreadystatechange = function wat() {
window.calls[xhr.readyState] = window.calls[xhr.readyState] ? window.calls[xhr.readyState] + 1 : 1;
};
Expand Down
Loading

0 comments on commit 5e6658a

Please sign in to comment.