Unverified Commit 71116ce3 authored by mknichel's avatar mknichel Committed by GitHub

debug: Add tags to next build traces to track build configuration in the .next/trace file (#56965)

This PR adds two simple tags to the `.next/trace` output for the `next-build` span to keep track of parameters to the build step when looking at build traces, and a `isTurbotrace` for the tracing step.
parent 08fdc1eb
...@@ -193,7 +193,9 @@ export async function collectBuildTraces({ ...@@ -193,7 +193,9 @@ export async function collectBuildTraces({
const excludeGlobKeys = Object.keys(outputFileTracingExcludes) const excludeGlobKeys = Object.keys(outputFileTracingExcludes)
await nextBuildSpan await nextBuildSpan
.traceChild('node-file-trace-build') .traceChild('node-file-trace-build', {
isTurbotrace: Boolean(config.experimental.turbotrace) ? 'true' : 'false',
})
.traceAsyncFn(async () => { .traceAsyncFn(async () => {
const nextServerTraceOutput = path.join( const nextServerTraceOutput = path.join(
distDir, distDir,
......
...@@ -350,6 +350,8 @@ export default async function build( ...@@ -350,6 +350,8 @@ export default async function build(
let hasAppDir = false let hasAppDir = false
try { try {
const nextBuildSpan = trace('next-build', undefined, { const nextBuildSpan = trace('next-build', undefined, {
buildMode: buildMode,
isTurboBuild: String(turboNextBuild),
version: process.env.__NEXT_VERSION as string, version: process.env.__NEXT_VERSION as string,
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment