GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(nuxt): Add connected tracing meta tags by s1gr1d · Pull Request #13098 · getsentry/sentry-javascript Conversation
Member
Also changes the closes #13097
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
lforst
reviewed
Comment on lines
+65
to
+68
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a particular reason we're changing this?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
| const activeSpan = getActiveSpan(); | ||
| const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined; | ||
|
|
||
| if (rootSpan) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
cc @Lms24 I remember you wrote this somewhere at some point - should we also inject this for Tracing Without Performance? We do not do this anywhere today I believe, but there was talk about starting to do this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
hmm that's a great point! You're right, we should also inject meta tags for TwP mode. @s1gr1d I propose we merge this as-is and follow up on generally changing the logic here across SDKs. I'll search if we already have an issue for this and otherwise create one to track.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I looked it up: This issue already exists (#8520). I added Nuxt as an item to track but there was a concern raised that I think held us off from implementing
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| `<meta name="baggage" content="${dynamicSamplingContext}"/>`, | ||
| ]; | ||
|
|
||
| head.push(...contentMeta); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
super-l: I think we can skip this array, we can just head.push('<meta...') twice, safe a tiny bit of processing? 😅
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM! We can merge this now and follow up on the TwP comment later
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| nitroApp.hooks.hook('render:html', (html: NuxtRenderHTMLContext) => { | ||
| addSentryTracingMetaTags(html.head); | ||
| }); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
damn, what a nice API!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| nitroApp.hooks.hook('render:html', (html: NuxtRenderHTMLContext) => { | ||
| addSentryTracingMetaTags(html.head); | ||
| }); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
q: Does nuxt run nitro in dev mode? For example solidstart (vinxi) doesn't run nitro in dev mode, so just wondering if you're planning to support tracing via meta tags in dev mode. Also applies for the server error handler I guess.
Talked with @Lms24 about this, and in general we want to have it working for production first and foremost but would be nice if we can cover dev mode too.
Nothing to do here for this PR tho.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I could not find evidence that nitro does not run in dev mode. I get all nitro-related logs in dev mode as well, so it seems to rn. However, it's working only in the production build right now, as I have other issues in dev mode still.
According to this discussion, nitro runs in a worker thread but I haven't tested that to confirm it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Nuxt: Connected traces
There was an error while loading. Please reload this page.