Skip to content
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

meta(changelog): Update Changelog for 7.57.0 #8417

Merged
merged 29 commits into from
Jun 28, 2023
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Jun 28, 2023

Updates the changelog for 7.57.0

github-actions bot and others added 28 commits June 19, 2023 14:39
[Gitflow] Merge master into develop
In our (still internal) `trace` function, we don't yet check if
`hasTracingEnabled` returns `true` before trying to start a span or a
transaction. This leads to the following problematic UX path that was
discovered
[here](#5838 (reply in thread)):

1. Users don't set `tracesSampleRate` (or `tracesSampler`), causing some
SDKs (NextJS, SvelteKit) to **not** add the `BrowserTracing`
integration, which in turn means that tracing extension methods are not
added/registered.
2. Users or, more likely, other parts of our SDK (e.g. SvelteKit's
wrappers/handlers) call `trace` which will still try to start a
span/txn.
3. Users will get a console warning that tracing extension methods were
not installed and they should manually call `addExtensionMethods` which
is completely misleading in this case.

This fix makes `trace` check for `hasTracingEnabled()` in which case it
will not start a span but just invoke the error callback if an error
occurred.
#8369)

Previously, in our Angular routing instrumentation, we only stopped
routing spans when a navigation ended successfully. This was because we
only listened to
[`NavigationEnd`](https://angular.io/api/router/NavigationEnd) router
events. However, the Angular router emits other events in unsuccessful
routing attempts:
* a routing error (e.g. unknown route) emits
[`NavigationError`](https://angular.io/api/router/NavigationCancel)
* a cancelled navigation (e.g. due to a route guard that
rejected/returned false) emits
[`NavigationCancel`](https://angular.io/api/router/NavigationCancel)

This fix adjusts our instrumentation to also listen to these events and
to stop the span accordingly.
The `TryCatch` default integration interferes with the
`SentryErrorHander` error handler of the Angular(-Ivy) SDKs by catching
certain errors too early, before the Angular SDK-specific error handler
can catch them. This caused missing data on the event in some or
duplicated errors in other cases.

This fix filters out the `TryCatch` by default, as long as users didn't
set `defaultIntegrations` in their SDK init. Therefore, it makes the
previously provided
[workaround](#5417 (comment))
obsolete.
Since @sentry/sveltekit depends on @sentry/vite-plugin, which in turn
depens on `@sentry/node@^7.19.0` & `@sentry/tracing@^7.19.0`, this fails
to install in E2E tests for pre-release versions (e.g. `7.57.0-beta.0`),
as the prerelease does not satisfy the range `^7.19.0`. So we override
this to `*` to ensure this works as expected.
This field was added as part of v7.56.0, but `SlowClickFrameData` was
created before that. Having `clickCount` be required breaks backwards
compatibility, it should be optional.
…s valid (#8381)

In the client-side SvelteKit fetch instrumentation, our previous type
cast when retrieving the SDK client was wrong, causing us to not guard
the fetch instrumentation correctly if the client was undefined. This fix
adds an undefined check.

fixes #8290
…tions` from SDK (#8382)

When refactoring our `@sentry/tracing` package and exporting tracing
related integrations from SDK packages, we apparently forgot to export
`autoDiscoverNodePerformanceMonitoringIntegrations` from the Serverless
SDK. This fix re-adds the export.
It seems in some environments `sessionStorage` my be unset to `null` or
similar. To be extra careful, we can guard for existence as well there.

Fixes #8392
This PR adjusts the exception name generation for non-error objects in
the browser SDK.

ref #7941
Add https://eslint.org/docs/latest/rules/no-return-await to eslint
config to remove usage of uneeded async/await calls. This helps reduce
microtasks being generated, which can help reduce memory pressure caused
by the SDK.

The downside of removing `return await` is that stacktraces get slightly
worse for async errors that use these methods, as we no longer pause
execution on return for the engine to grab context on, but instead just
pass through the promise, but I think it's worth it for this to be the
default, and for us to opt-in to the better stacktraces if need be.
When running `yarn build:watch` I found some circular deps:

```
src/eventBuffer/index.ts -> src/eventBuffer/EventBufferArray.ts -> src/eventBuffer/index.ts
src/eventBuffer/index.ts -> src/eventBuffer/EventBufferProxy.ts -> src/eventBuffer/EventBufferCompressionWorker.ts -> src/eventBuffer/index.ts
```

This refactors the `EventBufferSizeExceededError` export to remove that.
…mentation (#8391)

As outlined in
#8174 (comment),
our current SvelteKit fetch instrumentation breaks SvelteKit's request
caching mechanism. This is problematic as `fetch` requests from
universal `load` functions were made again on the client side during
hydration although the response was already cached from the initial
server-side request.

The reason for the cache miss is that in the instrumentation we add our
tracing headers to the requests, which lead to a different cache key
than the one produced on the server side.

This fix vendors in code from [the SvelteKit
repo](https://github.com/sveltejs/kit) so that we can perform the same
cache lookup in our instrumentation. If the lookup was successful (-->
cache hit), we won't attach any headers or create breadcrumbs to 1. let
Kit's fetch return the cached response and 2. not add spans for a fetch
request that didn't even happen.
This change ensures that browser profiles are sent in the same envelope
as transactions and enables sourcemap support.
Added an integration test application using [Remix
1.17.0](https://github.com/remix-run/remix/releases/tag/remix%401.17.0)
and [v2 future
flags](https://remix.run/docs/en/main/pages/api-development-strategy) to
see the state of current SDK support for v2.
ref #8352

As we work toward adding tracing without performance support, this PR
updates the `BrowserTracing` integration to use and favour the top level
`tracePropagationTargets` option if it exists.

This option was made top level in
#8395

`tracePropagationTargets` is now part of the unified API for distributed
tracing. It's also expected that electron/react native will behave the
same way as well. This also leaves us the flexibility to extract tracing
out of BrowserTracing, or create a new integration that just does
tracing but no performance monitoring.

We can make sure this migration is smooth and easy to understand with a
good set of docs, which is what I will be working on next. In these docs
changes, we'll be updating the automatic instrumentation sections, and
formally documented `tracePropagationTargets` as a high level option.
Collect span information on how long the async calls to profiler.stop
take which will help us evaluate if calling txn.finish after
profiler.stop is a viable approach
This adds an experiment that will allow http timings to be captured. We
currently capture timings on Sentry SaaS with some custom code and
append them to the spans, which has been helpful to identify some
performance problems that were previously hidden (http/1.1 stall time).
Following this work we can add these to the waterfall to represent
measurements as subtimings and will power an upcoming http/1.1 stall
performance issue.
This updates the TS version we use from 3.8.3 to 4.9.5. This allows us
to use newer TS features, as well as as improves compatibility with
newer @types/xxx packages that use newer features, which leads to issues
when transitive dependencies are used etc.

We use [downlevel-dts](https://www.npmjs.com/package/downlevel-dts) to
generate a 3.8 compatible types output _in addition_, so this should be
fully backwards compatible. TS provides a built-in way to tell it to use
a certain types output for a certain version, so this should work with
no breaking change.

The main changes necessary here are small tweaks to types which are
required in 4.9.x.
@mydea mydea requested review from lforst and Lms24 June 28, 2023 13:53
@mydea mydea requested a review from AbhiPrasad June 28, 2023 13:53
@mydea mydea self-assigned this Jun 28, 2023
CHANGELOG.md Outdated
Comment on lines 15 to 16
This means that this change should be fully backwards compatible and not have any noticable user impact,
but it opens the door to us using newer TypeScript features in the codebase going forward.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's leave out the part where we say this opens doors and instead say something like "if you still encounter issues please let us know".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated it!

@github-actions
Copy link
Contributor

github-actions bot commented Jun 28, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.49 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 67.59 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.82 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 58.9 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.43 KB (0%)
@sentry/browser - Webpack (minified) 69.87 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.46 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.81 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 29.39 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 27.48 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 49.34 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 43.11 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 68.83 KB (0%)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 61.38 KB (0%)

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big 🚢 !

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@mydea mydea merged commit f874586 into master Jun 28, 2023
64 checks passed
@mydea mydea deleted the prepare-release/7.57.0 branch June 28, 2023 14:50
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.

None yet

10 participants