Skip to content

meta(changelog): Update changelog for 8.23.0 #13228

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 27 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6a61244
ci: Fix non-PR unit tests (#13174)
mydea Aug 2, 2024
988d8e7
fix(nuxt): Add nuxt-module-builder for build output (#13183)
s1gr1d Aug 2, 2024
53fdd4d
docs(nextjs): Update Next.js readme (#13185)
Aug 2, 2024
2b7fa21
ref(browser): Improve browserMetrics collection (#13062)
horochx Aug 2, 2024
7e1a641
feat(core): Add `getTraceData` function (#13134)
Lms24 Aug 2, 2024
19bdb13
build: upgrade artifacts actions to v4 (#13143)
JonasBa Aug 2, 2024
5f3f531
chore(readme): Add new sentry banner to readme (#13165)
andreiborza Aug 2, 2024
a7fbe01
test: Fix flakey Playwright tests due to static assets (#13199)
billyvg Aug 2, 2024
b4a9970
feat(cloudflare): instrument scheduled handler (#13114)
AbhiPrasad Aug 2, 2024
4ddc7eb
ref: Add external contributor to CHANGELOG.md (#13195)
github-actions[bot] Aug 2, 2024
f9a040a
Call dialog.close() in onFormClose and onFormSubmitted callbacks for …
spalmurray Aug 2, 2024
841d57c
Move dialog.close() call into _loadAndRenderDialog
spalmurray Aug 2, 2024
7be412c
Revert change to onFormClose for _attachTo
spalmurray Aug 2, 2024
d996c22
fix(feedback): Call dialog.close() in dialog close callbacks in _load…
spalmurray-codecov Aug 2, 2024
07a30e5
feat(cloudflare): Allow users to pass handler to sentryPagesPlugin (#…
AbhiPrasad Aug 2, 2024
d107860
chore(cloudflare): Add cloudflare sdk to the release registry (#13206)
AbhiPrasad Aug 2, 2024
c558ecb
ci: Unflake #13177 (#13193)
Aug 2, 2024
ba370fc
test: Soft skip flakey LCP test (#13200)
billyvg Aug 2, 2024
e6642a7
tests(e2e): Unflake nest cron tests (#13218)
nicohrubec Aug 5, 2024
bedc385
feat(solidstart): Filter out low quality transactions for build asset…
andreiborza Aug 5, 2024
4ebac94
feat(solidstart): Add sentry `onBeforeResponse` middleware to enable …
andreiborza Aug 5, 2024
7ad5054
ref(node): Split up nest integration into multiple files (#13172)
nicohrubec Aug 5, 2024
5f4a71c
test(e2e): Unflake NestJS e2e tests (#13188)
Aug 5, 2024
9289200
fix(nuxt): Detect pageload by adding flag in Vue router (#13171)
s1gr1d Aug 5, 2024
957324e
fix(utils): Handle when requests get aborted in fetch instrumentation…
AbhiPrasad Aug 5, 2024
a80d6bb
meta(changelog): Update changelog for 8.23.0
Aug 5, 2024
70eae3d
Merge branch 'master' into prepare-release/8.23.0
Aug 5, 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 .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ targets:
format: base64
'npm:@sentry/bun':
onlyIfPresent: /^sentry-bun-\d.*\.tgz$/
'npm:@sentry/cloudflare':
onlyIfPresent: /^sentry-cloudflare-\d.*\.tgz$/
'npm:@sentry/deno':
onlyIfPresent: /^sentry-deno-\d.*\.tgz$/
'npm:@sentry/ember':
Expand Down
57 changes: 42 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ jobs:
- *shared
- *node
- 'dev-packages/node-integration-tests/**'
- 'packages/nestjs/**'
nextjs:
- *shared
- *browser
Expand Down Expand Up @@ -408,10 +409,11 @@ jobs:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Extract Profiling Node Prebuilt Binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiling-node-binaries-${{ github.sha }}
pattern: profiling-node-binaries-${{ github.sha }}-*
path: ${{ github.workspace }}/packages/profiling-node/lib/
merge-multiple: true

- name: Pack tarballs
run: yarn build:tarball
Expand Down Expand Up @@ -901,16 +903,15 @@ jobs:
run: yarn lerna run build:lib --scope @sentry/profiling-node

- name: Extract Profiling Node Prebuilt Binaries
# @TODO: v4 breaks convenient merging of same name artifacts
# https://github.com/actions/upload-artifact/issues/478
if: |
(needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
(needs.job_get_metadata.outputs.is_release == 'true') ||
(github.event_name != 'pull_request')
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiling-node-binaries-${{ github.sha }}
pattern: profiling-node-binaries-${{ github.sha }}-*
path: ${{ github.workspace }}/packages/profiling-node/lib/
merge-multiple: true

- name: Build Profiling tarball
run: yarn build:tarball
Expand Down Expand Up @@ -1230,11 +1231,11 @@ jobs:
- name: Build Profiling Node
run: yarn lerna run build:lib --scope @sentry/profiling-node
- name: Extract Profiling Node Prebuilt Binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiling-node-binaries-${{ github.sha }}
pattern: profiling-node-binaries-${{ github.sha }}-*
path: ${{ github.workspace }}/packages/profiling-node/lib/

merge-multiple: true
- name: Restore tarball cache
uses: actions/cache/restore@v4
with:
Expand Down Expand Up @@ -1358,104 +1359,132 @@ jobs:
# x64 glibc
- os: ubuntu-20.04
node: 16
binary: linux-x64-glibc-93
- os: ubuntu-20.04
node: 18
binary: linux-x64-glibc-108
- os: ubuntu-20.04
node: 20
binary: linux-x64-glibc-115
- os: ubuntu-20.04
node: 22
binary: linux-x64-glibc-127

# x64 musl
- os: ubuntu-20.04
container: node:16-alpine3.16
binary: linux-x64-musl-93
node: 16
- os: ubuntu-20.04
container: node:18-alpine3.17
node: 18
binary: linux-x64-musl-108
- os: ubuntu-20.04
container: node:20-alpine3.17
node: 20
binary: linux-x64-musl-115
- os: ubuntu-20.04
container: node:22-alpine3.18
node: 22
binary: linux-x64-musl-127

# arm64 glibc
- os: ubuntu-20.04
arch: arm64
node: 16
binary: linux-arm64-glibc-93
- os: ubuntu-20.04
arch: arm64
node: 18
binary: linux-arm64-glibc-108
- os: ubuntu-20.04
arch: arm64
node: 20
binary: linux-arm64-glibc-115
- os: ubuntu-20.04
arch: arm64
node: 22
binary: linux-arm64-glibc-127

# arm64 musl
- os: ubuntu-20.04
container: node:16-alpine3.16
arch: arm64
node: 16
binary: linux-arm64-musl-93
- os: ubuntu-20.04
arch: arm64
container: node:18-alpine3.17
node: 18
binary: linux-arm64-musl-108
- os: ubuntu-20.04
arch: arm64
container: node:20-alpine3.17
node: 20
binary: linux-arm64-musl-115
- os: ubuntu-20.04
arch: arm64
container: node:22-alpine3.18
node: 22
binary: linux-arm64-musl-127

# macos x64
- os: macos-13
node: 16
arch: x64
binary: darwin-x64-93
- os: macos-13
node: 18
arch: x64
binary: darwin-x64-108
- os: macos-13
node: 20
arch: x64
binary: darwin-x64-115
- os: macos-13
node: 22
arch: x64
binary: darwin-x64-127

# macos arm64
- os: macos-13
arch: arm64
node: 16
target_platform: darwin
binary: darwin-arm64-93
- os: macos-13
arch: arm64
node: 18
target_platform: darwin
binary: darwin-arm64-108
- os: macos-13
arch: arm64
node: 20
target_platform: darwin
binary: darwin-arm64-115
- os: macos-13
arch: arm64
node: 22
target_platform: darwin
binary: darwin-arm64-127

# windows x64
- os: windows-2022
node: 16
arch: x64
binary: win32-x64-93
- os: windows-2022
node: 18
arch: x64
binary: win32-x64-108
- os: windows-2022
node: 20
arch: x64
binary: win32-x64-115
- os: windows-2022
node: 22
arch: x64
binary: win32-x64-127

steps:
- name: Setup (alpine)
Expand Down Expand Up @@ -1587,10 +1616,8 @@ jobs:
yarn lerna run test --scope @sentry/profiling-node

- name: Archive Binary
# @TODO: v4 breaks convenient merging of same name artifacts
# https://github.com/actions/upload-artifact/issues/478
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: profiling-node-binaries-${{ github.sha }}
path: |
${{ github.workspace }}/packages/profiling-node/lib/*.node
name: profiling-node-binaries-${{ github.sha }}-${{ matrix.binary }}
path: ${{ github.workspace }}/packages/profiling-node/lib/sentry_cpu_profiler-${{matrix.binary}}.node
if-no-files-found: error
35 changes: 31 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
# Changelog

> [!IMPORTANT] Important
>
<!-- prettier-ignore-start -->
> [!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.
<!-- prettier-ignore-end -->

## Unreleased

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

## 8.23.0

- feat(cloudflare): Add Cloudflare D1 instrumentation (#13142)
### Important Changes

- **feat(cloudflare): Add Cloudflare D1 instrumentation (#13142)**

This release includes support for Cloudflare D1, Cloudflare's serverless SQL database. To instrument your Cloudflare D1
database, use the `instrumentD1WithSentry` method as follows:

```ts
// env.DB is the D1 DB binding configured in your `wrangler.toml`
const db = instrumentD1WithSentry(env.DB);
// Now you can use the database as usual
await db.prepare('SELECT * FROM table WHERE id = ?').bind(1).run();
```

### Other Changes

- feat(cloudflare): Allow users to pass handler to sentryPagesPlugin (#13192)
- feat(cloudflare): Instrument scheduled handler (#13114)
- feat(core): Add `getTraceData` function (#13134)
- feat(nestjs): Automatic instrumentation of nestjs interceptors before route execution (#13153)
- feat(nestjs): Automatic instrumentation of nestjs pipes (#13137)
- feat(nuxt): Filter out Nuxt build assets (#13148)
- feat(profiling): attach sdk info to chunks (#13145)
- feat(profiling): Attach sdk info to chunks (#13145)
- feat(solidstart): Add sentry `onBeforeResponse` middleware to enable distributed tracing (#13221)
- feat(solidstart): Filter out low quality transactions for build assets (#13222)
- fix(browser): Avoid showing browser extension error message in non-`window` global scopes (#13156)
- fix(feedback): Call dialog.close() in dialog close callbacks in `\_loadAndRenderDialog` (#13203)
- fix(nestjs): Inline Observable type to resolve missing 'rxjs' dependency (#13166)
- fix(nuxt): Detect pageload by adding flag in Vue router (#13171)
- fix(utils): Handle when requests get aborted in fetch instrumentation (#13202)
- ref(browser): Improve browserMetrics collection (#13062)

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

## 8.22.0

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ faster, so we can get back to enjoying technology. If you want to join us

# Official Sentry SDKs for JavaScript

<a href="https://docs.sentry.io/platforms/javascript/" target="_blank">
<img src="https://github.com/user-attachments/assets/aedc2b46-9959-4b9e-8a23-6240062cefc5" alt="Sentry for JavaScript">
</a>

This is the next line of Sentry JavaScript SDKs, comprised in the `@sentry/` namespace. It will provide a more
convenient interface and improved consistency between various JavaScript environments.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
tracesSampleRate: 1,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
let controller;

const startFetch = e => {
controller = new AbortController();
const { signal } = controller;

Sentry.startSpan(
{
name: 'with-abort-controller',
forceTransaction: true,
},
async () => {
await fetch('http://localhost:7654/foo', { signal })
.then(response => response.json())
.then(data => {
console.log('Fetch succeeded:', data);
})
.catch(err => {
if (err.name === 'AbortError') {
console.log('Fetch aborted');
} else {
console.error('Fetch error:', err);
}
});
},
);
};

const abortFetch = e => {
if (controller) {
controller.abort();
}
};

document.querySelector('[data-test-id=start-button]').addEventListener('click', startFetch);
document.querySelector('[data-test-id=abort-button]').addEventListener('click', abortFetch);
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<button data-test-id="start-button">Start fetch</button>
<button data-test-id="abort-button">Abort fetch</button>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { expect } from '@playwright/test';
import type { Event as SentryEvent } from '@sentry/types';
import { sentryTest } from '../../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../../utils/helpers';

sentryTest('should handle aborted fetch calls', async ({ getLocalTestPath, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

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

await page.route('**/foo', async () => {
// never fulfil this route because we abort the request as part of the test
});

const transactionEventPromise = getFirstSentryEnvelopeRequest<SentryEvent>(page);

const hasAbortedFetchPromise = new Promise<void>(resolve => {
page.on('console', msg => {
if (msg.type() === 'log' && msg.text() === 'Fetch aborted') {
resolve();
}
});
});

await page.goto(url);

await page.locator('[data-test-id=start-button]').click();
await page.locator('[data-test-id=abort-button]').click();

const transactionEvent = await transactionEventPromise;

// assert that fetch calls do not return undefined
const fetchBreadcrumbs = transactionEvent.breadcrumbs?.filter(
({ category, data }) => category === 'fetch' && data === undefined,
);
expect(fetchBreadcrumbs).toHaveLength(0);

await expect(hasAbortedFetchPromise).resolves.toBeUndefined();
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ sentryTest('should capture a LCP vital with element details.', async ({ browserN
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');
// XXX: 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);
expect(eventData.contexts?.trace?.data?.['lcp.size']).toBeGreaterThan(0);
});
Loading
Loading