Skip to content

Commit

Permalink
Merge pull request #13734 from getsentry/prepare-release/8.31.0
Browse files Browse the repository at this point in the history
meta(changelog): Update changelog for 8.31.0
  • Loading branch information
s1gr1d authored Sep 20, 2024
2 parents 13bd35b + 1914376 commit b1a26c8
Show file tree
Hide file tree
Showing 89 changed files with 1,331 additions and 307 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO(lforst): Unpin Node.js version 22 when https://github.com/protobufjs/protobuf.js/issues/2025 is resolved which broke the nodejs tests
node: [14, 16, 18, 20, '22.6.0']
node: [14, 16, 18, 20, 22]
steps:
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
uses: actions/checkout@v4
Expand Down Expand Up @@ -610,6 +609,13 @@ jobs:
overwrite: true
retention-days: 7

- name: Upload test results to Codecov
if: cancelled() == false
uses: codecov/test-results-action@v1
with:
directory: dev-packages/browser-integration-tests
token: ${{ secrets.CODECOV_TOKEN }}

job_browser_loader_tests:
name: PW ${{ matrix.bundle }} Tests
needs: [job_get_metadata, job_build]
Expand Down Expand Up @@ -653,6 +659,7 @@ jobs:
run: |
cd dev-packages/browser-integration-tests
yarn test:loader
- name: Upload Playwright Traces
uses: actions/upload-artifact@v4
if: failure()
Expand All @@ -662,6 +669,13 @@ jobs:
overwrite: true
retention-days: 7

- name: Upload test results to Codecov
if: cancelled() == false
uses: codecov/test-results-action@v1
with:
directory: dev-packages/browser-integration-tests
token: ${{ secrets.CODECOV_TOKEN }}

job_check_for_faulty_dts:
name: Check for faulty .d.ts files
needs: [job_get_metadata, job_build]
Expand Down Expand Up @@ -1013,6 +1027,13 @@ jobs:
overwrite: true
retention-days: 7

- name: Upload test results to Codecov
if: cancelled() == false
uses: codecov/test-results-action@v1
with:
directory: dev-packages/e2e-tests
token: ${{ secrets.CODECOV_TOKEN }}

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
Expand Down
43 changes: 42 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,52 @@

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

## 8.31.0

### Important Changes

