Skip to content

Commit

Permalink
Merge branch 'develop' into cg/fetch-spans
Browse files Browse the repository at this point in the history
  • Loading branch information
chargome authored Jul 5, 2024
2 parents a833011 + 552fc2a commit 4238db1
Show file tree
Hide file tree
Showing 231 changed files with 4,407 additions and 2,274 deletions.
43 changes: 25 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
- 'packages/rollup-utils/**'
- 'packages/utils/**'
- 'packages/types/**'
- 'dev-packages/test-utils/**'
browser: &browser
- *shared
- 'packages/browser/**'
Expand Down Expand Up @@ -970,22 +971,19 @@ jobs:

job_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
# 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' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
if: always() && needs.job_e2e_prepare.result == 'success'
needs: [job_get_metadata, job_build, job_e2e_prepare]
runs-on: ubuntu-20.04
timeout-minutes: 10
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
# We just use a dummy DSN here, only send to the tunnel anyhow
E2E_TEST_DSN: 'https://username@domain/123'
# Needed because some apps expect a certain prefix
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
NEXT_PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
REACT_APP_E2E_TEST_DSN: 'https://username@domain/123'
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
Expand Down Expand Up @@ -1014,6 +1012,8 @@ jobs:
'node-express-esm-without-loader',
'node-express-cjs-preload',
'node-otel-sdk-node',
'ember-classic',
'ember-embroider',
'nextjs-app-dir',
'nextjs-14',
'nextjs-15',
Expand Down Expand Up @@ -1069,7 +1069,7 @@ jobs:
ref: ${{ env.HEAD_COMMIT }}
- uses: pnpm/action-setup@v4
with:
version: 8.3.1
version: 9.4.0
- name: Set up Node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -1106,12 +1106,12 @@ jobs:
- name: Build E2E app
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 5
run: yarn ${{ matrix.build-command || 'test:build' }}
run: pnpm ${{ matrix.build-command || 'test:build' }}

- name: Run E2E test
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 5
run: yarn test:assert
run: pnpm test:assert

- name: Deploy Astro to Cloudflare
uses: cloudflare/pages-action@v1
Expand Down Expand Up @@ -1146,8 +1146,6 @@ jobs:
strategy:
fail-fast: false
matrix:
is_dependabot:
- ${{ github.actor == 'dependabot[bot]' }}
test-application:
[
'react-send-to-sentry',
Expand All @@ -1156,8 +1154,17 @@ jobs:
]
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)'

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand All @@ -1166,7 +1173,7 @@ jobs:
ref: ${{ env.HEAD_COMMIT }}
- uses: pnpm/action-setup@v4
with:
version: 8.3.1
version: 9.4.0
- name: Set up Node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -1200,12 +1207,12 @@ jobs:
- name: Build E2E app
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 5
run: yarn ${{ matrix.build-command || 'test:build' }}
run: pnpm ${{ matrix.build-command || 'test:build' }}

- name: Run E2E test
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 5
run: yarn test:assert
run: pnpm ${{ matrix.assert-command || 'test:assert' }}

job_profiling_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
Expand Down Expand Up @@ -1245,7 +1252,7 @@ jobs:
ref: ${{ env.HEAD_COMMIT }}
- uses: pnpm/action-setup@v4
with:
version: 8.3.1
version: 9.4.0
- name: Set up Node
uses: actions/setup-node@v4
with:
Expand Down
56 changes: 7 additions & 49 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 20
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
# Needed because certain apps expect a certain prefix
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
# We just use a dummy DSN here, only send to the tunnel anyhow
E2E_TEST_DSN: 'https://username@domain/123'
# Needed because some apps expect a certain prefix
NEXT_PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
REACT_APP_E2E_TEST_DSN: 'https://username@domain/123'
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
ref: ${{ env.HEAD_COMMIT }}
- uses: pnpm/action-setup@v4
with:
version: 8.3.1
version: 9.4.0

- name: Set up Node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -151,45 +151,3 @@ jobs:
with:
filename: .github/CANARY_FAILURE_TEMPLATE.md
update_existing: true

job_ember_canary_test:
name: Ember Canary Tests
runs-on: ubuntu-20.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# scenario: [ember-release, embroider-optimized, ember-4.0]
scenario: [ember-4.0]
steps:
- name: 'Check out current commit'
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile

- name: Build dependencies
run: |
yarn lerna run build:types --scope=@sentry/ember --include-dependencies
yarn lerna run build:transpile --scope=@sentry/ember --include-dependencies
- name: Run Ember tests
run: |
cd packages/ember
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true
- name: Create Issue
if: failure() && github.event_name == 'schedule'
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
TITLE: Ember Canary ${{ matrix.scenario }} Test Failed
with:
filename: .github/CANARY_FAILURE_TEMPLATE.md
update_existing: true
2 changes: 0 additions & 2 deletions .github/workflows/external-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
&& github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Node
uses: actions/setup-node@v4
with:
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
# Changelog

> [!IMPORTANT]
> If you are upgrading to the `8.x` versions of the SDK from `7.x` or below, make sure you follow our
> [migration guide](https://docs.sentry.io/platforms/javascript/migration/) first.
## Unreleased

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

## 8.15.0

- feat(core): allow unregistering callback through `on` (#11710)
- feat(nestjs): Add function-level span decorator to nestjs (#12721)
- feat(otel): Export & use `spanTimeInputToSeconds` for otel span exporter (#12699)
- fix(core): Pass origin as referrer for `lazyLoadIntegration` (#12766)
- fix(deno): Publish from build directory (#12773)
- fix(hapi): Specify error channel to filter boom errors (#12725)
- fix(react): Revert back to `jsxRuntime: 'classic'` to prevent breaking react 17 (#12775)
- fix(tracing): Report dropped spans for transactions (#12751)
- ref(scope): Delete unused public `getStack()` (#12737)

Work in this release was contributed by @arturovt and @jaulz. Thank you for your contributions!

## 8.14.0

### Important Changes

- **feat(nestjs): Filter 4xx errors (#12695)**

The `@sentry/nestjs` SDK no longer captures 4xx errors automatically.

### Other Changes

- chore(react): Remove private namespace `JSX` (#12691)
- feat(deps): bump @opentelemetry/propagator-aws-xray from 1.25.0 to 1.25.1 (#12719)
- feat(deps): bump @prisma/instrumentation from 5.16.0 to 5.16.1 (#12718)
- feat(node): Add `registerEsmLoaderHooks` option (#12684)
- feat(opentelemetry): Expose sampling helper (#12674)
- fix(browser): Make sure measure spans have valid start timestamps (#12648)
- fix(hapi): Widen type definitions (#12710)
- fix(nextjs): Attempt to ignore critical dependency warnings (#12694)
- fix(react): Fix React jsx runtime import for esm (#12740)
- fix(replay): Start replay in `afterAllSetup` instead of next tick (#12709)

Work in this release was contributed by @quisido. Thank you for your contribution!

## 8.13.0

### Important Changes
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/browser-integration-tests",
"version": "8.13.0",
"version": "8.15.0",
"main": "index.js",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "^1.44.1",
"@sentry-internal/rrweb": "2.11.0",
"@sentry/browser": "8.13.0",
"@sentry/browser": "8.15.0",
"axios": "1.6.7",
"babel-loader": "^8.2.2",
"html-webpack-plugin": "^5.5.0",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/bundle-analyzer-scenarios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/bundle-analyzer-scenarios",
"version": "8.13.0",
"version": "8.15.0",
"description": "Scenarios to test bundle analysis with",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",
Expand Down
8 changes: 6 additions & 2 deletions dev-packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ current state.
Prerequisites: Docker

- Copy `.env.example` to `.env`
- Fill in auth information in `.env` for an example Sentry project
- Run `yarn build:tarball` in the root of the repository
- OPTIONAL: Fill in auth information in `.env` for an example Sentry project - you only need this to run E2E tests that
send data to Sentry.
- Run `yarn build:tarball` in the root of the repository (needs to be rerun after every update in /packages for the
changes to have effect on the tests).

To finally run all of the tests:

Expand Down Expand Up @@ -90,6 +92,8 @@ test apps enables us to reuse the same test suite over a number of different fra

### Standardized Frontend Test Apps

TODO: This is not up to date.

A standardized frontend test application has the following features:

- Just for the sake of consistency we prefix the standardized frontend tests with `standard-frontend-`. For example
Expand Down
33 changes: 0 additions & 33 deletions dev-packages/e2e-tests/lib/validate.ts

This file was deleted.

2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/e2e-tests",
"version": "8.13.0",
"version": "8.15.0",
"license": "MIT",
"private": true,
"scripts": {
Expand Down
5 changes: 0 additions & 5 deletions dev-packages/e2e-tests/prepare.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/* eslint-disable no-console */
import * as dotenv from 'dotenv';

import { validate } from './lib/validate';
import { registrySetup } from './registrySetup';

async function run(): Promise<void> {
// Load environment variables from .env file locally
dotenv.config();

if (!validate()) {
process.exit(1);
}

try {
registrySetup();
} catch (error) {
Expand Down
Loading

0 comments on commit 4238db1

Please sign in to comment.