Skip to content
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

Add telemetry for turbotrace #42486

Merged
merged 2 commits into from Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/next/build/webpack-config.ts
Expand Up @@ -2120,6 +2120,7 @@ export default async function getBaseWebpackConfig(
['swcRemoveConsole', !!config.compiler?.removeConsole],
['swcImportSource', !!jsConfig?.compilerOptions?.jsxImportSource],
['swcEmotion', !!config.compiler?.emotion],
['turbotrace', !!config.experimental.turbotrace],
SWCBinaryTarget,
].filter<[Feature, boolean]>(Boolean as any)
)
Expand Down
2 changes: 2 additions & 0 deletions packages/next/build/webpack/plugins/telemetry-plugin.ts
Expand Up @@ -34,6 +34,7 @@ export type Feature =
| 'swcImportSource'
| 'swcEmotion'
| `swc/target/${SWC_TARGET_TRIPLE}`
| 'turbotrace'

interface FeatureUsage {
featureName: Feature
Expand Down Expand Up @@ -88,6 +89,7 @@ const BUILD_FEATURES: Array<Feature> = [
'swc/target/x86_64-unknown-linux-musl',
'swc/target/aarch64-unknown-linux-musl',
'swc/target/aarch64-pc-windows-msvc',
'turbotrace',
]

const ELIMINATED_PACKAGES = new Set<string>()
Expand Down
1 change: 1 addition & 0 deletions packages/next/telemetry/events/build.ts
Expand Up @@ -149,6 +149,7 @@ export type EventBuildFeatureUsage = {
| 'swcImportSource'
| 'swcEmotion'
| `swc/target/${SWC_TARGET_TRIPLE}`
| 'turbotrace'
| 'build-lint'
invocationCount: number
}
Expand Down