Skip to content

meta(changelog): Update changelog for 8.32.0 #13770

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 21 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
97974ba
ref(nextjs): Improve app router routing instrumentation accuracy (#13…
Sep 20, 2024
dbfd8e2
meta(changelog): Add PR link to changelog entry (#13735)
s1gr1d Sep 20, 2024
216aaeb
chore: Remove alpha note from cloudflare readme (#13728)
AbhiPrasad Sep 20, 2024
13d78ba
test(nestjs): Fix e2e test dependency to allow prereleases (#13744)
mydea Sep 23, 2024
7584ae4
fix(test): Unflake LCP test (#13741)
onurtemizkan Sep 23, 2024
568ab8a
chore(repo): Manually sync master -> develop (#13747)
Lms24 Sep 23, 2024
c0a5a3e
fix(nuxt): Use Nuxt error hooks instead of errorHandler to prevent 50…
s1gr1d Sep 23, 2024
1f898b6
feat: Set log level for Fetch/XHR breadcrumbs based on status code (#…
Zen-cronic Sep 23, 2024
021c8c1
ref(browser): Move navigation span descriptions into op (#13527)
0Calories Sep 23, 2024
de9cf8a
feat(node): Add amqplibIntegration (#13714)
obecny Sep 23, 2024
40ebfad
ref: Add external contributor to CHANGELOG.md (#13749)
github-actions[bot] Sep 24, 2024
5fffd1b
feat(nestjs): Add `SentryGlobalGenericFilter` and allow specifying ap…
Sjoertjuh Sep 24, 2024
a9750be
fix(node): Ensure node-fetch does not emit spans without tracing (#13…
mydea Sep 24, 2024
ed150ed
chore(nextjs): Bump rollup to 3.29.5 (#13761)
chargome Sep 24, 2024
cb7f16e
ref: Add external contributor to CHANGELOG.md (#13764)
github-actions[bot] Sep 24, 2024
354dcee
fix(core): Remove `sampled` flag from dynamic sampling context in Tra…
Lms24 Sep 24, 2024
07d9d35
wip: add browser utils dep
mydea Sep 24, 2024
9018132
test: Unflake some node-integration-tests (#13771)
mydea Sep 24, 2024
0aac3c6
Merge pull request #13772 from getsentry/fn/manual-sync
mydea Sep 25, 2024
efd7a70
docs: Fix changelog (#13786)
mydea Sep 25, 2024
0a21708
meta(changelog): Update changelog for 8.32.0
chargome Sep 24, 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
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,7 @@ jobs:
'node-express-cjs-preload',
'node-otel-sdk-node',
'node-otel-custom-sampler',
'node-otel-without-tracing',
'ember-classic',
'ember-embroider',
'nextjs-app-dir',
Expand Down Expand Up @@ -923,6 +924,7 @@ jobs:
'nestjs-distributed-tracing',
'nestjs-with-submodules',
'nestjs-with-submodules-decorator',
'nestjs-basic-with-graphql',
'nestjs-graphql',
'node-exports-test-app',
'node-koa',
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ local.log
.rpt2_cache

lint-results.json
trace.zip

# legacy
tmp.js
Expand All @@ -58,3 +59,6 @@ packages/deno/lib.deno.d.ts

# gatsby
packages/gatsby/gatsby-node.d.ts

# intellij
*.iml
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,41 @@

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

## 8.32.0

### Important Changes

- **ref(browser): Move navigation span descriptions into op
([#13527](https://github.com/getsentry/sentry-javascript/pull/13527))**

Moves the description of navigation related browser spans into the op, e.g. browser - cache -> browser.cache and sets
the description to the performanceEntry objects' names (in this context it is the URL of the page).

- **feat(node): Add amqplibIntegration ([#13714](https://github.com/getsentry/sentry-javascript/pull/13714))**

- **feat(nestjs): Add `SentryGlobalGenericFilter` and allow specifying application ref in global filter
([#13673](https://github.com/getsentry/sentry-javascript/pull/13673))**

Adds a `SentryGlobalGenericFilter` that filters both graphql and http exceptions depending on the context.

- **feat: Set log level for Fetch/XHR breadcrumbs based on status code
([#13711](https://github.com/getsentry/sentry-javascript/pull/13711))**

Sets log levels in breadcrumbs for 5xx to error and 4xx to warning.

### Other Changes

- chore(nextjs): Bump rollup to 3.29.5 ([#13761](https://github.com/getsentry/sentry-javascript/pull/13761))
- fix(core): Remove `sampled` flag from dynamic sampling context in Tracing without Performance mode
([#13753](https://github.com/getsentry/sentry-javascript/pull/13753))
- fix(node): Ensure node-fetch does not emit spans without tracing
([#13765](https://github.com/getsentry/sentry-javascript/pull/13765))
- fix(nuxt): Use Nuxt error hooks instead of errorHandler to prevent 500
([#13748](https://github.com/getsentry/sentry-javascript/pull/13748))
- fix(test): Unflake LCP test ([#13741](https://github.com/getsentry/sentry-javascript/pull/13741))

Work in this release was contributed by @Zen-cronic and @Sjoertjuh. Thank you for your contributions!

## 8.31.0

### Important Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fetch('http://sentry-test.io/foo').then(() => {
Sentry.captureException('test error');
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { expect } from '@playwright/test';
import type { Event } from '@sentry/types';

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

sentryTest('captures Breadcrumb with log level for 4xx response code', async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });

await page.route('**/foo', async route => {
await route.fulfill({
status: 404,
contentType: 'text/plain',
body: 'Not Found!',
});
});

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

expect(eventData.exception?.values).toHaveLength(1);

expect(eventData?.breadcrumbs?.length).toBe(1);
expect(eventData!.breadcrumbs![0]).toEqual({
timestamp: expect.any(Number),
category: 'fetch',
type: 'http',
data: {
method: 'GET',
status_code: 404,
url: 'http://sentry-test.io/foo',
},
level: 'warning',
});

await page.route('**/foo', async route => {
await route.fulfill({
status: 500,
contentType: 'text/plain',
body: 'Internal Server Error',
});
});
});

sentryTest('captures Breadcrumb with log level for 5xx response code', async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });

await page.route('**/foo', async route => {
await route.fulfill({
status: 500,
contentType: 'text/plain',
body: 'Internal Server Error',
});
});

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

expect(eventData.exception?.values).toHaveLength(1);

expect(eventData?.breadcrumbs?.length).toBe(1);
expect(eventData!.breadcrumbs![0]).toEqual({
timestamp: expect.any(Number),
category: 'fetch',
type: 'http',
data: {
method: 'GET',
status_code: 500,
url: 'http://sentry-test.io/foo',
},
level: 'error',
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const xhr = new XMLHttpRequest();

xhr.open('GET', 'http://sentry-test.io/foo');
xhr.send();

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
Sentry.captureException('test error');
}
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { expect } from '@playwright/test';
import type { Event } from '@sentry/types';

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

sentryTest('captures Breadcrumb with log level for 4xx response code', async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });

await page.route('**/foo', async route => {
await route.fulfill({
status: 404,
contentType: 'text/plain',
body: 'Not Found!',
});
});

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

expect(eventData.exception?.values).toHaveLength(1);

expect(eventData?.breadcrumbs?.length).toBe(1);
expect(eventData!.breadcrumbs![0]).toEqual({
timestamp: expect.any(Number),
category: 'xhr',
type: 'http',
data: {
method: 'GET',
status_code: 404,
url: 'http://sentry-test.io/foo',
},
level: 'warning',
});

await page.route('**/foo', async route => {
await route.fulfill({
status: 500,
contentType: 'text/plain',
body: 'Internal Server Error',
});
});
});

sentryTest('captures Breadcrumb with log level for 5xx response code', async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });

await page.route('**/foo', async route => {
await route.fulfill({
status: 500,
contentType: 'text/plain',
body: 'Internal Server Error',
});
});

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

expect(eventData.exception?.values).toHaveLength(1);

expect(eventData?.breadcrumbs?.length).toBe(1);
expect(eventData!.breadcrumbs![0]).toEqual({
timestamp: expect.any(Number),
category: 'xhr',
type: 'http',
data: {
method: 'GET',
status_code: 500,
url: 'http://sentry-test.io/foo',
},
level: 'error',
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,39 @@ sentryTest(
);

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

const [eventData] = await Promise.all([
getFirstSentryEnvelopeRequest<Event>(page),
page.goto(url),
page.click('button'),
page.locator('button').click(),
]);

expect(eventData.measurements).toBeDefined();
expect(eventData.measurements?.lcp?.value).toBeDefined();

expect(eventData.contexts?.trace?.data?.['lcp.element']).toBe('body > img');
expect(eventData.contexts?.trace?.data?.['lcp.size']).toBe(107400);
expect(eventData.contexts?.trace?.data?.['lcp.url']).toBe('https://example.com/path/to/image.png');
// This should be body > img, but it can be flakey as sometimes it will report
// the button as LCP.
expect(eventData.contexts?.trace?.data?.['lcp.element'].startsWith('body >')).toBe(true);

// Working around flakiness
// Only testing this when the LCP element is an image, not a button
if (eventData.contexts?.trace?.data?.['lcp.element'] === 'body > img') {
expect(eventData.contexts?.trace?.data?.['lcp.size']).toBe(107400);

const lcp = await (await page.waitForFunction('window._LCP')).jsonValue();
const lcp2 = await (await page.waitForFunction('window._LCP2')).jsonValue();
const lcp3 = await page.evaluate('window._LCP3');
const lcp = await (await page.waitForFunction('window._LCP')).jsonValue();
const lcp2 = await (await page.waitForFunction('window._LCP2')).jsonValue();
const lcp3 = await page.evaluate('window._LCP3');

expect(lcp).toEqual(107400);
expect(lcp2).toEqual(107400);
// this has not been triggered yet
expect(lcp3).toEqual(undefined);
expect(lcp).toEqual(107400);
expect(lcp2).toEqual(107400);
// this has not been triggered yet
expect(lcp3).toEqual(undefined);

// Adding a handler after LCP is completed still triggers the handler
await page.evaluate('window.ADD_HANDLER()');
const lcp3_2 = await (await page.waitForFunction('window._LCP3')).jsonValue();
// Adding a handler after LCP is completed still triggers the handler
await page.evaluate('window.ADD_HANDLER()');
const lcp3_2 = await (await page.waitForFunction('window._LCP3')).jsonValue();

expect(lcp3_2).toEqual(107400);
expect(lcp3_2).toEqual(107400);
}
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sentryTest('should add browser-related spans to pageload transaction', async ({
const url = await getLocalTestPath({ testDir: __dirname });

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

// Spans `domContentLoadedEvent`, `connect`, `cache` and `DNS` are not
// always inside `pageload` transaction.
Expand All @@ -21,7 +21,8 @@ sentryTest('should add browser-related spans to pageload transaction', async ({
['loadEvent', 'request', 'response'].forEach(eventDesc =>
expect(browserSpans).toContainEqual(
expect.objectContaining({
description: eventDesc,
op: `browser.${eventDesc}`,
description: page.url(),
parent_span_id: eventData.contexts?.trace?.span_id,
}),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ sentryTest('should add browser-related spans to pageload transaction', async ({
const url = await getLocalTestPath({ testDir: __dirname });

const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
const browserSpans = eventData.spans?.filter(({ op }) => op === 'browser');
const browserSpans = eventData.spans?.filter(({ op }) => op?.startsWith('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');
const requestSpan = browserSpans!.find(({ op }) => op === 'browser.request');
expect(requestSpan).toBeDefined();
expect(requestSpan?.description).toBe(page.url());

const measureSpan = eventData.spans?.find(({ op }) => op === 'measure');
expect(measureSpan).toBeDefined();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# compiled output
/dist
/node_modules
/build

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# temp directory
.temp
.tmp

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
}
}
Loading
Loading