@@ -7,6 +7,8 @@ import { IInstallationChannelManager } from '../../common/installer/types';
77import { ILogger , Product } from '../../common/types' ;
88import * as localize from '../../common/utils/localize' ;
99import { noop } from '../../common/utils/misc' ;
10+ import { sendTelemetryEvent } from '../../telemetry' ;
11+ import { Telemetry } from '../constants' ;
1012import { JupyterInstallError } from '../jupyter/jupyterInstallError' ;
1113import { JupyterSelfCertsError } from '../jupyter/jupyterSelfCertsError' ;
1214import { IDataScienceErrorHandler } from '../types' ;
@@ -20,6 +22,7 @@ export class DataScienceErrorHandler implements IDataScienceErrorHandler {
2022
2123 public async handleError ( err : Error ) : Promise < void > {
2224 if ( err instanceof JupyterInstallError ) {
25+ sendTelemetryEvent ( Telemetry . JupyterNotInstalledErrorShown ) ;
2326 const response = await this . applicationShell . showInformationMessage (
2427 err . message ,
2528 localize . DataScience . jupyterInstall ( ) ,
@@ -33,13 +36,16 @@ export class DataScienceErrorHandler implements IDataScienceErrorHandler {
3336 const product = ProductNames . get ( Product . jupyter ) ;
3437
3538 if ( installer && product ) {
39+ sendTelemetryEvent ( Telemetry . UserInstalledJupyter ) ;
3640 installer . installModule ( product )
3741 . catch ( e => this . applicationShell . showErrorMessage ( e . message , localize . DataScience . pythonInteractiveHelpLink ( ) ) ) ;
3842 } else if ( installers [ 0 ] && product ) {
3943 installers [ 0 ] . installModule ( product )
4044 . catch ( e => this . applicationShell . showErrorMessage ( e . message , localize . DataScience . pythonInteractiveHelpLink ( ) ) ) ;
4145 }
4246 }
47+ } else if ( response === localize . DataScience . notebookCheckForImportNo ( ) ) {
48+ sendTelemetryEvent ( Telemetry . UserDidNotInstallJupyter ) ;
4349 } else if ( response === err . actionTitle ) {
4450 // This is a special error that shows a link to open for more help
4551 this . applicationShell . openUrl ( err . action ) ;
0 commit comments