Skip to content

Conversation

@tmeasday
Copy link
Member

@tmeasday tmeasday commented May 14, 2025

Telescoping on #31577

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

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 pull request has been released as version 0.0.0-pr-31473-sha-09b29507. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-31473-sha-09b29507
Triggered by @shilman
Repository storybookjs/storybook
Branch tom/add-test-run-telemetry
Commit 09b29507
Datetime Tue May 20 05:18:30 UTC 2025 (1747718310)
Workflow run 15129474509

To request a new release of this pull request, mention the @storybookjs/core team.

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

Greptile Summary

This PR implements test run telemetry events and refactors telemetry handling across Storybook, adding tracking for test execution metrics while maintaining performance and respecting privacy settings.

  • Added new 'test-run' event type in code/core/src/telemetry/types.ts and related handling in code/core/src/core-server/build-static.ts
  • Modified telemetry logic in code/core/src/core-server/presets/common-preset.ts to enable collection during test runs unless explicitly disabled
  • Added telemetry tracking in code/addons/vitest/src/vitest-plugin/index.ts for test execution metrics (watch mode, coverage)
  • Added Chromatic to tracked test packages in code/core/src/telemetry/storybook-metadata.ts
  • Updated CircleCI configuration to support telemetry collection during test runs

@nx-cloud
Copy link

nx-cloud bot commented May 14, 2025

View your CI Pipeline Execution ↗ for commit bcccd74.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 26s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-29 12:08:29 UTC

@storybook-app-bot
Copy link

storybook-app-bot bot commented May 14, 2025

Package Benchmarks

Commit: bcccd74, ran on 29 May 2025 at 12:12:47 UTC

No significant changes detected, all good. 👏

@yannbf yannbf changed the title Add test-run telemetry for vitest Addon Vitest: Add telemetry May 14, 2025
@shilman shilman changed the title Addon Vitest: Add telemetry Telemetry: Fix storybook version and add test run telemetry May 20, 2025
@shilman shilman added the maintenance User-facing maintenance tasks label May 20, 2025
@shilman shilman changed the title Telemetry: Fix storybook version and add test run telemetry Telemetry: Fix storybook version and add test run events May 20, 2025
@tmeasday tmeasday force-pushed the tom/add-test-run-telemetry branch from b47fad9 to e1a904e Compare May 27, 2025 10:46
@tmeasday tmeasday changed the base branch from next to tom/refactor-storybookId-in-telemetry May 27, 2025 10:47
@tmeasday tmeasday force-pushed the tom/add-test-run-telemetry branch from e1a904e to 3213d04 Compare May 28, 2025 04:48
@tmeasday tmeasday marked this pull request as ready for review May 28, 2025 04:48
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

tmeasday and others added 3 commits May 28, 2025 15:51
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Base automatically changed from tom/refactor-storybookId-in-telemetry to next May 28, 2025 10:36
@shilman shilman merged commit f84ad28 into next May 29, 2025
56 of 57 checks passed
@shilman shilman deleted the tom/add-test-run-telemetry branch May 29, 2025 12:48
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label May 29, 2025
shilman added a commit that referenced this pull request May 30, 2025
Telemetry: Fix storybook version and add test run events
(cherry picked from commit f84ad28)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label May 30, 2025
@ndelangen ndelangen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addon: vitest ci:normal maintenance User-facing maintenance tasks patch:done Patch/release PRs already cherry-picked to main/release branch telemetry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants