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: Update CHANGELOG for 8.23.0 #13170

Merged
merged 15 commits into from
Aug 2, 2024
Merged

meta: Update CHANGELOG for 8.23.0 #13170

merged 15 commits into from
Aug 2, 2024

Conversation

nicohrubec
Copy link
Contributor

No description provided.

s1gr1d and others added 15 commits August 1, 2024 09:36
Previously, the Nuxt SDK was built with `@nuxt/module-builder` and
rollup. This made things complicated, as it created two separate folders
in the build output which could not share code between each other.

This setup removes the `@nuxt/module-builder` and adds the module config
to rollup.
This PR updates our unit test runner on CI to only run unit tests for
packages that have been changed.

In addition, it also updates the list of packages to run in node/browser
only unit test envs - we've been running some in both. We only actually
need to run the fully-browser-only unit tests in the "Browser Unit
Tests" job, the rest (including e.g. core, ...) runs in the node unit
tests in all node versions.

In a follow up step, maybe we can further streamline this and simply run
only unit tests and ensure that e.g. the browser ones only run in one of
the node versions, not all of them. Or find another way that does not
require us to keep 2 lists of packages in separate places. But for now,
this should be an improvement.

I opened a test PR to show this in action, where only something in the
react package was changed:

* Browser Unit Tests:
https://github.com/getsentry/sentry-javascript/actions/runs/10180894649/job/28160138970
* Node Unit Tests:
https://github.com/getsentry/sentry-javascript/actions/runs/10180894649/job/28160141152
Adds automatic instrumentation of pipes to `@sentry/nestjs`. Pipes in
nest have a `@Injectable` decorator and implement a `transform`
function. So we can simply extend the existing instrumentation to add a
proxy for `transform`.
[Gitflow] Merge master into develop
Filtering out events of the `_nuxt`
[buildAssetDir](https://nuxt.com/docs/api/nuxt-config#buildassetsdir).
Next step would be to change the regex based on the folder name (as this
could be changed in the nuxt config during build time - but probably
doesn't happen too often).

Also added some unit tests for the server-side of the SDK.

Before:
<img width="698" alt="image"
src="https://github.com/user-attachments/assets/2ec5ccfb-b8fb-449b-97ba-24fbecabd998">

After:
<img width="686" alt="image"
src="https://github.com/user-attachments/assets/adf43031-7521-44f5-b155-ea57259001f5">
This PR adds a new method to the cloudflare SDK,
`instrumentD1WithSentry`. This method can be used to instrument
[Cloudflare D1](https://developers.cloudflare.com/d1/), Cloudflare's
serverless SQL database.

```js
// env.DB is the D1 DB binding configured in your `wrangler.toml`
const db = instrumentD1WithSentry(env.DB);
// Now you can use the database as usual
await db.prepare('SELECT * FROM table WHERE id = ?').bind(1).run();
```

The reason this has to be a standalone wrapper method instead of an
integration is because the cloudflare d1 instance can be bound to any
arbitrary environmental variable as per user config. This is why the
snippet above shows `env.DB` being passed into `instrumentD1WithSentry`.
`env.DB` can easily be `env.COOL_DB` or `env.HAPPY_DB`.

I am planning to ask the cloudflare team to expose some APIs to make
this better, but in the meantime this is the best we can do.
Leftover from auto-generated JSDoc, can be removed
Before: `Time: 10.517 s`

After: `Duration 3.65s (transform 2.76s, setup 7ms, collect 15.44s,
tests 1.36s, environment 4.96s, prepare 3.63s)`

We also change the folder structure of the browser unit tests, because
we've removed the in-package integration tests.

This change also removes `environment: 'jsdom'` from the central config
in favour of explicitly adding jsdom environment via the
`@vitest-environment` pragma to the specific test file that needs it.
This should means that our tests are not polluted with jsdom globals,
and that future writers have to explicitly opt-in to the behaviour.
Attach SDK info to individual profile chunks
… route execution (#13153)

Adds automatic instrumentation of interceptors to `@sentry/nestjs`.
Interceptors in nest have a `@Injectable` decorator and implement a
`intercept` function. So we can simply extend the existing
instrumentation to add a proxy for `intercept`.

Remark: Interceptors allow users to add functionality before and after a
route handler is called. This PR adds tracing to whatever happens before
the route is executed. I am still figuring out how to trace any
instructions after the route was executed. Will do that in a separate
PR.
…indow` global scopes (#13156)

Relax our browser extension detection check to
avoid showing the error message and blocking `Sentry.init` if the SDK is
not initialized in a `window` global scope. For instance, this will
allow `Sentry.init` to be executed in (service) workers. We likely don't
need to worry about multiple SDK instance collisions in non-`window`
global scopes.
@nicohrubec nicohrubec changed the base branch from develop to master August 2, 2024 09:38
@nicohrubec nicohrubec requested review from a team, mydea and s1gr1d and removed request for a team August 2, 2024 09:42
@nicohrubec nicohrubec merged commit fb1e785 into master Aug 2, 2024
29 checks passed
@nicohrubec nicohrubec deleted the prepare-release/8.23.0 branch August 2, 2024 09:44
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.

7 participants