From 104a2ce15dfcda6711008f360fd10ae4feb90ac1 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Mon, 20 Feb 2023 07:56:36 -0800 Subject: [PATCH] fix: send plugin version to telemetry (#407) --- src/hooks/jitPluginInstall.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hooks/jitPluginInstall.ts b/src/hooks/jitPluginInstall.ts index ffffb71a..c48d9b70 100644 --- a/src/hooks/jitPluginInstall.ts +++ b/src/hooks/jitPluginInstall.ts @@ -18,7 +18,7 @@ const hook: Hook<'jit_plugin_not_installed'> = async function (opts) { global.cliTelemetry?.record({ eventName: 'JIT_INSTALL_STARTED', type: 'EVENT', - version: opts.config.version, + version: opts.pluginVersion, plugin: opts.command.pluginName, command: opts.command.id, }); @@ -29,7 +29,7 @@ const hook: Hook<'jit_plugin_not_installed'> = async function (opts) { global.cliTelemetry?.record({ eventName: 'JIT_INSTALL_SUCCESS', type: 'EVENT', - version: opts.config.version, + version: opts.pluginVersion, plugin: opts.command.pluginName, command: opts.command.id, }); @@ -43,7 +43,7 @@ const hook: Hook<'jit_plugin_not_installed'> = async function (opts) { message: err.message, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access stackTrace: err?.stack?.replace(new RegExp(os.homedir(), 'g'), AppInsights.GDPR_HIDDEN), - version: opts.config.version, + version: opts.pluginVersion, plugin: opts.command.pluginName, command: opts.command.id, });