Skip to content

Conversation

@isaacs
Copy link
Member

@isaacs isaacs commented Nov 18, 2025

This is a fix commit for the test fragility, on top of JealousGx:fix/local-variables-12588, from PR #17545 which seems to have gone stale. Also, rebased onto develop branch, squashed, and updated to comply with commit message guidelines.

Close: #17545
Fix: #12588
CC: @JealousGx

@isaacs isaacs requested a review from AbhiPrasad November 18, 2025 23:20
@isaacs isaacs force-pushed the isaacs/JealousGx-fix-local-variables-12588 branch from 44f1258 to a5170ec Compare November 18, 2025 23:25
@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.78 kB - -
@sentry/browser - with treeshaking flags 23.27 kB - -
@sentry/browser (incl. Tracing) 41.51 kB - -
@sentry/browser (incl. Tracing, Profiling) 45.83 kB - -
@sentry/browser (incl. Tracing, Replay) 79.92 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.65 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 84.6 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 96.85 kB - -
@sentry/browser (incl. Feedback) 41.45 kB - -
@sentry/browser (incl. sendFeedback) 29.46 kB - -
@sentry/browser (incl. FeedbackAsync) 34.4 kB - -
@sentry/react 26.49 kB - -
@sentry/react (incl. Tracing) 43.51 kB - -
@sentry/vue 29.22 kB - -
@sentry/vue (incl. Tracing) 43.31 kB - -
@sentry/svelte 24.79 kB - -
CDN Bundle 27.09 kB - -
CDN Bundle (incl. Tracing) 42.07 kB - -
CDN Bundle (incl. Tracing, Replay) 78.59 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 84.08 kB - -
CDN Bundle - uncompressed 79.46 kB - -
CDN Bundle (incl. Tracing) - uncompressed 124.83 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 240.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 253.63 kB - -
@sentry/nextjs (client) 45.93 kB - -
@sentry/sveltekit (client) 41.87 kB - -
@sentry/node-core 51.15 kB +0.11% +53 B 🔺
@sentry/node 159.46 kB +0.03% +41 B 🔺
@sentry/node - without tracing 93.03 kB +0.05% +43 B 🔺
@sentry/aws-serverless 106.78 kB +0.06% +63 B 🔺

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,095 - 8,680 +5%
GET With Sentry 1,702 19% 1,595 +7%
GET With Sentry (error only) 6,091 67% 5,988 +2%
POST Baseline 1,202 - 1,128 +7%
POST With Sentry 585 49% 529 +11%
POST With Sentry (error only) 1,047 87% 1,000 +5%
MYSQL Baseline 3,275 - 3,249 +1%
MYSQL With Sentry 413 13% 360 +15%
MYSQL With Sentry (error only) 2,711 83% 2,683 +1%

View base workflow run

@isaacs isaacs force-pushed the isaacs/JealousGx-fix-local-variables-12588 branch from a5170ec to 4f88959 Compare November 19, 2025 01:33
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Looks good! I wonder if the e2e test failures are related?

Let's also make sure we're following the commit guidelines here: https://github.com/getsentry/sentry-javascript/blob/develop/docs/commit-issue-pr-guidelines.md#commits

@isaacs isaacs self-assigned this Nov 19, 2025
isaacs pushed a commit that referenced this pull request Nov 19, 2025
Address an issue where local variables were not being captured for out-of-app frames, even when the `includeOutOfAppFrames` option was enabled. The `localVariablesSyncIntegration` had a race condition where it would process events before the debugger session was fully initialized. Fix this by awaiting the session creation in `setupOnce`. The tests for this integration were failing because they were not setting up a Sentry client, which is required for the integration to be enabled. Correct by adding a client to the test setup. Additionally, add tests for the `localVariablesAsyncIntegration` to ensure it correctly handles the `includeOutOfAppFrames` option. The `LocalVariables` integrations `setupOnce` method was `async`, which violates the `Integration` interface. This caused a race condition where events could be processed before the integration was fully initialized, leading to missed local variables. Fix the race condition by: - Make `setupOnce` synchronous to adhere to the interface contract - Move the asynchronous initialization logic to a separate `setup` function - Make `processEvent` asynchronous and await the result of the `setup` function, so the integration is fully initialized before processing any events - Update tests to correctly `await` the `processEvent` method Fixes GH-12588 Fixes GH-17545
@isaacs isaacs force-pushed the isaacs/JealousGx-fix-local-variables-12588 branch from 4f88959 to fb3ba43 Compare November 19, 2025 21:49
@isaacs isaacs requested a review from AbhiPrasad November 19, 2025 21:50
isaacs pushed a commit that referenced this pull request Nov 19, 2025
Address an issue where local variables were not being captured for out-of-app frames, even when the `includeOutOfAppFrames` option was enabled. The `localVariablesSyncIntegration` had a race condition where it would process events before the debugger session was fully initialized. Fix this by awaiting the session creation in `setupOnce`. The tests for this integration were failing because they were not setting up a Sentry client, which is required for the integration to be enabled. Correct by adding a client to the test setup. Additionally, add tests for the `localVariablesAsyncIntegration` to ensure it correctly handles the `includeOutOfAppFrames` option. The `LocalVariables` integrations `setupOnce` method was `async`, which violates the `Integration` interface. This caused a race condition where events could be processed before the integration was fully initialized, leading to missed local variables. Fix the race condition by: - Make `setupOnce` synchronous to adhere to the interface contract - Move the asynchronous initialization logic to a separate `setup` function - Make `processEvent` asynchronous and await the result of the `setup` function, so the integration is fully initialized before processing any events - Update tests to correctly `await` the `processEvent` method Fixes GH-12588 Fixes GH-17545
@isaacs isaacs force-pushed the isaacs/JealousGx-fix-local-variables-12588 branch from fb3ba43 to a7767a3 Compare November 19, 2025 21:54
Address an issue where local variables were not being captured for out-of-app frames, even when the `includeOutOfAppFrames` option was enabled. The `localVariablesSyncIntegration` had a race condition where it would process events before the debugger session was fully initialized. Fix this by awaiting the session creation in `setupOnce`. The tests for this integration were failing because they were not setting up a Sentry client, which is required for the integration to be enabled. Correct by adding a client to the test setup. Additionally, add tests for the `localVariablesAsyncIntegration` to ensure it correctly handles the `includeOutOfAppFrames` option. The `LocalVariables` integrations `setupOnce` method was `async`, which violates the `Integration` interface. This caused a race condition where events could be processed before the integration was fully initialized, leading to missed local variables. Fix the race condition by: - Make `setupOnce` synchronous to adhere to the interface contract - Move the asynchronous initialization logic to a separate `setup` function - Make `processEvent` asynchronous and await the result of the `setup` function, so the integration is fully initialized before processing any events - Update tests to correctly `await` the `processEvent` method Fixes GH-12588 Fixes GH-17545
@isaacs isaacs force-pushed the isaacs/JealousGx-fix-local-variables-12588 branch from a7767a3 to 1fe7094 Compare November 21, 2025 15:28
@isaacs isaacs merged commit e8a1826 into develop Nov 21, 2025
142 checks passed
@isaacs isaacs deleted the isaacs/JealousGx-fix-local-variables-12588 branch November 21, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants