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 8.0.0-alpha.8 #11472

Merged
merged 76 commits into from
Apr 8, 2024

Conversation

lforst
Copy link
Member

@lforst lforst commented Apr 8, 2024

No description provided.

mydea and others added 30 commits March 27, 2024 14:25
This removes `data` from the span (there is only `attributes` left).
Also, for clarity, I renamed `SpanContext` to `SentrySpanArguments`, and
`TransactionContext` to `TransactionArguments`, as "Context" is heavily
overloaded and IMHO this is confusing today.
ref #11084

Removes usage of `mocha` from eslint plugin
Tests that an app built with webpack 4 and minified with terser can be
built and sends events at runtime
If users pass e.g. `sampleRate: process.env.SAMPLE_RATE`, this will be
somewhat silently ignored because we ignore non-number sample rates.
This is a bit of a footgun.

So this PR changes this so that we actually accept such sample rates. In
the process, I also removed the `isNaN` polyfill as this is not really
needed anymore.

I also updated OTEL to use the same sampling function as core (to avoid
this drifting apart), and am using this for `sampleRate`,
`tracesSampleRate` and the replay sample rates now.

See e.g. #11262
ref #9508

The `BrowserApiErrors` integration interfers with Angular error handler,
so don't include it in the default integrations.
Now, the "new" node is in `packages/node`, while
`@sentry/node-experimental` (the "old" node) is in
`packages/node-experimental`

In a next step we can look into actually removing `node-experimental`
(it is only used/referenced in tests anymore).

We should also add this commit to `.git-blame-ignore-revs` in a follow
up.
Reverts #11309

Reverting this so we can merge master into develop 😬 will add this
afterwards again...
[Gitflow] Merge master into develop
…11321)

This re-adds the change to move the node & node-experimental folders.
Adding these three PRs to avoid cluttering stuff too much.
* fix(canvas): createImageBitmap throws when canvas size is 0
* fix: fixes several cases where we access an undefined value
* fix: Incorrect parsing of functional pseudo class css selector
This is not used anymore except in tests, so this PR actually removes
the old node package!

