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

feat(core): Add addLink(s) to Sentry span #15452

Merged
merged 3 commits into from
Feb 24, 2025
Merged

feat(core): Add addLink(s) to Sentry span #15452

merged 3 commits into from
Feb 24, 2025

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Feb 20, 2025

part of #14991

@s1gr1d s1gr1d requested review from Lms24 and chargome February 20, 2025 12:52
@s1gr1d s1gr1d mentioned this pull request Feb 20, 2025
7 tasks
Copy link
Contributor

github-actions bot commented Feb 20, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.05 KB - -
@sentry/browser - with treeshaking flags 22.84 KB - -
@sentry/browser (incl. Tracing) 36.12 KB +0.13% +48 B 🔺
@sentry/browser (incl. Tracing, Replay) 73.13 KB +0.07% +50 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 66.59 KB +0.07% +43 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 77.38 KB +0.07% +49 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 90.33 KB +0.06% +50 B 🔺
@sentry/browser (incl. Feedback) 40.2 KB - -
@sentry/browser (incl. sendFeedback) 27.68 KB - -
@sentry/browser (incl. FeedbackAsync) 32.48 KB - -
@sentry/react 24.87 KB - -
@sentry/react (incl. Tracing) 38 KB +0.13% +49 B 🔺
@sentry/vue 27.29 KB +0.21% +58 B 🔺
@sentry/vue (incl. Tracing) 37.8 KB +0.13% +47 B 🔺
@sentry/svelte 23.09 KB - -
CDN Bundle 24.25 KB - -
CDN Bundle (incl. Tracing) 36.14 KB +0.12% +43 B 🔺
CDN Bundle (incl. Tracing, Replay) 70.99 KB +0.07% +50 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 76.16 KB +0.08% +59 B 🔺
CDN Bundle - uncompressed 70.91 KB - -
CDN Bundle (incl. Tracing) - uncompressed 107.28 KB +0.1% +107 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 218.56 KB +0.05% +107 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 231.12 KB +0.05% +107 B 🔺
@sentry/nextjs (client) 38.98 KB +0.12% +44 B 🔺
@sentry/sveltekit (client) 36.53 KB +0.14% +51 B 🔺
@sentry/node 129.25 KB - -
@sentry/node - without tracing 98.03 KB - -
@sentry/aws-serverless 107.45 KB - -

View base workflow run

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Thanks! Implementation looks great, just had a couple of comments regarding the tests. But feel free to merge anytime once they're addressed!

}

const url = await getLocalTestUrl({ testDir: __dirname });
const [rootSpan1, rootSpan2] = await getMultipleSentryEnvelopeRequests<Event>(page, 3, { url });
Copy link
Member

Choose a reason for hiding this comment

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

if we need to wait for 3 events here (do we?) but only want 2, my gut feeling tells me that there's room for flakes. Let's use the waitForTransactionRequest helper instead and check for the correct transaction (or some other identifier). This should be safer for flakes and makes things more explicit.

(side note: I think we should generally use this helper more often, as it works out really well in our e2e tests. But obviously, no action required, we can do this iteratively and over time)

}

const url = await getLocalTestUrl({ testDir: __dirname });
const [rootSpan1, rootSpan2, rootSpan3] = await getMultipleSentryEnvelopeRequests<Event>(page, 3, { url });
Copy link
Member

Choose a reason for hiding this comment

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

If I understand this test correctly, we're sending 4 transaction events here, right? waiting on 3 then also introduces a potential flake as we depend on events being sent in the correct order.

@s1gr1d s1gr1d merged commit 63ea300 into develop Feb 24, 2025
149 checks passed
@s1gr1d s1gr1d deleted the sig/addSpan-core branch February 24, 2025 13:26
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.

2 participants