Skip to content

Commit

Permalink
Merge pull request #62 from storybookjs/feat/version-in-events
Browse files Browse the repository at this point in the history
Pass addon version in telemetry event
valentinpalkovic authored Jun 19, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents d7adb82 + 6768a55 commit 272692c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/preset.ts
Original file line number Diff line number Diff line change
@@ -19,11 +19,16 @@ export const experimental_serverChannel = async (
);

if (!disableTelemetry) {
const { version: addonVersion } = require("../package.json");

channel.on(
STORYBOOK_ADDON_ONBOARDING_CHANNEL,
({ type, ...event }: Event) => {
if (type === "telemetry") {
telemetry("addon-onboarding" as any, event);
telemetry("addon-onboarding" as any, {
...event,
addonVersion,
});
}
}
);

0 comments on commit 272692c

Please sign in to comment.