Skip to content

Commit

Permalink
Merge pull request #14639 from getsentry/prepare-release/8.43.0
Browse files Browse the repository at this point in the history
meta(changelog): Update changelog for 8.43.0
  • Loading branch information
lforst authored Dec 10, 2024
2 parents 6331d7c + 5be252c commit 177e5d1
Show file tree
Hide file tree
Showing 377 changed files with 8,956 additions and 1,344 deletions.
18 changes: 18 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,24 @@ targets:
- nodejs20.x
license: MIT

# NOTE: We publish the v8 layer under its own name so people on v8 can still get patches
# whenever we release a new v8 version—otherwise we would overwrite the current major lambda layer.

# AWS Lambda Layer target
- name: aws-lambda-layer
includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha|rc)\.\d+)?\.zip$/
layerName: SentryNodeServerlessSDKv8
compatibleRuntimes:
- name: node
versions:
- nodejs10.x
- nodejs12.x
- nodejs14.x
- nodejs16.x
- nodejs18.x
- nodejs20.x
license: MIT

# CDN Bundle Target
- name: gcs
id: 'browser-cdn-bundles'
Expand Down
7 changes: 7 additions & 0 deletions .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
browsers:
description: 'What browsers to install.'
default: 'chromium webkit firefox'
cwd:
description: 'The working directory to run Playwright in.'
default: '.'

runs:
using: "composite"
Expand All @@ -12,6 +15,8 @@ runs:
id: playwright-version
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
shell: bash
working-directory: ${{ inputs.cwd }}


- name: Restore cached playwright binaries
uses: actions/cache/restore@v4
Expand All @@ -26,11 +31,13 @@ runs:
run: npx playwright install chromium webkit firefox --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
shell: bash
working-directory: ${{ inputs.cwd }}

- name: Install Playwright system dependencies only (cached)
run: npx playwright install-deps ${{ inputs.browsers || 'chromium webkit firefox' }}
if: steps.playwright-cache.outputs.cache-hit == 'true'
shell: bash
working-directory: ${{ inputs.cwd }}

# Only store cache on develop branch
- name: Store cached playwright binaries
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -920,11 +920,6 @@ jobs:
if: steps.restore-tarball-cache.outputs.cache-hit != 'true'
run: yarn build:tarball

- name: Install Playwright
uses: ./.github/actions/install-playwright
with:
browsers: chromium

- name: Get node version
id: versions
run: |
Expand All @@ -945,6 +940,12 @@ jobs:
timeout-minutes: 7
run: pnpm ${{ matrix.build-command || 'test:build' }}

- name: Install Playwright
uses: ./.github/actions/install-playwright
with:
browsers: chromium
cwd: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}

- name: Run E2E test
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 10
Expand Down Expand Up @@ -984,7 +985,7 @@ jobs:

# - We skip optional tests on release branches
job_optional_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
name: E2E ${{ matrix.label || matrix.test-application }} Test (optional)
# 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
Expand Down Expand Up @@ -1039,11 +1040,6 @@ jobs:
if: steps.restore-tarball-cache.outputs.cache-hit != 'true'
run: yarn build:tarball

- name: Install Playwright
uses: ./.github/actions/install-playwright
with:
browsers: chromium

- name: Get node version
id: versions
run: |
Expand All @@ -1064,6 +1060,12 @@ jobs:
timeout-minutes: 7
run: pnpm ${{ matrix.build-command || 'test:build' }}

- name: Install Playwright
uses: ./.github/actions/install-playwright
with:
browsers: chromium
cwd: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}

- name: Run E2E test
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 10
Expand Down Expand Up @@ -1408,6 +1410,10 @@ jobs:
key: ${{ needs.job_build.outputs.dependency_cache_key }}
enableCrossOsArchive: true

- name: Increase yarn network timeout on Windows
if: contains(matrix.os, 'windows')
run: yarn config set network-timeout 600000 -g

- name: Install dependencies
env:
SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1"
Expand All @@ -1418,10 +1424,6 @@ jobs:
run: |
git config --global --add safe.directory "*"
- name: Increase yarn network timeout on Windows
if: contains(matrix.os, 'windows')
run: yarn config set network-timeout 600000 -g

