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

Telemetry: Add precedingUpgrade data to dev/build events #20084

Merged
merged 2 commits into from
Dec 5, 2022

Conversation

shilman
Copy link
Member

@shilman shilman commented Dec 4, 2022

Issue: N/A

What I did

If it's the first dev/build run after an upgrade, record a reference to that upgrade.

This will allow us to track failures more easily and improve our upgrade heuristics

How to test

In a test project, where sb is aliased to your local version:

STORYBOOK_TELEMETRY_DEBUG=true sb upgrade --prerelease
STORYBOOK_TELEMETRY_DEBUG=true sb dev    
STORYBOOK_TELEMETRY_DEBUG=true sb dev

The first dev event should contain extra data like

    "precedingUpgrade": {
      "timestamp": 1670159585083,
      "eventType": "upgrade",
      "eventId": "Y54r_tWjm9BFrYKGRHQt8",
      "sessionId": "U9A7qs-aiuDQt6tO4z_rv"
    },

The second should have none

This allows us to track failures more easily and improve our upgrade heuristics
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

Looking good so far, some suggestions

code/lib/telemetry/src/event-cache.ts Outdated Show resolved Hide resolved
code/lib/telemetry/src/event-cache.test.ts Outdated Show resolved Hide resolved
});
});

describe('intervening dev events', () => {
Copy link
Member

Choose a reason for hiding this comment

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

We need to test intervening dev events that are out of date.

@shilman shilman added maintenance User-facing maintenance tasks telemetry labels Dec 5, 2022
@shilman shilman marked this pull request as ready for review December 5, 2022 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks telemetry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants