Skip to content

Telemetry: Add init exit event#33773

Merged
valentinpalkovic merged 2 commits into
nextfrom
valentin/add-exit-telemetry
Feb 6, 2026
Merged

Telemetry: Add init exit event#33773
valentinpalkovic merged 2 commits into
nextfrom
valentin/add-exit-telemetry

Conversation

@valentinpalkovic
Copy link
Copy Markdown
Contributor

@valentinpalkovic valentinpalkovic commented Feb 4, 2026

Closes #

What I did

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • New Features
    • Added comprehensive telemetry exit event tracking during the project initialization process to gain insights into user behavior. Now captures when users decline to reinitialize existing installations, when they select alternative project configuration options, and other exit scenarios to provide enhanced visibility into user workflows and setup preferences.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

Fails
🚫 The "#### Manual testing" section must be filled in. Please describe how to test the changes you've made, step by step, so that reviewers can confirm your PR works as intended.

Generated by 🚫 dangerJS against 3fc04d3

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Feb 4, 2026

View your CI Pipeline Execution ↗ for commit 3fc04d3

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ✅ Succeeded 6m 18s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-05 12:34:58 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Feb 4, 2026

View your CI Pipeline Execution ↗ for commit 4ea4729

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ⏳ In Progress ... View ↗

☁️ Nx Cloud last updated this comment at 2026-02-04 13:34:55 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Feb 4, 2026

View your CI Pipeline Execution ↗ for commit 4ea4729


☁️ Nx Cloud last updated this comment at 2026-02-04 13:23:40 UTC

@valentinpalkovic valentinpalkovic moved this to In Progress in Core Team Projects Feb 4, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

These changes add telemetry tracking for exit scenarios. The EventType union expands to include an 'exit' event variant. Two locations now emit exit telemetry events before terminating: when users decline force-init during project detection, and when the scaffold encounters an 'other' project strategy. Telemetry is only emitted when not disabled.

Changes

Cohort / File(s) Summary
Type Definition
code/core/src/telemetry/types.ts
Added 'exit' variant to the EventType union to support exit event telemetry.
Exit Event Telemetry
code/lib/create-storybook/src/commands/ProjectDetectionCommand.ts, code/lib/create-storybook/src/scaffold-new-project.ts
Integrated telemetry event emission before process exit: ProjectDetectionCommand emits 'exit' event when user declines force-init; scaffold-new-project emits 'exit' event with reason 'scaffold-other' when handling non-standard project strategies. Both check if telemetry is disabled before emitting.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

✨ Finishing touches
  • 📝 Generate docstrings

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Comment @coderabbitai help to get the list of available commands and usage tips.

@shilman shilman changed the title Init: Add telemetry event type exit Telemetry: Add init exit event Feb 5, 2026
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Feb 5, 2026
@valentinpalkovic valentinpalkovic merged commit 5e1084c into next Feb 6, 2026
126 of 129 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/add-exit-telemetry branch February 6, 2026 07:58
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Core Team Projects Feb 6, 2026
@github-actions github-actions Bot mentioned this pull request Feb 6, 2026
6 tasks
@shilman shilman added maintenance User-facing maintenance tasks and removed bug labels Feb 6, 2026
valentinpalkovic added a commit that referenced this pull request Feb 9, 2026
Telemetry: Add init exit event
(cherry picked from commit 5e1084c)
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Feb 9, 2026
@github-actions github-actions Bot mentioned this pull request Feb 11, 2026
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal maintenance User-facing maintenance tasks patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch telemetry

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants