Unverified Commit 086d4340 authored by LongYinan's avatar LongYinan Committed by GitHub

Add telemetry for turbotrace (#42486)

Depends on https://github.com/vercel/next-telemetry/pull/93
parent cf3bb583
...@@ -2120,6 +2120,7 @@ export default async function getBaseWebpackConfig( ...@@ -2120,6 +2120,7 @@ export default async function getBaseWebpackConfig(
['swcRemoveConsole', !!config.compiler?.removeConsole], ['swcRemoveConsole', !!config.compiler?.removeConsole],
['swcImportSource', !!jsConfig?.compilerOptions?.jsxImportSource], ['swcImportSource', !!jsConfig?.compilerOptions?.jsxImportSource],
['swcEmotion', !!config.compiler?.emotion], ['swcEmotion', !!config.compiler?.emotion],
['turbotrace', !!config.experimental.turbotrace],
SWCBinaryTarget, SWCBinaryTarget,
].filter<[Feature, boolean]>(Boolean as any) ].filter<[Feature, boolean]>(Boolean as any)
) )
......
...@@ -34,6 +34,7 @@ export type Feature = ...@@ -34,6 +34,7 @@ export type Feature =
| 'swcImportSource' | 'swcImportSource'
| 'swcEmotion' | 'swcEmotion'
| `swc/target/${SWC_TARGET_TRIPLE}` | `swc/target/${SWC_TARGET_TRIPLE}`
| 'turbotrace'
interface FeatureUsage { interface FeatureUsage {
featureName: Feature featureName: Feature
...@@ -88,6 +89,7 @@ const BUILD_FEATURES: Array<Feature> = [ ...@@ -88,6 +89,7 @@ const BUILD_FEATURES: Array<Feature> = [
'swc/target/x86_64-unknown-linux-musl', 'swc/target/x86_64-unknown-linux-musl',
'swc/target/aarch64-unknown-linux-musl', 'swc/target/aarch64-unknown-linux-musl',
'swc/target/aarch64-pc-windows-msvc', 'swc/target/aarch64-pc-windows-msvc',
'turbotrace',
] ]
const ELIMINATED_PACKAGES = new Set<string>() const ELIMINATED_PACKAGES = new Set<string>()
......
...@@ -149,6 +149,7 @@ export type EventBuildFeatureUsage = { ...@@ -149,6 +149,7 @@ export type EventBuildFeatureUsage = {
| 'swcImportSource' | 'swcImportSource'
| 'swcEmotion' | 'swcEmotion'
| `swc/target/${SWC_TARGET_TRIPLE}` | `swc/target/${SWC_TARGET_TRIPLE}`
| 'turbotrace'
| 'build-lint' | 'build-lint'
invocationCount: number invocationCount: number
} }
......
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