- **feat(node): Add `dataloader` integration (#13664)**

This release adds a new integration for the [`dataloader` package](https://www.npmjs.com/package/dataloader). The Node
SDK (and all SDKs that depend on it) will now automatically instrument `dataloader` instances. You can also add it
manually:

```js
Sentry.init({
integrations: [Sentry.dataloaderIntegration()],
});
```

### Other Changes

- feat(browser): Add navigation `activationStart` timestamp to pageload span (#13658)
- feat(gatsby): Add optional `deleteSourcemapsAfterUpload` (#13610)
- feat(nextjs): Give app router prefetch requests a `http.server.prefetch` op (#13600)
- feat(nextjs): Improve Next.js serverside span data quality (#13652)
- feat(node): Add `disableInstrumentationWarnings` option (#13693)
- feat(nuxt): Adding `experimental_basicServerTracing` option to Nuxt module (#13643)
- feat(nuxt): Improve logs about adding Node option 'import' (#13726)
- feat(replay): Add `onError` callback + other small improvements to debugging (#13721)
- feat(replay): Add experimental option to allow for a checkout every 6 minutes (#13069)
- feat(wasm): Unconditionally parse instruction addresses (#13655)
- fix: Ensure all logs are wrapped with `consoleSandbox` (#13690)
- fix(browser): Try multiple options for `lazyLoadIntegration` script parent element lookup (#13717)
- fix(feedback): Actor color applies to feedback icon (#13702)
- fix(feedback): Fix form width on mobile devices (#13068)
- fix(nestjs): Preserve original function name on `SentryTraced` functions (#13684)
- fix(node): Don't overwrite local variables for re-thrown errors (#13644)
- fix(normalize): Treat Infinity as NaN both are non-serializable numbers (#13406)
- fix(nuxt): Use correct server output file path (#13725)
- fix(opentelemetry): Always use active span in `Propagator.inject` (#13381)
- fix(replay): Fixes potential out-of-order segments (#13609)

Work in this release was contributed by @KyGuy2002, @artzhookov, and @julianCast. Thank you for your contributions!

## 8.30.0

### Important Changes

- _feat(node): Add `kafkajs` integration (#13528)_
- **feat(node): Add `kafkajs` integration (#13528)**

This release adds a new integration that instruments `kafkajs` library with spans and traces. This integration is
automatically enabled by default, but can be included with the `Sentry.kafkaIntegration()` import.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ package. Please refer to the README and instructions of those SDKs for more deta
for native crashes
- [`@sentry/bun`](https://github.com/getsentry/sentry-javascript/tree/master/packages/bun): SDK for Bun
- [`@sentry/deno`](https://github.com/getsentry/sentry-javascript/tree/master/packages/deno): SDK for Deno
- [`@sentry/cloudflare`](https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare): SDK for
Cloudflare

## Version Support Policy

Expand Down
2 changes: 1 addition & 1 deletion dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"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'",
"test:ci": "yarn test:all",
"test:update-snapshots": "yarn test:all --update-snapshots",
"test:detect-flaky": "ts-node scripts/detectFlakyTests.ts"
},
Expand Down
2 changes: 2 additions & 0 deletions dev-packages/browser-integration-tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const config: PlaywrightTestConfig = {
},
],

reporter: process.env.CI ? [['line'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list',

globalSetup: require.resolve('./playwright.setup.ts'),
globalTeardown: require.resolve('./playwright.teardown.ts'),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ sentryTest('should set extras from multiple consecutive calls', async ({ getLoca
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);

expect(eventData.message).toBe('consecutive_calls');
expect(eventData.extra).toMatchObject({ extra: [], Infinity: 2, null: null, obj: { foo: ['bar', 'baz', 1] } });
expect(eventData.extra).toMatchObject({
extra: [],
Infinity: 2,
null: '[Infinity]',
obj: { foo: ['bar', 'baz', 1] },
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,30 @@ sentryTest('paint web vitals values are greater than TTFB', async ({ browserName
expect(fpValue).toBeGreaterThanOrEqual(ttfbValue!);
});

sentryTest('captures time origin as span attribute', async ({ getLocalTestPath, page }) => {
// Only run in chromium to ensure all vitals are present
if (shouldSkipTracingTest()) {
sentryTest.skip();
}
sentryTest(
'captures time origin and navigation activationStart as span attributes',
async ({ getLocalTestPath, page }) => {
// Only run in chromium to ensure all vitals are present
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });
const [eventData] = await Promise.all([getFirstSentryEnvelopeRequest<Event>(page), page.goto(url)]);
const url = await getLocalTestPath({ testDir: __dirname });
const [eventData] = await Promise.all([getFirstSentryEnvelopeRequest<Event>(page), page.goto(url)]);

const timeOriginAttribute = eventData.contexts?.trace?.data?.['performance.timeOrigin'];
const transactionStartTimestamp = eventData.start_timestamp;
const timeOriginAttribute = eventData.contexts?.trace?.data?.['performance.timeOrigin'];
const activationStart = eventData.contexts?.trace?.data?.['performance.activationStart'];

expect(timeOriginAttribute).toBeDefined();
expect(transactionStartTimestamp).toBeDefined();
const transactionStartTimestamp = eventData.start_timestamp;

const delta = Math.abs(transactionStartTimestamp! - timeOriginAttribute);
expect(timeOriginAttribute).toBeDefined();
expect(transactionStartTimestamp).toBeDefined();

// The delta should be less than 1ms if this flakes, we should increase the threshold
expect(delta).toBeLessThanOrEqual(1);
});
const delta = Math.abs(transactionStartTimestamp! - timeOriginAttribute);

// The delta should be less than 1ms if this flakes, we should increase the threshold
expect(delta).toBeLessThanOrEqual(1);

expect(activationStart).toBeGreaterThanOrEqual(0);
},
);
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test:prepare": "ts-node prepare.ts",
"test:validate": "run-s test:validate-configuration test:validate-test-app-setups",
"clean": "rimraf tmp node_modules pnpm-lock.yaml && yarn clean:test-applications",
"clean:test-applications": "rimraf test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml} .last-run.json && pnpm store prune"
"clean:test-applications": "rimraf --glob test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml} .last-run.json && pnpm store prune"
},
"devDependencies": {
"@types/glob": "8.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: PlaywrightTestConfig = {
forbidOnly: !!process.env.CI,
retries: 0,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'list',
reporter: process.env.CI ? [['line'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: PlaywrightTestConfig = {
forbidOnly: !!process.env.CI,
retries: 0,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'list',
reporter: process.env.CI ? [['line'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,9 @@ export class AppController {
testServiceWithCanActivate() {
return this.appService.canActivate();
}

@Get('test-function-name')
testFunctionName() {
return this.appService.getFunctionName();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ export class AppService {
return { result: 'test' };
}

@SentryTraced('return the function name')
getFunctionName(): { result: string } {
return { result: this.getFunctionName.name };
}

async testSpanDecoratorSync() {
const returned = this.getString();
// Will fail if getString() is async, because returned will be a Promise<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,10 @@ test('Transaction includes span and correct value for decorated sync function',
]),
);
});

test('preserves original function name on decorated functions', async ({ baseURL }) => {
const response = await fetch(`${baseURL}/test-function-name`);
const body = await response.json();

expect(body.result).toEqual('getFunctionName');
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('Should emit a span for a generateMetadata() function invokation', async ({
expect(transaction.spans).toContainEqual(
expect.objectContaining({
description: 'generateMetadata /generation-functions/page',
origin: 'manual',
origin: 'auto',
parent_span_id: expect.any(String),
span_id: expect.any(String),
status: 'ok',
Expand Down Expand Up @@ -74,7 +74,7 @@ test('Should send a transaction event for a generateViewport() function invokati
expect((await transactionPromise).spans).toContainEqual(
expect.objectContaining({
description: 'generateViewport /generation-functions/page',
origin: 'manual',
origin: 'auto',
parent_span_id: expect.any(String),
span_id: expect.any(String),
status: 'ok',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@sentry/node": "latest || *",
"@sentry/opentelemetry": "latest || *",
"express": "4.19.2"
"express": "4.20.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@sentry/node": "latest || *",
"@sentry/opentelemetry": "latest || *",
"express": "4.19.2"
"express": "4.20.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@sentry/node": "latest || *",
"@sentry/opentelemetry": "latest || *",
"express": "4.19.2"
"express": "4.20.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@sentry/node": "latest || *",
"@sentry/opentelemetry": "latest || *",
"express": "4.19.2"
"express": "4.20.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@trpc/client": "10.45.2",
"@types/express": "4.17.17",
"@types/node": "18.15.1",
"express": "4.19.2",
"express": "4.20.0",
"typescript": "4.9.5",
"zod": "~3.22.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const config = {
/* Retry on CI only */
retries: 0,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'list',
reporter: process.env.CI ? [['line'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@trpc/client": "10.45.2",
"@types/express": "4.17.17",
"@types/node": "18.15.1",
"express": "4.19.2",
"express": "4.20.0",
"typescript": "4.9.5",
"zod": "~3.22.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Sentry.init({
dsn: useRuntimeConfig().public.sentry.dsn,
tunnel: `http://localhost:3031/`, // proxy server
tracesSampleRate: 1.0,
trackComponents: true,
});

This file was deleted.

Loading

0 comments on commit b1a26c8

Please sign in to comment.