Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: Add Changelog entry for 8.7.0 #12280

Merged
merged 11 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 85 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ jobs:
'create-remix-app-v2',
'create-remix-app-express',
'create-remix-app-express-vite-dev',
'debug-id-sourcemaps',
'node-express-esm-loader',
'node-express-esm-preload',
'node-express-esm-without-loader',
Expand All @@ -1018,6 +1017,7 @@ jobs:
'sveltekit',
'sveltekit-2',
'sveltekit-2-svelte-5',
'tanstack-router',
'generic-ts3.8',
'node-fastify',
'node-hapi',
Expand Down Expand Up @@ -1113,6 +1113,90 @@ jobs:
directory: dist
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}

job_optional_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)
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 }}
# 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 }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
fail-fast: false
matrix:
is_dependabot:
- ${{ github.actor == 'dependabot[bot]' }}
test-application:
[
'react-send-to-sentry',
'node-express-send-to-sentry',
'debug-id-sourcemaps',
]
build-command:
- false
label:
- false

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD_COMMIT }}
- uses: pnpm/action-setup@v2
with:
version: 8.3.1
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: 'dev-packages/e2e-tests/package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Restore tarball cache
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/packages/*/*.tgz
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}

- name: Get node version
id: versions
run: |
echo "echo node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT

- name: Validate Verdaccio
run: yarn test:validate
working-directory: dev-packages/e2e-tests

- name: Prepare Verdaccio
run: yarn test:prepare
working-directory: dev-packages/e2e-tests
env:
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}

- 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' }}

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

job_profiling_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
Expand Down
4 changes: 2 additions & 2 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module.exports = [
name: 'CDN Bundle (incl. Tracing, Replay)',
path: createCDNPath('bundle.tracing.replay.min.js'),
gzip: true,
limit: '70 KB',
limit: '72 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
Expand All @@ -170,7 +170,7 @@ module.exports = [
path: createCDNPath('bundle.tracing.min.js'),
gzip: false,
brotli: false,
limit: '105 KB',
limit: '110 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@

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

## 8.7.0

### Important Changes

- **feat(react): Add TanStack Router integration (#12095)**

This release adds instrumentation for TanStack router with a new `tanstackRouterBrowserTracingIntegration` in the
`@sentry/react` SDK:

```javascript
import * as Sentry from '@sentry/react';
import { createRouter } from '@tanstack/react-router';

const router = createRouter({
// Your router options...
});

Sentry.init({
dsn: '___PUBLIC_DSN___',
integrations: [Sentry.tanstackRouterBrowserTracingIntegration(router)],
tracesSampleRate: 1.0,
});
```

### Other Changes

- fix(nextjs): Do not hide `sourceMappingURL` comment on client when `nextConfig.productionBrowserSourceMaps: true` is
set (#12278)

## 8.6.0

### Important Changes
Expand Down
4 changes: 1 addition & 3 deletions dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@
"dotenv": "16.0.3",
"esbuild": "0.20.0",
"glob": "8.0.3",
"rimraf": "^3.0.2",
"ts-node": "10.9.1",
"yaml": "2.2.2"
},
"volta": {
"node": "18.20.2",
"yarn": "1.22.22",
"extends": "../../package.json",
"pnpm": "8.15.8"
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

// Fix urls not resolving to localhost on Node v17+
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
import { setDefaultResultOrder } from 'dns';
setDefaultResultOrder('ipv4first');

const testEnv = process.env['TEST_ENV'] || 'production';

if (!testEnv) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

// Fix urls not resolving to localhost on Node v17+
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
import { setDefaultResultOrder } from 'dns';
setDefaultResultOrder('ipv4first');

const testEnv = process.env['TEST_ENV'] || 'production';

if (!testEnv) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

// Fix urls not resolving to localhost on Node v17+
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
import { setDefaultResultOrder } from 'dns';
setDefaultResultOrder('ipv4first');

const testEnv = process.env.TEST_ENV;

if (!testEnv) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { expect, test } from '@playwright/test';
import axios, { AxiosError } from 'axios';

const authToken = process.env.E2E_TEST_AUTH_TOKEN;
const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG;
Expand All @@ -20,24 +19,12 @@ test('Sends a client-side exception to Sentry', async ({ page }) => {
await expect
.poll(
async () => {
try {
const response = await axios.get(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionEventId}/`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

return response.status;
} catch (e) {
if (e instanceof AxiosError && e.response) {
if (e.response.status !== 404) {
throw e;
} else {
return e.response.status;
}
} else {
throw e;
}
}
const response = await fetch(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionEventId}/`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

return response.status;
},
{
timeout: EVENT_POLLING_TIMEOUT,
Expand Down Expand Up @@ -71,28 +58,19 @@ test('Sends a pageload transaction to Sentry', async ({ page }) => {
await expect
.poll(
async () => {
try {
const response = await axios.get(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

if (response.data.contexts.trace.op === 'pageload') {
const response = await fetch(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

if (response.ok) {
const data = await response.json();
if (data.contexts.trace.op === 'pageload') {
hadPageLoadTransaction = true;
}

return response.status;
} catch (e) {
if (e instanceof AxiosError && e.response) {
if (e.response.status !== 404) {
throw e;
} else {
return e.response.status;
}
} else {
throw e;
}
}

return response.status;
},
{
timeout: EVENT_POLLING_TIMEOUT,
Expand Down Expand Up @@ -136,28 +114,19 @@ test('Sends a navigation transaction to Sentry', async ({ page }) => {
await expect
.poll(
async () => {
try {
const response = await axios.get(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

if (response.data.contexts.trace.op === 'navigation') {
const response = await fetch(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

if (response.ok) {
const data = await response.json();
if (data.contexts.trace.op === 'navigation') {
hadPageNavigationTransaction = true;
}

return response.status;
} catch (e) {
if (e instanceof AxiosError && e.response) {
if (e.response.status !== 404) {
throw e;
} else {
return e.response.status;
}
} else {
throw e;
}
}

return response.status;
},
{
timeout: EVENT_POLLING_TIMEOUT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { expect, test } from '@playwright/test';
import axios, { AxiosError } from 'axios';

const authToken = process.env.E2E_TEST_AUTH_TOKEN;
const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG;
Expand All @@ -18,21 +17,8 @@ test('Sends a server-side exception to Sentry', async ({ baseURL }) => {
await expect
.poll(
async () => {
try {
const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } });

return response.status;
} catch (e) {
if (e instanceof AxiosError && e.response) {
if (e.response.status !== 404) {
throw e;
} else {
return e.response.status;
}
} else {
throw e;
}
}
const response = await fetch(url, { headers: { Authorization: `Bearer ${authToken}` } });
return response.status;
},
{ timeout: EVENT_POLLING_TIMEOUT },
)
Expand All @@ -53,21 +39,8 @@ test('Sends server-side transactions to Sentry', async ({ baseURL }) => {
await expect
.poll(
async () => {
try {
const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } });

return response.status;
} catch (e) {
if (e instanceof AxiosError && e.response) {
if (e.response.status !== 404) {
throw e;
} else {
return e.response.status;
}
} else {
throw e;
}
}
const response = await fetch(url, { headers: { Authorization: `Bearer ${authToken}` } });
return response.status;
},
{ timeout: EVENT_POLLING_TIMEOUT },
)
Expand Down
Loading
Loading