Skip to content

meta: Release 8.0.0-alpha.5 #11246

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 59 commits into from
Mar 22, 2024
Merged

meta: Release 8.0.0-alpha.5 #11246

merged 59 commits into from
Mar 22, 2024

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Mar 22, 2024

No description provided.

Luca Forstner and others added 30 commits March 15, 2024 08:33
Size seems to be much increased, let's figure this out in follow ups.

Also there is some issue with it reading next.js sizes, also something
we can look at in follow ups... I disabled these size checks for now.

The action is now inlined as a package in the monorepo, as our fork has
been archived and the upstream package is not really maintained and
works pretty different from what we need. Now we at least have full
control over this.
[Gitflow] Merge master into develop
Noticed this is failing e.g.
https://github.com/getsentry/sentry-javascript/actions/runs/8294578489/job/22700116991,
it was an incorrect check: if there is no comparison branch, we don't
need a PR.
Apparently, webpack looks at `sideEffects` in the generated
package.json, and based on this does not tree shake correctly 😬

I also bumped webpack (one of the things I tried while debugging
this...).

This now puts the original `sideEffects` value from the original
`package.json` and puts it into the esm package.json.
This PR switches the underlying Node SDK from
`@sentry/node-experimental` (aka the "legacy" v7 Node SDK) to the new
OpenTelemetry-based `@sentry/node` package.
- Removes `makeMain` impl and exports from node (and downstream SDKs)
- Removes custom `getCurrentHub/getClient` impl in favour of core
- Removes `callExtensionMethod` as its not called from anywhere
- Fixes all the tests that relied on `getClient` never returning
undefined
- Removes `_callExtensionMethod` from core as it's not used
…11128)

I think we missed this from removing the other class-based exports.
Removes `getIntegrationById` and `getIntegration` methods on client.
Doesn't touch anything on the hub because we want to shim those methods.
closes #11136
closes #11062
closes #11137
closes #11138
closes #11139

In #11134 we changed
the playwright tests use a larger GH runner. This should hopefully fix
the flaky replay playwright tests. Validating that here.

Note that `Detect flaky tests / Check tests for flakiness` runs on the
smaller workers, so it'll experience the same issues we had before.
…11135)

- Moves Sentry deps to `dependencies` rather than `devDependencies`
- Updated `package.json` exports
- Updated the rollup config to mirror our other modules with the
addition of the commonJs plugin
- I couldn't use `createRequire` myself because Jest can't handle
`import.meta` so instead I used `@rollup/plugin-esm-shim` which shims
both `require` and `__dirname` in `cpu_profiler.ts` in the ESM output!
`@sentry/types` does not align with `@sentry/core`, and it causes build
errors when `exactOptionalPropertyTypes` is `true`.

This patch fixes the TypeScript error by explicitly adding `undefined` to the `sampled` flag of `Transaction`.
Ref: #11107

Removes `--detectOpenHandles` from Jest configurations of Remix and
Next.JS which apparently causes segfault.

Re-enables Remix Node 16 and Node 18 integration tests on CI
…11126)

The `rethrowAfterCapture` option was deprecated in
#4448, which was
released in `6.17.2`. This finally removes the option.
In #8927 we
deprecated and removed the `wrap` method.

This PR removes the deprecated export from v8.
Removes exports for `ModuleMetadata` and `RequestData`
Closes #11159

This PR also modifies `getEnvelopeEndpointWithUrlEncodedAuth` which had
a suggested simplification for v8.

I ignored the suggestion because `{ tunnel, _metadata }` feels like a
very "internal" API. Sure, this is convenient because it lets you pass
the client options directly but it doesn't sit right as a user facing
API.
ref #9832

Deletes deprecated imports from utils package in preparation to move it
to core/related.

Also important because deleting `addOrUpdateIntegration` and it's
associated tests means that we remove more usages of class based
integrations.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Closes #11118

This PR exports what used to be called `initOtel` so that the
`NodeClient` can be used without calling `init`.

