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 trace envelope header to span envelope #11699

Merged
merged 4 commits into from
Apr 25, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 19, 2024

based on #11696

This PR adds a trace envelope header to our standalone span envelope creation function.

ref #11562

@Lms24 Lms24 changed the base branch from develop to lms/feat-browser-standalone-segment-spans April 19, 2024 12:58
@Lms24 Lms24 self-assigned this Apr 19, 2024
@Lms24 Lms24 force-pushed the lms/feat-browser-standalone-segment-spans branch from 1e622f2 to 4c454d4 Compare April 19, 2024 13:08
@Lms24 Lms24 force-pushed the lms/feat-core-span-envelope-trace-header branch from c2537f1 to 558bdd8 Compare April 19, 2024 13:08
Copy link
Contributor

github-actions bot commented Apr 19, 2024

size-limit report 📦

Path Size
@sentry/browser 21.65 KB (0%)
@sentry/browser (incl. Tracing) 32.73 KB (+0.33% 🔺)
@sentry/browser (incl. Tracing, Replay) 68.11 KB (+0.21% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.5 KB (+0.22% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.16 KB (+0.2% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.37 KB (+0.17% 🔺)
@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.45% 🔺)
@sentry/vue 25.47 KB (+0.83% 🔺)
@sentry/vue (incl. Tracing) 34.51 KB (+0.39% 🔺)
@sentry/svelte 21.77 KB (0%)
CDN Bundle 23.95 KB (0%)
CDN Bundle (incl. Tracing) 34.05 KB (+0.48% 🔺)
CDN Bundle (incl. Tracing, Replay) 67.73 KB (+0.19% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 83.61 KB (+0.18% 🔺)
CDN Bundle - uncompressed 70.56 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 101.07 KB (+0.51% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.68 KB (+0.25% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.08 KB (+0.2% 🔺)
@sentry/nextjs (client) 34.92 KB (+0.47% 🔺)
@sentry/sveltekit (client) 33.29 KB (+0.48% 🔺)
@sentry/node 138.48 KB (0%)

@Lms24 Lms24 force-pushed the lms/feat-browser-standalone-segment-spans branch from 4c454d4 to 84d49ca Compare April 23, 2024 08:48
@Lms24 Lms24 force-pushed the lms/feat-core-span-envelope-trace-header branch from 558bdd8 to 238c267 Compare April 23, 2024 11:56
@Lms24 Lms24 force-pushed the lms/feat-browser-standalone-segment-spans branch from 84d49ca to 8b3627a Compare April 23, 2024 11:59
@Lms24 Lms24 force-pushed the lms/feat-core-span-envelope-trace-header branch from 238c267 to 3420308 Compare April 23, 2024 11:59
@Lms24 Lms24 force-pushed the lms/feat-core-span-envelope-trace-header branch from 3420308 to 082d3b0 Compare April 25, 2024 08:31
sample_rate: '1',
sampled: 'true',
trace_id: traceId,
transaction: 'outer',
Copy link
Member Author

Choose a reason for hiding this comment

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

So just to point this out: In a hyptothetical scenario, where a standalone span is created during an active transaction, it's DSC/trace header will be inherited from the active span tree's DSC. I think this is okay for now at least, since it guarantees DS and trace stability as long as one trace is active. Also this scenario is not going to happen in the SDK for how we plan on using standalone for http.client and INP spans.

Copy link
Member

Choose a reason for hiding this comment

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

makes sense still for it to be this way! 👍

sample_rate: '1',
sampled: 'true',
trace_id: spanJson.trace_id,
transaction: 'standalone_span',
Copy link
Member Author

Choose a reason for hiding this comment

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

Also worth pointing out: In case of no previously active parent span, like in this test, the standalone span is treated like a transaction DSC/trace header -wise

@Lms24 Lms24 marked this pull request as ready for review April 25, 2024 08:36
@Lms24 Lms24 requested review from mydea, a team, stephanie-anderson and s1gr1d and removed request for a team and stephanie-anderson April 25, 2024 08:36
@Lms24
Copy link
Member Author

Lms24 commented Apr 25, 2024

will rebase this again when #11696 is merged. This should also fix the failing e2e test

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!

Base automatically changed from lms/feat-browser-standalone-segment-spans to develop April 25, 2024 14:44
@Lms24 Lms24 force-pushed the lms/feat-core-span-envelope-trace-header branch from 47a67db to 5095e82 Compare April 25, 2024 14:46
@Lms24 Lms24 merged commit 13be067 into develop Apr 25, 2024
94 checks passed
@Lms24 Lms24 deleted the lms/feat-core-span-envelope-trace-header branch April 25, 2024 15:19
This pull request was closed.
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