- name: Setup python
uses: actions/setup-python@v5
if: ${{ !contains(matrix.container, 'alpine') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issue-package-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ jobs:
"@sentry.solid": {
"label": "Package: solidstart"
},
"@sentry.svelte": {
"label": "Package: svelte"
},
"@sentry.sveltekit": {
"label": "Package: sveltekit"
},
"@sentry.svelte": {
"label": "Package: svelte"
},
"@sentry.vue": {
"label": "Package: vue"
},
Expand Down
10 changes: 5 additions & 5 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '79 KB',
limit: '80 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand Down Expand Up @@ -166,7 +166,7 @@ module.exports = [
name: 'CDN Bundle (incl. Tracing, Replay)',
path: createCDNPath('bundle.tracing.replay.min.js'),
gzip: true,
limit: '74 KB',
limit: '80 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
Expand Down Expand Up @@ -194,7 +194,7 @@ module.exports = [
path: createCDNPath('bundle.tracing.replay.min.js'),
gzip: false,
brotli: false,
limit: '230 KB',
limit: '240 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',
Expand Down Expand Up @@ -228,7 +228,7 @@ module.exports = [
import: createImport('init'),
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '140 KB',
limit: '170 KB',
},
{
name: '@sentry/node - without tracing',
Expand Down Expand Up @@ -260,7 +260,7 @@ module.exports = [
import: createImport('init'),
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '130 KB',
limit: '135 KB',
},
];

Expand Down
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,115 @@

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

## 8.43.0

### Important Changes

- **feat(nuxt): Add option autoInjectServerSentry (no default import()) ([#14553](https://github.com/getsentry/sentry-javascript/pull/14553))**

Using the dynamic `import()` as the default behavior for initializing the SDK on the server-side did not work for every project.
The default behavior of the SDK has been changed, and you now need to **use the `--import` flag to initialize Sentry on the server-side** to leverage full functionality.

Example with `--import`:

```bash
node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs
```

In case you are not able to use the `--import` flag, you can enable auto-injecting Sentry in the `nuxt.config.ts` (comes with limitations):

```ts
sentry: {
autoInjectServerSentry: 'top-level-import', // or 'experimental_dynamic-import'
},
```

- **feat(browser): Adds LaunchDarkly and OpenFeature integrations ([#14207](https://github.com/getsentry/sentry-javascript/pull/14207))**

Adds browser SDK integrations for tracking feature flag evaluations through the LaunchDarkly JS SDK and OpenFeature Web SDK:

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

Sentry.init({
integrations: [
// Track LaunchDarkly feature flags
Sentry.launchDarklyIntegration(),
// Track OpenFeature feature flags
Sentry.openFeatureIntegration(),
],
});
```

- Read more about the [Feature Flags](https://develop.sentry.dev/sdk/expected-features/#feature-flags) feature in Sentry.
- Read more about the [LaunchDarkly SDK Integration](https://docs.sentry.io/platforms/javascript/configuration/integrations/launchdarkly/).
- Read more about the [OpenFeature SDK Integration](https://docs.sentry.io/platforms/javascript/configuration/integrations/openfeature/).

- **feat(browser): Add `featureFlagsIntegration` for custom tracking of flag evaluations ([#14582](https://github.com/getsentry/sentry-javascript/pull/14582))**

Adds a browser integration to manually track feature flags with an API. Feature flags are attached to subsequent error events:

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

const featureFlagsIntegrationInstance = Sentry.featureFlagsIntegration();

Sentry.init({
// Initialize the SDK with the feature flag integration
integrations: [featureFlagsIntegrationInstance],
});

// Manually track a feature flag
featureFlagsIntegrationInstance.addFeatureFlag('my-feature', true);
```

- **feat(astro): Add Astro 5 support ([#14613](https://github.com/getsentry/sentry-javascript/pull/14613))**

With this release, the Sentry Astro SDK officially supports Astro 5.

### Deprecations

- feat(nextjs): Deprecate typedef for `hideSourceMaps` ([#14594](https://github.com/getsentry/sentry-javascript/pull/14594))

The functionality of `hideSourceMaps` was removed in version 8 but was forgotten to be deprecated and removed.
It will be completely removed in the next major version.

- feat(core): Deprecate APIs around `RequestSession`s ([#14566](https://github.com/getsentry/sentry-javascript/pull/14566))

The APIs around `RequestSession`s are mostly used internally.
Going forward the SDK will not expose concepts around `RequestSession`s.
Instead, functionality around server-side [Release Health](https://docs.sentry.io/product/releases/health/) will be managed in integrations.

### Other Changes

- feat(browser): Add `browserSessionIntegration` ([#14551](https://github.com/getsentry/sentry-javascript/pull/14551))
- feat(core): Add `raw_security` envelope types ([#14562](https://github.com/getsentry/sentry-javascript/pull/14562))
- feat(deps): Bump @opentelemetry/instrumentation from 0.55.0 to 0.56.0 ([#14625](https://github.com/getsentry/sentry-javascript/pull/14625))
- feat(deps): Bump @sentry/cli from 2.38.2 to 2.39.1 ([#14626](https://github.com/getsentry/sentry-javascript/pull/14626))
- feat(deps): Bump @sentry/rollup-plugin from 2.22.6 to 2.22.7 ([#14622](https://github.com/getsentry/sentry-javascript/pull/14622))
- feat(deps): Bump @sentry/webpack-plugin from 2.22.6 to 2.22.7 ([#14623](https://github.com/getsentry/sentry-javascript/pull/14623))
- feat(nestjs): Add fastify support ([#14549](https://github.com/getsentry/sentry-javascript/pull/14549))
- feat(node): Add @vercel/ai instrumentation ([#13892](https://github.com/getsentry/sentry-javascript/pull/13892))
- feat(node): Add `disableAnrDetectionForCallback` function ([#14359](https://github.com/getsentry/sentry-javascript/pull/14359))
- feat(node): Add `trackIncomingRequestsAsSessions` option to http integration ([#14567](https://github.com/getsentry/sentry-javascript/pull/14567))
- feat(nuxt): Add option `autoInjectServerSentry` (no default `import()`) ([#14553](https://github.com/getsentry/sentry-javascript/pull/14553))
- feat(nuxt): Add warning when Netlify or Vercel build is discovered ([#13868](https://github.com/getsentry/sentry-javascript/pull/13868))
- feat(nuxt): Improve serverless event flushing and scope isolation ([#14605](https://github.com/getsentry/sentry-javascript/pull/14605))
- feat(opentelemetry): Stop looking at propagation context for span creation ([#14481](https://github.com/getsentry/sentry-javascript/pull/14481))
- feat(opentelemetry): Update OpenTelemetry dependencies to `^1.29.0` ([#14590](https://github.com/getsentry/sentry-javascript/pull/14590))
- feat(opentelemetry): Update OpenTelemetry dependencies to `1.28.0` ([#14547](https://github.com/getsentry/sentry-javascript/pull/14547))
- feat(replay): Upgrade rrweb packages to 2.30.0 ([#14597](https://github.com/getsentry/sentry-javascript/pull/14597))
- fix(core): Decode `filename` and `module` stack frame properties in Node stack parser ([#14544](https://github.com/getsentry/sentry-javascript/pull/14544))
- fix(core): Filter out unactionable CEFSharp promise rejection error by default ([#14595](https://github.com/getsentry/sentry-javascript/pull/14595))
- fix(nextjs): Don't show warning about devtool option ([#14552](https://github.com/getsentry/sentry-javascript/pull/14552))
- fix(nextjs): Only apply tracing metadata to data fetcher data when data is an object ([#14575](https://github.com/getsentry/sentry-javascript/pull/14575))
- fix(node): Guard against invalid `maxSpanWaitDuration` values ([#14632](https://github.com/getsentry/sentry-javascript/pull/14632))
- fix(react): Match routes with `parseSearch` option in TanStack Router instrumentation ([#14328](https://github.com/getsentry/sentry-javascript/pull/14328))
- fix(sveltekit): Fix git SHA not being picked up for release ([#14540](https://github.com/getsentry/sentry-javascript/pull/14540))
- fix(types): Fix generic exports with default ([#14576](https://github.com/getsentry/sentry-javascript/pull/14576))

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

## 8.42.0

### Important Changes
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 @@ -42,7 +42,7 @@
"dependencies": {
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "^1.44.1",
"@sentry-internal/rrweb": "2.29.0",
"@sentry-internal/rrweb": "2.30.0",
"@sentry/browser": "8.42.0",
"axios": "1.7.7",
"babel-loader": "^8.2.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { expect } from '@playwright/test';

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

import { envelopeRequestParser, shouldSkipFeatureFlagsTest, waitForErrorRequest } from '../../../../../utils/helpers';

const FLAG_BUFFER_SIZE = 100; // Corresponds to constant in featureFlags.ts, in browser utils.

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
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 url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true });
await page.goto(url);

await page.evaluate(bufferSize => {
const flagsIntegration = (window as any).Sentry.getClient().getIntegrationByName('FeatureFlags');
for (let i = 1; i <= bufferSize; i++) {
flagsIntegration.addFeatureFlag(`feat${i}`, false);
}
flagsIntegration.addFeatureFlag(`feat${bufferSize + 1}`, true); // eviction
flagsIntegration.addFeatureFlag('feat3', true); // update
return true;
}, FLAG_BUFFER_SIZE);

const reqPromise = waitForErrorRequest(page);
await page.locator('#error').click(); // trigger error
const req = await reqPromise;
const event = envelopeRequestParser(req);

const expectedFlags = [{ flag: 'feat2', result: false }];
for (let i = 4; i <= FLAG_BUFFER_SIZE; i++) {
expectedFlags.push({ flag: `feat${i}`, result: false });
}
expectedFlags.push({ flag: `feat${FLAG_BUFFER_SIZE + 1}`, result: true });
expectedFlags.push({ flag: 'feat3', result: true });

expect(event.contexts?.flags?.values).toEqual(expectedFlags);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

// Not using this as we want to test the getIntegrationByName() approach
// window.sentryFeatureFlagsIntegration = Sentry.featureFlagsIntegration();

Sentry.init({
dsn: 'https://[email protected]/1337',
sampleRate: 1.0,
integrations: [Sentry.featureFlagsIntegration()],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
document.getElementById('error').addEventListener('click', () => {
throw new Error('Button triggered error');
});
Loading

0 comments on commit 177e5d1

Please sign in to comment.