You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attributes I was talking about in the issues are currently put on spans a) for the default functions exported from page.ts, layout.ts etc. b) for generation functions exported by page.ts, layout.ts etc. e.g generateMetadata. Since we currently create these spans via our Webpack-based wrappings, we need to find equivalents to these spans in the spans emitted by Next.js itself, so that we emit useful spans when people switch over to Turbopack. If we find that Next.js doesn't emit such spans (I honestly forgot whether it does or not), we either need to find a way to create these spans ourselves (which is likely gonna be very hard to impossible), or we need to contribute these to Next.js itself. Afterwards, we can add the relevant attributes to these spans.
Description
We require two attributes on certain spans for the Next.js insights page:
sentry.nextjs.function.type
(for example"Page"
,"Layout"
,"generateMetadata"
)sentry.nextjs.function.route
(for example"/foo/bar/[id]/page"
or"/foo/bar/[id]/layout
)The spans that should have these attributes are the default export functions for Page, Layout, etc. files, and all generation functions.
This probably just involves taking spans emitted by Next.js and transforming them to have the right attributes.
The text was updated successfully, but these errors were encountered: