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

fix(v8/core): Use consistent continueTrace implementation in core #14819

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Dec 20, 2024

V8 backport of #14813

We have a different implementation of continueTrace for OTEL/Node. Until now we relied on actually using the import from @sentry/node vs @sentry/core to ensure this. However, this is a footgun, and actually lead to a problem in NextJS because we used the core variant there. Also, it is simply not isomorphic.

So to fix this, this PR puts continueTrace on the ACS so we can consistently use the core variant in all environments.

Fixes #14787

…14813)

We have a different implementation of `continueTrace` for OTEL/Node.
Until now we relied on actually using the import from `@sentry/node` vs
`@sentry/core` to ensure this. However, this is a footgun, and actually
lead to a problem in NextJS because we used the core variant there.
Also, it is simply not isomorphic.

So to fix this, this PR puts `continueTrace` on the ACS so we can
consistently use the core variant in all environments.

Fixes #14787
@s1gr1d s1gr1d requested review from mydea and Lms24 December 20, 2024 13:44
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.29 KB - -
@sentry/browser - with treeshaking flags 21.96 KB - -
@sentry/browser (incl. Tracing) 35.81 KB - -
@sentry/browser (incl. Tracing, Replay) 73.06 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 63.45 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 77.37 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89.85 KB - -
@sentry/browser (incl. Feedback) 40.04 KB - -
@sentry/browser (incl. sendFeedback) 27.89 KB - -
@sentry/browser (incl. FeedbackAsync) 32.68 KB - -
@sentry/react 25.96 KB - -
@sentry/react (incl. Tracing) 38.64 KB - -
@sentry/vue 27.52 KB - -
@sentry/vue (incl. Tracing) 37.67 KB - -
@sentry/svelte 23.45 KB - -
CDN Bundle 24.49 KB +0.09% +22 B 🔺
CDN Bundle (incl. Tracing) 37.53 KB +0.05% +16 B 🔺
CDN Bundle (incl. Tracing, Replay) 72.72 KB +0.03% +15 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 78.12 KB +0.02% +15 B 🔺
CDN Bundle - uncompressed 71.93 KB +0.12% +81 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 111.31 KB +0.08% +81 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 225.38 KB +0.04% +81 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 238.6 KB +0.04% +81 B 🔺
@sentry/nextjs (client) 38.9 KB - -
@sentry/sveltekit (client) 36.32 KB - -
@sentry/node 162.73 KB +0.03% +35 B 🔺
@sentry/node - without tracing 98.89 KB +0.02% +20 B 🔺
@sentry/aws-serverless 126.55 KB +0.03% +26 B 🔺

View base workflow run

