Skip to content

meta(changelog): Update changelog for 8.14.0 #12749

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

Merged
merged 31 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7cc5b4e
ref(bug-template): Add reproduction example step (#12671)
s1gr1d Jun 27, 2024
831e439
Merge pull request #12676 from getsentry/master
github-actions[bot] Jun 27, 2024
96b3f21
feat(bug-template): Add `@sentry/nest` (#12679)
s1gr1d Jun 27, 2024
36a15fa
chore: Remove @codecov/rollup-plugin (#12665)
AbhiPrasad Jun 27, 2024
f91b133
fix(browser): Make sure measure spans have valid start timestamps (#1…
AbhiPrasad Jun 27, 2024
c7b8503
chore: Remove `es-check` from deps (#12686)
AbhiPrasad Jun 28, 2024
5eafa40
fix(nextjs): Attempt to ignore critical dependency warnings (#12694)
Jun 28, 2024
c548c3c
feat(node): Add `registerEsmLoaderHooks` option (#12684)
timfish Jun 28, 2024
24dfc66
chore: Remove replace-in-file and inquirer (#12687)
AbhiPrasad Jun 28, 2024
f4a289d
test: Add OTEL E2E test app using sdk-node (#12690)
mydea Jul 1, 2024
f60aae5
feat(nuxt): Configure sentry in external config (#12681)
s1gr1d Jul 1, 2024
de07108
test: Fix tsconfig for browser-integration-tests (#12708)
mydea Jul 1, 2024
3d4a3e0
fix(hapi): Widen type definitions (#12710)
s1gr1d Jul 1, 2024
0d558de
feat(nestjs): Filter 4xx errors (#12695)
nicohrubec Jul 1, 2024
968301a
fix(replay): Start replay in `afterAllSetup` instead of next tick (#1…
mydea Jul 2, 2024
a6e2f77
ci: Refactor/fix external contribution handling (#12724)
mydea Jul 2, 2024
58af1d7
chore(react): Remove private namespace `JSX` (#12691)
quisido Jul 2, 2024
f243167
chore: Use npm-run-all2 (#12701)
AbhiPrasad Jul 2, 2024
840dd8f
fix(deno): Add prepack for deno build (#12700)
AbhiPrasad Jul 2, 2024
eec98a3
feat(deps): bump @prisma/instrumentation from 5.16.0 to 5.16.1 (#12718)
dependabot[bot] Jul 2, 2024
747e236
fix(remix): add esm export for node (#12663)
topaxi Jul 2, 2024
11aea16
feat(deps): bump @opentelemetry/propagator-aws-xray from 1.25.0 to 1.…
dependabot[bot] Jul 2, 2024
bd484cf
ci(deps): bump oven-sh/setup-bun from 1 to 2
dependabot[bot] Jul 2, 2024
8c655e4
feat(solidstart): Add solidstart SDK basic package (#12730)
andreiborza Jul 2, 2024
0c1e877
build: Bump yarn to `1.22.22` and pnpm to `9.4.0` (#12731)
mydea Jul 3, 2024
d5bba58
feat(opentelemetry): Expose sampling helper (#12674)
mydea Jul 3, 2024
a8c4db8
Revert "fix(remix): add esm export for node" (#12742)
Jul 3, 2024
071adae
fix(react): Fix React jsx runtime import for esm (#12740)
Jul 3, 2024
13ff71f
docs: Add note to changelog linking migration guide (#12735)
AbhiPrasad Jul 3, 2024
8fe0682
meta(changelog): Update changelog for 8.14.0
nicohrubec Jul 4, 2024
869a0d2
Add external contributor
nicohrubec Jul 4, 2024
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
12 changes: 8 additions & 4 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ body:
- '@sentry/ember'
- '@sentry/gatsby'
- '@sentry/google-cloud-serverless'
- '@sentry/nestjs'
- '@sentry/nextjs'
- '@sentry/node'
- '@sentry/react'
- '@sentry/remix'
- '@sentry/solid'
- '@sentry/svelte'
- '@sentry/sveltekit'
- '@sentry/vue'
Expand All @@ -56,7 +58,7 @@ body:
attributes:
label: SDK Version
description: What version of the SDK are you using?
placeholder: ex. 7.8.0
placeholder: ex. 8.10.0
validations:
required: true
- type: input
Expand All @@ -66,7 +68,7 @@ body:
description:
If you're using one of our framework-specific SDKs (`@sentry/react`, for example), what version of the
_framework_ are you using?
placeholder: ex. React 17.0.0
placeholder: ex. React 18.3.0 or Next 14.0.0
- type: input
id: link-to-sentry
attributes:
Expand All @@ -78,8 +80,10 @@ body:
- type: textarea
id: sdk-setup
attributes:
label: SDK Setup
description: How do you set up your Sentry SDK? Please show us your `Sentry.init` options.
label: SDK Setup/Reproduction Example
description:
How do you set up your Sentry SDK? Please show us your `Sentry.init` code.
Or even better—share a link to a reproduction example.
placeholder: |-
```javascript
Sentry.init({
Expand Down
44 changes: 4 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,44 +229,6 @@ jobs:
message: |
⚠️ This PR is opened against **master**. You probably want to open it against **develop**.

job_external_contributor:
name: External Contributors
needs: job_install_deps
runs-on: ubuntu-20.04
if: |
github.event_name == 'pull_request'
&& (github.event.action == 'opened' || github.event.action == 'reopened')
&& github.event.pull_request.author_association != 'COLLABORATOR'
&& github.event.pull_request.author_association != 'MEMBER'
&& github.event.pull_request.author_association != 'OWNER'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
- name: Check dependency cache
uses: actions/cache/restore@v4
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}
fail-on-cache-miss: true

- name: Add external contributor to CHANGELOG.md
uses: ./dev-packages/external-contributor-gh-action
with:
name: ${{ github.event.pull_request.user.login }}
- name: Create PR with changes
uses: peter-evans/create-pull-request@v6
with:
commit-message: "ref: Add external contributor to CHANGELOG.md"
title: "ref: Add external contributor to CHANGELOG.md"
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
delete-branch: true
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.

job_build:
name: Build
needs: [job_get_metadata, job_install_deps]
Expand Down Expand Up @@ -502,7 +464,7 @@ jobs:
with:
node-version-file: 'package.json'
- name: Set up Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
- name: Restore caches
uses: ./.github/actions/restore-cache
env:
Expand Down Expand Up @@ -761,6 +723,7 @@ jobs:
- loader_debug
- loader_tracing
- loader_replay
- loader_replay_buffer
- loader_tracing_replay

steps:
Expand Down Expand Up @@ -1050,6 +1013,7 @@ jobs:
'node-express-esm-preload',
'node-express-esm-without-loader',
'node-express-cjs-preload',
'node-otel-sdk-node',
'nextjs-app-dir',
'nextjs-14',
'nextjs-15',
Expand Down Expand Up @@ -1112,7 +1076,7 @@ jobs:
node-version-file: 'dev-packages/e2e-tests/package.json'
- name: Set up Bun
if: matrix.test-application == 'node-exports-test-app'
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
- name: Restore caches
uses: ./.github/actions/restore-cache
env:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/external-contributors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "CI: Mention external contributors"
on:
pull_request:
types:
- closed
branches:
- develop

jobs:
external_contributor:
name: External Contributors
runs-on: ubuntu-20.04
if: |
github.event.pull_request.author_association != 'COLLABORATOR'
&& github.event.pull_request.author_association != 'MEMBER'
&& github.event.pull_request.author_association != 'OWNER'
&& github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Add external contributor to CHANGELOG.md
uses: ./dev-packages/external-contributor-gh-action
with:
name: ${{ github.event.pull_request.user.login }}
- name: Create PR with changes
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
with:
commit-message: "ref: Add external contributor to CHANGELOG.md"
title: "ref: Add external contributor to CHANGELOG.md"
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
base: 'develop'
delete-branch: true
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.

27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
# 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.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
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { expect } from '@playwright/test';
import { sentryTest } from '../../../../utils/fixtures';
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';

const bundle = process.env.PW_BUNDLE || '';

sentryTest('should capture a replay', async ({ getLocalTestUrl, page }) => {
if (shouldSkipReplayTest()) {
// When in buffer mode, there will not be a replay by default
if (shouldSkipReplayTest() || bundle === 'loader_replay_buffer') {
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window.doSomethingWrong();
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { expect } from '@playwright/test';

import { sentryTest } from '../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';

sentryTest('should capture a replay & attach an error', async ({ getLocalTestUrl, page }) => {
if (shouldSkipReplayTest()) {
sentryTest.skip();
}

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

const req = waitForReplayRequest(page);

const url = await getLocalTestUrl({ testDir: __dirname });
const reqError = await waitForErrorRequestOnUrl(page, url);

const errorEventData = envelopeRequestParser(reqError);
expect(errorEventData.exception?.values?.length).toBe(1);
expect(errorEventData.exception?.values?.[0]?.value).toContain('window.doSomethingWrong is not a function');

const eventData = getReplayEvent(await req);

expect(eventData).toBeDefined();
expect(eventData.segment_id).toBe(0);

expect(errorEventData.tags?.replayId).toEqual(eventData.replay_id);
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ Sentry.onLoad(function () {
useCompression: false,
}),
],

replaysSessionSampleRate: 1,
});
});
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Sentry.onLoad(function () {
Sentry.init({});
Sentry.init({
replaysSessionSampleRate: 1,
});
});
1 change: 1 addition & 0 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"test:loader:eager": "PW_BUNDLE=loader_eager yarn test:loader",
"test:loader:tracing": "PW_BUNDLE=loader_tracing yarn test:loader",
"test:loader:replay": "PW_BUNDLE=loader_replay yarn test:loader",
"test:loader:replay_buffer": "PW_BUNDLE=loader_replay_buffer yarn test:loader",
"test:loader:full": "PW_BUNDLE=loader_tracing_replay yarn test:loader",
"test:loader:debug": "PW_BUNDLE=loader_debug yarn test:loader",
"test:ci": "yarn test:all --reporter='line'",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window.doSomethingWrong();
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { expect } from '@playwright/test';

import { sentryTest } from '../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';

sentryTest(
'[error-mode] should capture error that happens immediately after init',
async ({ getLocalTestUrl, page }) => {
if (shouldSkipReplayTest()) {
sentryTest.skip();
}

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

const req = waitForReplayRequest(page);

const url = await getLocalTestUrl({ testDir: __dirname });
const reqError = await waitForErrorRequestOnUrl(page, url);

const errorEventData = envelopeRequestParser(reqError);
expect(errorEventData.exception?.values?.length).toBe(1);
expect(errorEventData.exception?.values?.[0]?.value).toContain('window.doSomethingWrong is not a function');

const eventData = getReplayEvent(await req);

expect(eventData).toBeDefined();
expect(eventData.segment_id).toBe(0);

expect(errorEventData.tags?.replayId).toEqual(eventData.replay_id);
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Add measure before SDK initializes
const end = performance.now();
performance.measure('Next.js-before-hydration', {
duration: 1000,
end,
});

import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
debug: true,
dsn: 'https://[email protected]/1337',
integrations: [
Sentry.browserTracingIntegration({
idleTimeout: 9000,
}),
],
tracesSampleRate: 1,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { expect } from '@playwright/test';
import type { Event } from '@sentry/types';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';

// Validation test for https://github.com/getsentry/sentry-javascript/issues/12281
sentryTest('should add browser-related spans to pageload transaction', async ({ getLocalTestPath, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });

const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
const browserSpans = eventData.spans?.filter(({ op }) => op === 'browser');

// Spans `domContentLoadedEvent`, `connect`, `cache` and `DNS` are not
// always inside `pageload` transaction.
expect(browserSpans?.length).toBeGreaterThanOrEqual(4);

const requestSpan = browserSpans!.find(({ description }) => description === 'request');
expect(requestSpan).toBeDefined();

const measureSpan = eventData.spans?.find(({ op }) => op === 'measure');
expect(measureSpan).toBeDefined();

expect(requestSpan!.start_timestamp).toBeLessThanOrEqual(measureSpan!.start_timestamp);
expect(measureSpan?.data).toEqual({
'sentry.browser.measure_happened_before_request': true,
'sentry.browser.measure_start_time': expect.any(Number),
'sentry.op': 'measure',
'sentry.origin': 'auto.resource.browser.metrics',
});
});
3 changes: 2 additions & 1 deletion dev-packages/browser-integration-tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"noUncheckedIndexedAccess": false
},
"include": ["**/*.ts"],
"exclude": ["node_modules"]
Expand Down
Loading
Loading