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(browser): Send standalone fetch and XHR spans if there's no active parent span #11783

Merged
merged 3 commits into from Apr 25, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 25, 2024

Builds on top of #11696 and #11699

This PR enables sending standalone http.client spans for outgoing fetch and XHR requests if there's no active parent span. These spans will belong to the same trace id as a potentially previously started pageload or navigation span.

Adjusted integration tests to test the newly sent spans and their trace lifetime.

ref #11562

@Lms24 Lms24 changed the base branch from develop to lms/feat-core-span-envelope-trace-header April 25, 2024 11:03
@Lms24 Lms24 self-assigned this Apr 25, 2024
Copy link
Contributor

github-actions bot commented Apr 25, 2024

size-limit report 📦

Path Size
@sentry/browser 21.65 KB (0%)
@sentry/browser (incl. Tracing) 32.74 KB (+0.11% 🔺)
@sentry/browser (incl. Tracing, Replay) 68.12 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.51 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.17 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.38 KB (+0.06% 🔺)
@sentry/browser (incl. Feedback) 37.79 KB (0%)
@sentry/browser (incl. sendFeedback) 26.43 KB (0%)
@sentry/browser (incl. FeedbackAsync) 30.93 KB (0%)
@sentry/react 24.33 KB (0%)
@sentry/react (incl. Tracing) 35.69 KB (+0.1% 🔺)
@sentry/vue 25.47 KB (+0.1% 🔺)
@sentry/vue (incl. Tracing) 34.52 KB (+0.11% 🔺)
@sentry/svelte 21.77 KB (0%)
CDN Bundle 23.95 KB (0%)
CDN Bundle (incl. Tracing) 34.07 KB (+0.12% 🔺)
CDN Bundle (incl. Tracing, Replay) 67.75 KB (+0.06% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 83.62 KB (+0.06% 🔺)
CDN Bundle - uncompressed 70.56 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 101.12 KB (+0.13% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.73 KB (+0.06% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.12 KB (+0.05% 🔺)
@sentry/nextjs (client) 34.92 KB (+0.12% 🔺)
@sentry/sveltekit (client) 33.3 KB (+0.12% 🔺)
@sentry/node 138.48 KB (0%)

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

very nice!

@Lms24 Lms24 force-pushed the lms/feat-core-span-envelope-trace-header branch from 47a67db to 5095e82 Compare April 25, 2024 14:46
Base automatically changed from lms/feat-core-span-envelope-trace-header to develop April 25, 2024 15:19
@Lms24 Lms24 force-pushed the lms/feat-browser-http-client-standalone-spans branch from 0a9e935 to 78f1279 Compare April 25, 2024 15:30
@Lms24 Lms24 merged commit 4b6cb4a into develop Apr 25, 2024
94 checks passed
@Lms24 Lms24 deleted the lms/feat-browser-http-client-standalone-spans branch April 25, 2024 15:45
Lms24 added a commit that referenced this pull request May 10, 2024
…rent span (#11974)

We introduced sending standalone `http.client` spans in
#11783. Subsequently,
we had to revert this change due to internal timeline problems (😢).
However, in the revert PR (#11879) we missed that originally, we checked
for an active parent span and only then created an `http.client` span.
The result were `http.client` _transactions_ which we also don't want.
This patch fixes that by re-introducing the `hasParent` check as it was
pre-#11783.
andreiborza pushed a commit that referenced this pull request May 16, 2024
…rent span (#11974)

We introduced sending standalone `http.client` spans in
#11783. Subsequently,
we had to revert this change due to internal timeline problems (😢).
However, in the revert PR (#11879) we missed that originally, we checked
for an active parent span and only then created an `http.client` span.
The result were `http.client` _transactions_ which we also don't want.
This patch fixes that by re-introducing the `hasParent` check as it was
pre-#11783.
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.

None yet

2 participants