@xiaoxiangmoe xiaoxiangmoe mentioned this pull request Dec 20, 2024
3 tasks
@s1gr1d s1gr1d merged commit 576a1ad into v8 Dec 30, 2024
159 checks passed
@s1gr1d s1gr1d deleted the sig/continue-trace-v8 branch December 30, 2024 12:55
alexandresoro pushed a commit to alexandresoro/ouca-backend that referenced this pull request Jan 7, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@sentry/node](https://github.com/getsentry/sentry-javascript/tree/master/packages/node) ([source](https://github.com/getsentry/sentry-javascript)) | dependencies | minor | [`8.47.0` -> `8.48.0`](https://renovatebot.com/diffs/npm/@sentry%2fnode/8.47.0/8.48.0) |
| [@sentry/react](https://github.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](https://github.com/getsentry/sentry-javascript)) | dependencies | minor | [`8.47.0` -> `8.48.0`](https://renovatebot.com/diffs/npm/@sentry%2freact/8.47.0/8.48.0) |

---

### Release Notes

<details>
<summary>getsentry/sentry-javascript (@&#8203;sentry/node)</summary>

### [`v8.48.0`](https://github.com/getsentry/sentry-javascript/releases/tag/8.48.0)

[Compare Source](getsentry/sentry-javascript@8.47.0...8.48.0)

##### Deprecations

-   **feat(v8/core): Deprecate `getDomElement` method ([#&#8203;14799](getsentry/sentry-javascript#14799

    Deprecates `getDomElement`. There is no replacement.

##### Other changes

-   fix(nestjs/v8): Use correct main/module path in package.json ([#&#8203;14791](getsentry/sentry-javascript#14791))
-   fix(v8/core): Use consistent `continueTrace` implementation in core ([#&#8203;14819](getsentry/sentry-javascript#14819))
-   fix(v8/node): Correctly resolve debug IDs for ANR events with custom appRoot ([#&#8203;14823](getsentry/sentry-javascript#14823))
-   fix(v8/node): Ensure `NODE_OPTIONS` is not passed to worker threads ([#&#8203;14825](getsentry/sentry-javascript#14825))
-   fix(v8/angular): Fall back to element `tagName` when name is not provided to `TraceDirective` ([#&#8203;14828](getsentry/sentry-javascript#14828))
-   fix(aws-lambda): Remove version suffix from lambda layer ([#&#8203;14843](getsentry/sentry-javascript#14843))
-   fix(v8/node): Ensure express requests are properly handled ([#&#8203;14851](getsentry/sentry-javascript#14851))
-   feat(v8/node): Add `openTelemetrySpanProcessors` option ([#&#8203;14853](getsentry/sentry-javascript#14853))
-   fix(v8/react): Use `Set` as the `allRoutes` container. ([#&#8203;14878](getsentry/sentry-javascript#14878)) ([#&#8203;14884](getsentry/sentry-javascript#14884))
-   fix(v8/react): Improve handling of routes nested under path="/" ([#&#8203;14897](getsentry/sentry-javascript#14897))
-   feat(v8/core): Add `normalizedRequest` to `samplingContext` ([#&#8203;14903](getsentry/sentry-javascript#14903))
-   fix(v8/feedback): Avoid lazy loading code for `syncFeedbackIntegration` ([#&#8203;14918](getsentry/sentry-javascript#14918))

Work in this release was contributed by [@&#8203;arturovt](https://github.com/arturovt). Thank you for your contribution!

##### Bundle size 📦

| Path                                                             | Size              |
| ---------------------------------------------------------------- | ----------------- |
| [@&#8203;sentry/browser](https://github.com/sentry/browser)                                                  | 23.29 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) - with treeshaking flags                         | 21.96 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing)                                  | 35.85 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay)                          | 73.09 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 63.48 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay with Canvas)              | 77.4 KB   |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback)                | 89.34 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Feedback)                                 | 39.5 KB   |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. sendFeedback)                             | 27.89 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. FeedbackAsync)                            | 32.69 KB  |
| [@&#8203;sentry/react](https://github.com/sentry/react)                                                    | 25.96 KB  |
| [@&#8203;sentry/react](https://github.com/sentry/react) (incl. Tracing)                                    | 38.66 KB  |
| [@&#8203;sentry/vue](https://github.com/sentry/vue)                                                      | 27.56 KB  |
| [@&#8203;sentry/vue](https://github.com/sentry/vue) (incl. Tracing)                                      | 37.69 KB  |
| [@&#8203;sentry/svelte](https://github.com/sentry/svelte)                                                   | 23.45 KB  |
| CDN Bundle                                                       | 24.49 KB  |
| CDN Bundle (incl. Tracing)                                       | 37.56 KB  |
| CDN Bundle (incl. Tracing, Replay)                               | 72.75 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback)                     | 78.11 KB  |
| CDN Bundle - uncompressed                                        | 71.93 KB  |
| CDN Bundle (incl. Tracing) - uncompressed                        | 111.42 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed                | 225.5 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed      | 238.6 KB  |
| [@&#8203;sentry/nextjs](https://github.com/sentry/nextjs) (client)                                          | 38.92 KB  |
| [@&#8203;sentry/sveltekit](https://github.com/sentry/sveltekit) (client)                                       | 36.36 KB  |
| [@&#8203;sentry/node](https://github.com/sentry/node)                                                     | 162.8 KB  |
| [@&#8203;sentry/node](https://github.com/sentry/node) - without tracing                                   | 98.94 KB  |
| [@&#8203;sentry/aws-serverless](https://github.com/sentry/aws-serverless)                                           | 126.63 KB |

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/454
Reviewed-by: Alexandre Soro <code@soro.dev>
Co-authored-by: renovate <renovate@git.tristess.app>
Co-committed-by: renovate <renovate@git.tristess.app>
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.

4 participants