Unverified Commit 1ddd8de1 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Add Next.js version to trace (#30881)

parent 5f72810d
...@@ -132,7 +132,9 @@ export default async function build( ...@@ -132,7 +132,9 @@ export default async function build(
debugOutput = false, debugOutput = false,
runLint = true runLint = true
): Promise<void> { ): Promise<void> {
const nextBuildSpan = trace('next-build') const nextBuildSpan = trace('next-build', undefined, {
attrs: { version: process.env.__NEXT_VERSION },
})
const buildResult = await nextBuildSpan.traceAsyncFn(async () => { const buildResult = await nextBuildSpan.traceAsyncFn(async () => {
// attempt to load global env values so they are available in next.config.js // attempt to load global env values so they are available in next.config.js
......
...@@ -189,7 +189,9 @@ export default class HotReloader { ...@@ -189,7 +189,9 @@ export default class HotReloader {
) )
this.previewProps = previewProps this.previewProps = previewProps
this.rewrites = rewrites this.rewrites = rewrites
this.hotReloaderSpan = trace('hot-reloader') this.hotReloaderSpan = trace('hot-reloader', undefined, {
attrs: { version: process.env.__NEXT_VERSION },
})
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
// of the current `next dev` invocation. // of the current `next dev` invocation.
this.hotReloaderSpan.stop() this.hotReloaderSpan.stop()
......
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