-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implement trace propagation from SSR > Pageload in Next 14 App Router #16388
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
Comments
UPDATE: see #16388 (comment) As a first step, @RulaKhaled and I looked into finding a way to manually enable trace propagation via The idea is that users add the meta tag in their root layout so that the tags are applied to each page in their application. To disable the metadata caching, export const dynamic = 'force-dynamic';
export async function generateMetadata(
): Promise<Metadata> {
const metaObject = {
title: 'Create Next App',
description: "Generated by create next app",
other: {
...getTraceData()
}
};
return metaObject
} |
Update: After some more research, we concluded that letting users manually set So what we'll tell users to do, is to add this code to their root layout: // if they already have a metadata object, they'll need to delete it
- export const metadata = {
- title: "my page",
- }
+ export async function generateMetadata(): Promise<Metadata> {
+ return {
+ // whatever else they have in here
+ title: "my page",
+ other: {
+ ...Sentry.getTraceData(),
+ },
+ };
+ } Findings:
Tasks:
Why not add the headers in our patched
|
Description
We today do not have connected traces between http.server (SSR) and pageload spans in Next.js 14, with App router.
vercel/next.js#64256 & #12157 have implemented this for Next 15+.
We should find some way to make this possible on Next 14, even if manual.
The text was updated successfully, but these errors were encountered: