Skip to content

feat(misc): update nx init telemetry meta from CSV to JSON format#35076

Merged
jaysoo merged 1 commit into
masterfrom
NXC-4168
Mar 30, 2026
Merged

feat(misc): update nx init telemetry meta from CSV to JSON format#35076
jaysoo merged 1 commit into
masterfrom
NXC-4168

Conversation

@jaysoo

@jaysoo jaysoo commented Mar 30, 2026

Copy link
Copy Markdown
Member

Current Behavior

nx init emits telemetry meta as a CSV string (e.g. "22.6.3,enable-ci")
via recordStat, only at the cloud prompt step. There is no start or
error tracking, no AI detection, and no environment context.

Expected Behavior

recordStat now accepts a typed RecordStatMeta object and serializes
as JSON, matching the CNW format. Three lifecycle events are recorded:

  • start: nodeVersion, os, packageManager, aiAgent, isCI
  • complete: same env info plus pluginsInstalled, useCloud
  • error: errorCode, errorMessage, aiAgent

The existing cloud prompt recordStat calls also now include env info.

Related Issue(s)

Closes NXC-4168

@jaysoo jaysoo requested a review from a team as a code owner March 30, 2026 13:34
@jaysoo jaysoo requested a review from FrozenPandaz March 30, 2026 13:35
@netlify

netlify Bot commented Mar 30, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit fdb43c5
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69ca8878dfc72d0008c48afc
😎 Deploy Preview https://deploy-preview-35076--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Mar 30, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit fdb43c5
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69ca8878429d0900089b2858
😎 Deploy Preview https://deploy-preview-35076--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit fdb43c5

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 1h 44s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 7s View ↗
nx-cloud record -- pnpm nx conformance:check ✅ Succeeded 6s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-30 15:33:06 UTC

Comment thread packages/nx/src/utils/ab-testing.ts
## Current Behavior

`nx init` emits telemetry meta as a CSV string (e.g. "22.6.3,enable-ci")
via `recordStat`, only at the cloud prompt step. There is no start or
error tracking, no AI detection, and no environment context.

## Expected Behavior

`recordStat` now accepts a typed `RecordStatMeta` object and serializes
as JSON, matching the CNW format. Three lifecycle events are recorded:

- **start**: nodeVersion, os, packageManager, aiAgent, isCI
- **complete**: same env info plus pluginsInstalled, useCloud
- **error**: errorCode, errorMessage, aiAgent

The existing cloud prompt `recordStat` calls also now include env info.

## Related Issue(s)

Fixes NXC-4168
@jaysoo jaysoo merged commit fe5a463 into master Mar 30, 2026
24 checks passed
@jaysoo jaysoo deleted the NXC-4168 branch March 30, 2026 16:12
FrozenPandaz pushed a commit that referenced this pull request Mar 31, 2026
…5076)

## Current Behavior

`nx init` emits telemetry meta as a CSV string (e.g. "22.6.3,enable-ci")
via `recordStat`, only at the cloud prompt step. There is no start or
error tracking, no AI detection, and no environment context.

## Expected Behavior

`recordStat` now accepts a typed `RecordStatMeta` object and serializes
as JSON, matching the CNW format. Three lifecycle events are recorded:

- **start**: nodeVersion, os, packageManager, aiAgent, isCI
- **complete**: same env info plus pluginsInstalled, useCloud
- **error**: errorCode, errorMessage, aiAgent

The existing cloud prompt `recordStat` calls also now include env info.

## Related Issue(s)

Closes NXC-4168

(cherry picked from commit fe5a463)
@github-actions

github-actions Bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants