Skip to content

meta: Prepare prelease of 8.35.0-beta.0 #13988

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 20 commits into from
Oct 15, 2024
Merged

meta: Prepare prelease of 8.35.0-beta.0 #13988

merged 20 commits into from
Oct 15, 2024

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Oct 15, 2024

No description provided.

github-actions bot and others added 20 commits October 11, 2024 07:44
[Gitflow] Merge master into develop
Fixes #13932

We have defined the type for the shared client/server types in
meta-frameworks incorrectly, `init` now returns `Client | undefined` and
not `void` anymore.
This PR is a pretty big change, but it should help us to make custom
OTEL support way better/easier to understand in the future.

The fundamental problem this PR is trying to change is the restriction
that we rely on our instance of `HttpInstrumentation` for
Sentry-specific (read: not span-related) things. This made it
tricky/annoying for users with a custom OTEL setup that may include
`HttpInstrumentation` to get things working, because they may
inadvertedly overwrite our instance of the instrumentation (because
there can only be a single monkey-patch per module in the regular
instrumentations), leading to hard-to-debug and often subtle problems.

This PR fixes this by splitting out the non-span related http
instrumentation code into a new, dedicated `SentryHttpInstrumentation`,
which can be run side-by-side with the OTEL instrumentation (which emits
spans, ...).

We make this work by basically implementing our own custom, minimal
`wrap` method instead of using shimmer. This way, OTEL instrumentation
cannot identify the wrapped module as wrapped, and allow to wrap it
again. While this is _slightly_ hacky and also means you cannot unwrap
the http module, we do not generally support this for the Sentry SDK
anyhow.

This new Instrumentation does two things:

1. Handles automatic forking of the isolation scope per incoming
request. By using our own code, we can actually make this much nicer, as
we do not need to retrospectively update the isolation scope anymore,
but instead we can do this properly now.
2. Emit breadcrumbs for outgoing requests.

With this change, in errors only mode you really do not need our
instance of the default `HttpInstrumentation` anymore at all, you
can/should just provide your own if you want to capture http spans in a
non-Sentry environment. However, this is sadly a bit tricky, because up
to now we forced users in this scenario to still use our Http instance
and avoid adding their own (instead we allowed users to pass their Http
instrumentation config to our Http integration). This means that if we'd
simply stop adding our http instrumentation instance when tracing is
disabled, these users would stop getting otel spans as well :/ so we
sadly can't change this without a major.

Instead, I re-introduced the `spans: false` for `httpIntegration({
spans: false })`. When this is set (which for now is opt-in, but
probably should be opt-out in v9) we will only register
SentryHttpInstrumentation, not HttpInstrumentation, thus not emitting
any spans. Users can add their own instance of HttpInstrumentation if
they care.

One semi-related thing that I noticed while looking into this is that we
incorrectly emitted node-fetch spans in errors-only mode. This
apparently sneaked in when we migrated to the new undici
instrumentation. I extracted this out into a dedicated PR too, but the
changes are in this too because tests were a bit fucked up otherwise.

On top of #13765

This also includes a bump of import-in-the-middle to 1.11.2, as this
includes a fix to properly allow double-wrapping ESM modules.
Module federation needs package version for comparison

fixes #12433
It seems that `github.actor` is not necessarily the PR author, but
possibly the user that merged the PR.

You can see e.g. here:
https://github.com/getsentry/sentry-javascript/actions/runs/11270299315/job/31340702772
how it still ran for a dependabot PR.
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #13922

Co-authored-by: mydea <2411343+mydea@users.noreply.github.com>
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #13875

Co-authored-by: mydea <2411343+mydea@users.noreply.github.com>
…avior (#13953)

Add a browser integration test that describes the current
behaviour of how we update the `transaction` field in the DSC which is
propagated via the `baggage` header and added to envelopes as the
`trace` header.
…13945)

Feature Issue:
#13943

Adds a Rollup plugin to wrap the server entry with `import()` to load it
after Sentry was initialized.

The plugin is not yet in use (will do this in another PR - see linked
issue above)
…ssion (#13962)

This fixes a bug where an older, saved session (that has a
`previousSessionId`, i.e. session was recorded and expired) would cause
buffered replays to not send when an error happens. This is because the
session start timestamp would never update, causing our flush logic to
skip sending the replay due to incorrect replay duration calculation.
Resolves: #13279
Depends on: #13840 
[Sample
Event](https://sentry-sdks.sentry.io/issues/5939879614/?project=5429219&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&sort=date&statsPeriod=1h&stream_index=0)

Docs PR: getsentry/sentry-docs#11516
 

Adds a Pinia plugin with a feature set similar to the Redux integration.

- Attaches Pinia state as an attachment to the event (`true` by default)
- Provides `actionTransformer` and `stateTransformer` to the user for
potentially required PII modifications.
- Adds breadcrumbs for Pinia actions
- Assigns Pinia state to event contexts.
…ior (#13961)

Add tests for DSC updating behaviour in the Node SDK,
analogously to #13953
…exception (#13965)

Change this to be a warn level log instead of an exception (which gets
captured to Sentry). Since this is an error we are throwing ourselves
and it is to be expected, no need to treat as an exception.

This also adds a new meta string to differentiate from an error while
parsing. This means we can show a more specific error message on the
frontend.
@billyvg
Copy link
Member Author

billyvg commented Oct 15, 2024

Prelease for sentry saas

@mydea
Copy link
Member

mydea commented Oct 15, 2024

Hmm, generally we do not merge beta changelogs into develop - I would make a beta branch or so and udpate the changelog there, and release from this?

@billyvg billyvg changed the base branch from develop to beta October 15, 2024 17:42
@billyvg
Copy link
Member Author

billyvg commented Oct 15, 2024

@mydea hmm beta branch seems to be very behind 😬

@mydea
Copy link
Member

mydea commented Oct 15, 2024

feel free to fast-forward the beta branch, or make a new branch like beta-8.35.0 or something like this :)

@billyvg billyvg marked this pull request as ready for review October 15, 2024 18:30
@billyvg billyvg requested a review from a team as a code owner October 15, 2024 18:30
@billyvg billyvg merged commit 4c741ea into beta Oct 15, 2024
124 checks passed
@billyvg billyvg deleted the prerelease/8.35.0-beta.0 branch October 15, 2024 18:31
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