If OpenTelemetry is only required for performance feature, we should
also only enable it if the sample rate is above zero to save memory.
Lms24 and others added 23 commits March 19, 2024 11:19
…gular support at v14 (#11091)

Start using vitest for better ESM support (since Angular 13)
closes #9830

---------

Co-authored-by: Lukas Stracke <[email protected]>
Move v4, v5, and v6 changelog entries into their own file. This should
help speed up rendering of main changelog.

Also add relevant v7 changelog items to changelog.
In order to proceed with removing `Sentry.Integrations.X` as per
#8844, there's
still some places to clean up.

This does conflict with
#11016, but not sure
when that merges in, so opening this in the meantime to unblock the
integrations cleanup work. if we think the OTEL nextjs work will merge
in sooner then the next 1-2 days, I'm happy to leave this alone for now!
We received reports about this error

```
TypeError: Cannot redefine property: googletag
```

being thrown and reported to Sentry. It's a noisy error where we
strongly suspect that browser extensions interfere with our users' apps.
In an effort to quickly reduce noise, this patch adds the error message to
our SDK `inboundFilters` integration.
…ors (#11204)

This PR adds integration tests (browser and node) to demonstrate the
current behavior around loosing scope data when a thrown error is caught
by global handlers "outside" the lifetime of the throw origin's scope.
This occurs specifically within the `withScope` API where the scope is
popped if an error is caught but then the error is rethrown to be caught
by handlers down the line.
The `cron` package uses `timeZone`, while Sentry internally uses
`timezone`. This caused Sentry cron jobs to be incorrectly upserted with
no time zone information. Because of the use of the `...(timeZone ? {
timeZone } : undefined)` idiom, TypeScript type checking did not catch
the mistake.

I kept `cron`'s `timeZone` capitalization within Sentry's
instrumentation and changed from the `...(timeZone ? { timeZone } :
undefined)` idiom so TypeScript could catch mistakes of this sort.
(Passing an undefined `timezone` appears to be okay, because Sentry's
`node-cron` instrumentation does it.)
Now we only have one included transport, this simplifies the vast
majority of use cases:

Before:
```ts
import { init, makeBrowserOfflineTransport, makeFetchTransport } from "@sentry/browser";

init({
  dsn: "__DSN__",
  transport: makeBrowserOfflineTransport(makeFetchTransport)
})
```

After:
```ts
import { init, makeBrowserOfflineTransport } from "@sentry/browser";

init({
  dsn: "__DSN__",
  transport: makeBrowserOfflineTransport()
})
```
With the Electron SDK, we have an issue
(getsentry/sentry-electron#830) where ANR
causes the app to freeze when the machine goes through a suspend/resume
cycle.

This PR exposes `stopWorker` and `startWorker` methods which can be used
in the downstream [ANR integration
wrapper](https://github.com/getsentry/sentry-electron/blob/master/src/main/integrations/anr.ts)
to stop the ANR feature before device suspend and start it again on
device resume.
Recommend reading through https://web.dev/articles/ttfb before review.

In
https://www.notion.so/sentry/TTFB-vital-is-0-for-navigation-events-2337114dd75542569eb70255a467aba6
we identified that ttfb was being incorrectly calculated in certain
scenarios. This was because we were calculating `ttfb` relative to
transaction start time, **before** it has been adjusted by `browser`
related spans about request/response ( remember browser tracing adjusts
the start timestamp of a pageload transaction after adding certain
request/response related spans).

This meant that `Math.max(responseStartTimestamp - transactionStartTime,
0)` would just end up being `0` most of the time because using
`transactionStartTime` was not correct.

To fix this, we avoid trying to rely on our `transactionStartTime`
timestamp at all, but instead using the web vitals version helper for
this.

When this gets merged in, I'll backport it to v7. I'm doing this in v8
first because I don't want to deal with the merge conflict that comes
when we eventually migrate this code from tracing internal into the
browser package.

As a next step, we should seriously think about getting rid of all of
our vendored code and just rely on the web vitals library - it's a huge
pain to maintain this, and I'm sure there are some insidious bugs
sneaking about.
This was missed from the original PR #11214 but is already included in
the backport #11228
Fixes issue where screenshotting in Safari results in black bars on the
right and bottom of the image.

Before:
<img width="1278" alt="image"
src="https://github.com/getsentry/sentry-javascript/assets/55311782/b2c174ad-8403-459a-b24b-7e055da3d657">

After:
<img width="1278" alt="image"
src="https://github.com/getsentry/sentry-javascript/assets/55311782/85fb850d-6c01-48cd-9fe0-21a860114b9d">

Relates to getsentry/sentry#63749
@lforst lforst enabled auto-merge March 22, 2024 09:40
@lforst lforst disabled auto-merge March 22, 2024 09:42
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) 80.9 KB (added)
@sentry/browser (incl. Tracing, Replay) 72.24 KB (added)
@sentry/browser (incl. Tracing, Replay with Canvas) 76.04 KB (added)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 65.81 KB (added)
@sentry/browser (incl. Tracing) 36.83 KB (added)
@sentry/browser (incl. browserTracingIntegration) 36.83 KB (added)
@sentry/browser (incl. feedbackIntegration) 31.35 KB (added)
@sentry/browser (incl. feedbackModalIntegration) 31.47 KB (added)
@sentry/browser (incl. feedbackScreenshotIntegration) 31.48 KB (added)
@sentry/browser (incl. sendFeedback) 27.43 KB (added)
@sentry/browser 22.6 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) 75.21 KB (added)
CDN Bundle (incl. Tracing, Replay) 70.05 KB (added)
CDN Bundle (incl. Tracing) 36.41 KB (added)
CDN Bundle 23.97 KB (added)
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.04 KB (added)
CDN Bundle (incl. Tracing) - uncompressed 109.98 KB (added)
CDN Bundle - uncompressed 71 KB (added)
@sentry/react (incl. Tracing, Replay) 72.22 KB (added)
@sentry/react 22.63 KB (added)

@lforst lforst merged commit f36b96b into master Mar 22, 2024
@lforst lforst deleted the prepare-release/8.0.0-alpha.5 branch March 22, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.