A few tests are failing now, we should address them before v8 goes
stable. For now I marked these to be skipped and added a comment there.
Ports these tests to the new test runner - everything still seems to be
working as expected 🎉
…nce (#11331)

Also ensure the `feedbackIntegration` returns a properly typed response.

This should make it easier to manually interact with feedbacks.
This PR adds some utilities to aid in testing Node HTTP instrumentation
and then updates the tests to use the new runner
This PR converts the remaining tests to using the newer child process
runner.

Because the test scenarios are now completely isolated, Jest can be used
to run them rather than the custom script.
This was noticed here:
#11337 (comment),
when viewed on e.g. npmjs.org the relative links to do not work, so we
should have full URLs only in the readme files.

It would be _nicer_ if we could replace this with a proper full URL at
release time to point to the correct version of the file, but that's
more work and probably not worth it...
Tests are failing because mime 4 is Node 16+ only, so pinning this to
mime 3...
The node integration tests (correctly!) showed that we were not
propagating baggage 100% correct anymore. Turns out there were a few
issues with what we did before:

## Do not freeze DSC onto span `traceState` when not continuing incoming
trace

The main issue was, that we did not actually set the `transaction`,
`sampled` and `sample_rate` baggage entries. This was the case because
we only picked these from the trace state, but we only set this fully in
our own `startSpan()` APIs, not when auto instrumentation created spans.
So I changed this to _not_ set the trace state in `startSpan()` APIs,
but instead leave it empty _unless_ we are actually continuing an
incoming trace. Whenever we are _not_ continuing an incoming trace,
we'll now generate the DSC at injection-time based of the actual span
data.

So to summarize, we now set the `dsc` trace state in two places:

1. In the propagator, when we `extract` an incoming trace.
2. In our trace functions, when we use `forceTransaction` which we treat
as continuing an incoming trace.

## No merging of existing baggage headers

Another issue that came up is that we did not properly handled other
`baggage` entires being set. This is because of how OTEL does injection,
where it passes the `carrier` as object which we treated as `unknown`
and basically ignored. This meant that if a user did e.g. `fetch({
headers: { baggage: 'my=value' }})`, we would overwrite the baggage and
not keep the exiting value(s). This PR fixes this as well by ensuring we
keep this around.

## Future improvements

After talking with @lforst, we may be able to improve/streamline this
further by getting rid of the DSC trace state.
The logic could be:

1. If there is a DSC on the scope's propagation context, use that.
2. Else, use the root span

We may update to this logic internally in a follow up step!
This is not used anymore and can/should be handled differently.

You can read this data from the `SentryXhrData` instead, if necessary
(which will hold the up-to-date information for this XHR request).
Removing the last deprecated things from the scope!
This depends on
#11363 being merged
first...
- Removes all class based integrations from `tracing-internal` and
re-organizes exports
- Removes top level `Integrations` export from browser package

resolves #8844
See #11368, where
this is deprecated on v7.
Now we've dropped Nove v12 we can simplify to `globalThis`:

#5611 (comment)
Lms24 and others added 20 commits April 4, 2024 11:36
…ame is updated (#11406)

Our SvelteKit routing instrumentation updates the pageload rootspan name
once we obtain the parameterized route id. This patch now also updates the
scope's `transactionName` at this point.
)

This PR updates the current scope's `transactionName` when our Remix
router instrumentation resolves the parameterized route name.
Missed that #11418 didn't update the yarn lock
Super small PR to check that an error event has a valid `transaction`
field in NextJS.
Besides testing, there was nothing specifically to do for NextJS since
as far as I can tell we never update a pageload or navigation span name.

ref #10846
- Adds `setupNestErrorHandler` to capture globally caught exceptions in
NestJS applications.
- Adds NestJS end to end tests.
#11412)

I want to remove the karma/mocha based tests in the browser package. To
accomplish this, I'll be porting 1 test suite a day from the old
integration tests to playwright. Today is Day 1:
`packages/browser/test/integration/suites/api.js`

We have decent coverage around singular calls to these methods, so I
just added the tests that validate calling `captureException` and
`captureMessage` multiple times.

I also fixed a spelling mistake with
`dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrors/subject.js`,
`linkedErrrors` -> `linkedErrors`

ref #11084
So we can avoid duplicating this logic everywhere.
This removes the `Transaction` class and any user facing remainders of
this.

Now, we just always create a `SentrySpan` class, and this class handles
sending the transaction event when it is a root span.
I forgot to apply the font family style to the actor button too

follow up to #11414
ref: #10202
Add `unref` to make sure that the session flusher or metrics aggregator
does not block nodejs exit. Especially important for serverless
scenarios.
I want to remove the karma/mocha based tests in the browser package. To
accomplish this, I'll be porting 1 test suite a day from the old
integration tests to playwright. Today is Day 2:
`packages/browser/test/integration/suites/breadcrumbs.js`

This adds console and history breadcrumb tests (which didn't exist
before), and expands upon the dom and xhr/fetch tests, and cleans up
some code here and there as well.

ref #11084
day 1: #11412
Similarly to NestJS instrumentation, this PR adds:

- `setupKoaErrorHandler` middleware to capture globally caught
exceptions.
- Koa end to end tests.
This PR creates a `browser-utils` package that contains browser specific
utils that can be shared between the browser, replay, and feedback
packages.

Eventually we will move `browserTracingIntegration` outside of this
package, but the instrumentation handlers will remain here. We will also
move the browser related utils in `@sentry/utils` to this package.

Given this removes `@sentry-internal/tracing` entirely, it is a part of
#9885

ref #9832
…ame (#11383)

Adds element name as fallback. If component name exists, use that, else
if element name exists use that, else use selector name. The element
name and component name mirrors that of [React components vs
elements](https://legacy.reactjs.org/blog/2015/12/18/react-components-elements-and-instances.html)

Example with Replay Play/Pause Button:
| Name Type | HTML Tree|
-------------|------------|
| Component Name | none > none > ReplayControls > ButtonBar > none |
| Element Name | FullViewport > none > ButtonGrid > ButtonGrid >
ReplayPlayPauseButton |
| Element + Component fallback | FullViewPort > none > ButtonGrid >
ButtonGrid > ReplayPlayPauseButton |
| Component + Element fallback | FullViewPort > none > ReplayControls >
ButtonBar > ReplayPlayPauseButton |

More elements have an `data-sentry-element` attribute than
`data-sentry-component` attribute, so adding in the element name means
more elements in the tree will have a descriptive name. Furthermore, the
component name usually provides more context (eg. ReplayControls vs
ButtonGrid) so it should take precedence over the element name

Relates to getsentry/sentry#64673
…on (#11469)

Attempt to fix the Kit test flakiness by awaiting the initial
pageload and hydration, meaning we await
- going to the specified route
- a custom hydration flag being set
- the pageload transaction being sent
Copy link
Contributor

github-actions bot commented Apr 8, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) 75.65 KB (added)
@sentry/browser (incl. Tracing, Replay) 66.87 KB (added)
@sentry/browser (incl. Tracing, Replay with Canvas) 70.73 KB (added)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 60.44 KB (added)
@sentry/browser (incl. Tracing) 31.75 KB (added)
@sentry/browser (incl. browserTracingIntegration) 31.75 KB (added)
@sentry/browser (incl. feedbackIntegration) 30.88 KB (added)
@sentry/browser (incl. feedbackModalIntegration) 30.9 KB (added)
@sentry/browser (incl. feedbackScreenshotIntegration) 30.9 KB (added)
@sentry/browser (incl. sendFeedback) 26.89 KB (added)
@sentry/browser 22.1 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) 71.27 KB (added)
CDN Bundle (incl. Tracing, Replay) 66.03 KB (added)
CDN Bundle (incl. Tracing) 32.33 KB (added)
CDN Bundle 23.76 KB (added)
CDN Bundle (incl. Tracing, Replay) - uncompressed 205.79 KB (added)
CDN Bundle (incl. Tracing) - uncompressed 96.4 KB (added)
CDN Bundle - uncompressed 70.17 KB (added)
@sentry/react (incl. Tracing, Replay) 66.99 KB (added)
@sentry/react 22.12 KB (added)

@lforst lforst force-pushed the prepare-release/8.0.0-alpha.8 branch from 1501201 to 5a03483 Compare April 8, 2024 09:58
@lforst lforst merged commit 3e8a91c into master Apr 8, 2024
94 checks passed
@lforst lforst deleted the prepare-release/8.0.0-alpha.8 branch April 8, 2024 10:59
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.

9 participants