Skip to content

Commit

Permalink
pass addon version in telemetry event
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jun 19, 2023
1 parent d7adb82 commit 6768a55
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
Expand Up @@ -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,
});
}
}
);
Expand Down

0 comments on commit 6768a55

Please sign in to comment.