From dc496e9c8f2c3eafe69b625d3a1b71a38b1beaa5 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 22 Jun 2022 11:09:53 -0700 Subject: [PATCH 1/6] src/commands as typing docs --- src/{platform/common/application => }/commands.ts | 12 ++++++------ src/interactive-window/commands/commandRegistry.ts | 2 +- src/platform/common/application/commandManager.ts | 2 +- src/platform/common/application/types.ts | 2 +- src/platform/common/types.ts | 2 +- src/standalone/import-export/exportCommands.ts | 2 +- src/test/datascience/mockCommandManager.ts | 2 +- .../dataviewer/dataViewerCommandRegistry.ts | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) rename src/{platform/common/application => }/commands.ts (95%) diff --git a/src/platform/common/application/commands.ts b/src/commands.ts similarity index 95% rename from src/platform/common/application/commands.ts rename to src/commands.ts index 1cd23831e59..e2998f3a711 100644 --- a/src/platform/common/application/commands.ts +++ b/src/commands.ts @@ -13,12 +13,12 @@ import { Uri, ViewColumn } from 'vscode'; -import { IShowDataViewerFromVariablePanel } from '../../messageTypes'; -import { Commands as DSCommands } from '../../../platform/common/constants'; -import { PythonEnvironment } from '../../pythonEnvironments/info'; -import { CommandSource } from '../../testing/common/constants'; -import { Channel } from './types'; -import { SelectJupyterUriCommandSource } from '../../../kernels/jupyter/serverSelector'; +import { IShowDataViewerFromVariablePanel } from './platform/messageTypes'; +import { Commands as DSCommands } from './platform/common/constants'; +import { PythonEnvironment } from './platform/pythonEnvironments/info'; +import { CommandSource } from './platform/testing/common/constants'; +import { Channel } from './platform/common/application/types'; +import { SelectJupyterUriCommandSource } from './kernels/jupyter/serverSelector'; export type CommandsWithoutArgs = keyof ICommandNameWithoutArgumentTypeMapping; diff --git a/src/interactive-window/commands/commandRegistry.ts b/src/interactive-window/commands/commandRegistry.ts index c3dccfe49ea..48d4ef7b815 100644 --- a/src/interactive-window/commands/commandRegistry.ts +++ b/src/interactive-window/commands/commandRegistry.ts @@ -6,7 +6,7 @@ import { inject, injectable, optional } from 'inversify'; import { CodeLens, ConfigurationTarget, env, Range, Uri, commands } from 'vscode'; import { IKernelProvider } from '../../kernels/types'; -import { ICommandNameArgumentTypeMapping } from '../../platform/common/application/commands'; +import { ICommandNameArgumentTypeMapping } from '../../commands'; import { IApplicationShell, ICommandManager, diff --git a/src/platform/common/application/commandManager.ts b/src/platform/common/application/commandManager.ts index 4bc1e68d910..6f56ae8ab7f 100644 --- a/src/platform/common/application/commandManager.ts +++ b/src/platform/common/application/commandManager.ts @@ -7,7 +7,7 @@ import { injectable } from 'inversify'; import { commands, Disposable, TextEditor, TextEditorEdit } from 'vscode'; import { sendTelemetryEvent } from '../../../telemetry'; import { Telemetry } from '../constants'; -import { ICommandNameArgumentTypeMapping } from './commands'; +import { ICommandNameArgumentTypeMapping } from '../../../commands'; import { ICommandManager } from './types'; // This contains a list of commands to be ignored when sending telemetry in the command handler. diff --git a/src/platform/common/application/types.ts b/src/platform/common/application/types.ts index f1b79ea0882..9aed13ff3fa 100644 --- a/src/platform/common/application/types.ts +++ b/src/platform/common/application/types.ts @@ -72,7 +72,7 @@ import { } from 'vscode'; import { IAsyncDisposable, Resource } from '../types'; -import { ICommandNameArgumentTypeMapping } from './commands'; +import { ICommandNameArgumentTypeMapping } from '../../../commands'; /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ diff --git a/src/platform/common/types.ts b/src/platform/common/types.ts index d14b66569ba..ae2b937c9d1 100644 --- a/src/platform/common/types.ts +++ b/src/platform/common/types.ts @@ -5,7 +5,7 @@ import type * as nbformat from '@jupyterlab/nbformat'; import { ConfigurationTarget, Disposable, Event, Extension, ExtensionContext, OutputChannel, Uri, Range } from 'vscode'; import { PythonEnvironment } from '../pythonEnvironments/info'; -import { CommandsWithoutArgs } from './application/commands'; +import { CommandsWithoutArgs } from '../../commands'; import { ICommandManager } from './application/types'; import { Experiments } from './experiments/groups'; import { ISystemVariables } from './variables/types'; diff --git a/src/standalone/import-export/exportCommands.ts b/src/standalone/import-export/exportCommands.ts index 9d11db9a501..5ae94cf9aee 100644 --- a/src/standalone/import-export/exportCommands.ts +++ b/src/standalone/import-export/exportCommands.ts @@ -5,7 +5,7 @@ import { NotebookDocument, QuickPickItem, QuickPickOptions, Uri } from 'vscode'; import { getLocString } from '../../webviews/webview-side/react-common/locReactSide'; -import { ICommandNameArgumentTypeMapping } from '../../platform/common/application/commands'; +import { ICommandNameArgumentTypeMapping } from '../../commands'; import { IApplicationShell, ICommandManager, IVSCodeNotebook } from '../../platform/common/application/types'; import { traceInfo } from '../../platform/logging'; import { IDisposable } from '../../platform/common/types'; diff --git a/src/test/datascience/mockCommandManager.ts b/src/test/datascience/mockCommandManager.ts index 29730d0cdcd..6c9c481d867 100644 --- a/src/test/datascience/mockCommandManager.ts +++ b/src/test/datascience/mockCommandManager.ts @@ -3,7 +3,7 @@ 'use strict'; import { Disposable, TextEditor, TextEditorEdit } from 'vscode'; -import { ICommandNameArgumentTypeMapping } from '../../platform/common/application/commands'; +import { ICommandNameArgumentTypeMapping } from '../../commands'; import { ICommandManager } from '../../platform/common/application/types'; import { noop } from '../core'; diff --git a/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts b/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts index 087bbfdf358..b71e98cbdc6 100644 --- a/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts +++ b/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts @@ -9,7 +9,7 @@ import { DebugProtocol } from 'vscode-debugprotocol'; import { convertDebugProtocolVariableToIJupyterVariable } from '../../../kernels/variables/helpers'; import { IJupyterVariables } from '../../../kernels/variables/types'; import { IExtensionSingleActivationService } from '../../../platform/activation/types'; -import { ICommandNameArgumentTypeMapping } from '../../../platform/common/application/commands'; +import { ICommandNameArgumentTypeMapping } from '../../../commands'; import { IApplicationShell, ICommandManager, From 437669e1a2c45fba1696478b3dece4645bee7a75 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 22 Jun 2022 11:19:18 -0700 Subject: [PATCH 2/6] telemetryTypes --- .../installer/productInstaller.node.ts | 2 +- .../telemetry/sendKernelTelemetryEvent.ts | 2 +- .../telemetry/interpreterPackageTracker.ts | 2 +- src/platform/terminals/types.ts | 2 +- src/telemetry/index.ts | 2 +- src/telemetry/interpreterPackages.node.ts | 2 +- src/telemetry/interpreterPackages.web.ts | 2 +- src/telemetry/serviceRegistry.node.ts | 2 +- src/telemetry/serviceRegistry.web.ts | 2 +- src/telemetry/startupTelemetry.ts | 2 +- src/telemetry/telemetry.ts | 2 +- src/{telemetry/types.ts => telemetryTypes.ts} | 24 +++++++++---------- 12 files changed, 23 insertions(+), 23 deletions(-) rename src/{telemetry/types.ts => telemetryTypes.ts} (98%) diff --git a/src/kernels/installer/productInstaller.node.ts b/src/kernels/installer/productInstaller.node.ts index 60f75f0c39c..4976e42f1ea 100644 --- a/src/kernels/installer/productInstaller.node.ts +++ b/src/kernels/installer/productInstaller.node.ts @@ -34,7 +34,7 @@ import { getInterpreterHash } from '../../platform/pythonEnvironments/info/inter import { STANDARD_OUTPUT_CHANNEL } from '../../platform/common/constants'; import { sleep } from '../../platform/common/utils/async'; import { trackPackageInstalledIntoInterpreter } from './productInstaller'; -import { IInterpreterPackages } from '../../telemetry/types'; +import { IInterpreterPackages } from '../../telemetryTypes'; import { translateProductToModule } from './utils'; export async function isModulePresentInEnvironment(memento: Memento, product: Product, interpreter: PythonEnvironment) { diff --git a/src/kernels/telemetry/sendKernelTelemetryEvent.ts b/src/kernels/telemetry/sendKernelTelemetryEvent.ts index ade145eb3f1..0ddc63b21c8 100644 --- a/src/kernels/telemetry/sendKernelTelemetryEvent.ts +++ b/src/kernels/telemetry/sendKernelTelemetryEvent.ts @@ -1,5 +1,5 @@ import { Resource } from '../../platform/common/types'; -import { IEventNamePropertyMapping } from '../../telemetry/types'; +import { IEventNamePropertyMapping } from '../../telemetryTypes'; import { Telemetry } from '../../platform/common/constants'; import { setSharedProperty, sendTelemetryEvent, waitBeforeSending } from '../../telemetry'; import { getContextualPropsForTelemetry } from '../../telemetry/telemetry'; diff --git a/src/notebooks/telemetry/interpreterPackageTracker.ts b/src/notebooks/telemetry/interpreterPackageTracker.ts index 406270b7a4c..f9e87ff3404 100644 --- a/src/notebooks/telemetry/interpreterPackageTracker.ts +++ b/src/notebooks/telemetry/interpreterPackageTracker.ts @@ -12,7 +12,7 @@ import { INotebookControllerManager } from '../types'; import { IInstaller, Product } from '../../kernels/installer/types'; import { IVSCodeNotebookController } from '../controllers/types'; import { trackKernelResourceInformation } from '../../kernels/telemetry/helper'; -import { IInterpreterPackages } from '../../telemetry/types'; +import { IInterpreterPackages } from '../../telemetryTypes'; @injectable() export class InterpreterPackageTracker implements IExtensionSingleActivationService { diff --git a/src/platform/terminals/types.ts b/src/platform/terminals/types.ts index 9614d50bccc..43774e83cb1 100644 --- a/src/platform/terminals/types.ts +++ b/src/platform/terminals/types.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { Terminal, TextEditor, Uri } from 'vscode'; -import { IEventNamePropertyMapping } from '../../telemetry/types'; +import { IEventNamePropertyMapping } from '../../telemetryTypes'; import { Resource } from '../common/types'; export const ICodeExecutionService = Symbol('ICodeExecutionService'); diff --git a/src/telemetry/index.ts b/src/telemetry/index.ts index 156b9a2450f..da6dd62714c 100644 --- a/src/telemetry/index.ts +++ b/src/telemetry/index.ts @@ -10,7 +10,7 @@ import { StopWatch } from '../platform/common/utils/stopWatch'; import { noop } from '../platform/common/utils/misc'; import { isPromise } from 'rxjs/internal-compatibility'; import { populateTelemetryWithErrorInfo } from '../platform/errors'; -import { IEventNamePropertyMapping } from './types'; +import { IEventNamePropertyMapping } from '../telemetryTypes'; /** * TODO@rebornix diff --git a/src/telemetry/interpreterPackages.node.ts b/src/telemetry/interpreterPackages.node.ts index ea0d312221a..feb70678950 100644 --- a/src/telemetry/interpreterPackages.node.ts +++ b/src/telemetry/interpreterPackages.node.ts @@ -11,7 +11,7 @@ import { IInterpreterService } from '../platform/interpreter/contracts'; import { PythonEnvironment } from '../platform/pythonEnvironments/info'; import { getComparisonKey } from '../platform/vscode-path/resources'; import { getTelemetrySafeHashedString, getTelemetrySafeVersion } from './helpers'; -import { IInterpreterPackages } from './types'; +import { IInterpreterPackages } from '../telemetryTypes'; const interestedPackages = new Set( [ diff --git a/src/telemetry/interpreterPackages.web.ts b/src/telemetry/interpreterPackages.web.ts index e0a0b314574..11192325b3a 100644 --- a/src/telemetry/interpreterPackages.web.ts +++ b/src/telemetry/interpreterPackages.web.ts @@ -4,7 +4,7 @@ import { injectable } from 'inversify'; import { InterpreterUri } from '../platform/common/types'; import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { IInterpreterPackages } from './types'; +import { IInterpreterPackages } from '../telemetryTypes'; /** * Tracks packages in use for interpreters. In the web version this isn't implemented yet. diff --git a/src/telemetry/serviceRegistry.node.ts b/src/telemetry/serviceRegistry.node.ts index 35402628fee..b5b9c31b63d 100644 --- a/src/telemetry/serviceRegistry.node.ts +++ b/src/telemetry/serviceRegistry.node.ts @@ -8,7 +8,7 @@ import { IServiceManager } from '../platform/ioc/types'; import { InterpreterCountTracker } from './interpreterCountTracker'; import { InterpreterPackages } from './interpreterPackages.node'; import { WorkspaceInterpreterTracker } from './workspaceInterpreterTracker'; -import { IInterpreterPackages } from './types'; +import { IInterpreterPackages } from '../telemetryTypes'; export function registerTypes(serviceManager: IServiceManager) { serviceManager.addSingleton(IInterpreterPackages, InterpreterPackages); diff --git a/src/telemetry/serviceRegistry.web.ts b/src/telemetry/serviceRegistry.web.ts index 2d497c0c055..8c5c79a989f 100644 --- a/src/telemetry/serviceRegistry.web.ts +++ b/src/telemetry/serviceRegistry.web.ts @@ -7,7 +7,7 @@ import { IExtensionSingleActivationService, IExtensionSyncActivationService } fr import { IServiceManager } from '../platform/ioc/types'; import { InterpreterCountTracker } from './interpreterCountTracker'; import { WorkspaceInterpreterTracker } from './workspaceInterpreterTracker'; -import { IInterpreterPackages } from './types'; +import { IInterpreterPackages } from '../telemetryTypes'; import { InterpreterPackages } from './interpreterPackages.web'; export function registerTypes(serviceManager: IServiceManager) { diff --git a/src/telemetry/startupTelemetry.ts b/src/telemetry/startupTelemetry.ts index 976b670d465..69dab4dd81d 100644 --- a/src/telemetry/startupTelemetry.ts +++ b/src/telemetry/startupTelemetry.ts @@ -7,7 +7,7 @@ import { traceError } from '../platform/logging'; import { IServiceContainer } from '../platform/ioc/types'; import { sendTelemetryEvent } from '.'; import { EventName } from './constants'; -import { IEventNamePropertyMapping } from './types'; +import { IEventNamePropertyMapping } from '../telemetryTypes'; interface IStopWatch { elapsedTime: number; diff --git a/src/telemetry/telemetry.ts b/src/telemetry/telemetry.ts index c9b5aed5bfa..f7ebfe2b0e0 100644 --- a/src/telemetry/telemetry.ts +++ b/src/telemetry/telemetry.ts @@ -5,7 +5,7 @@ import cloneDeep = require('lodash/cloneDeep'); import { Uri } from 'vscode'; import { Resource } from '../platform/common/types'; -import { IInterpreterPackages, ResourceSpecificTelemetryProperties } from './types'; +import { IInterpreterPackages, ResourceSpecificTelemetryProperties } from '../telemetryTypes'; import { getTelemetrySafeHashedString } from './helpers'; import { PythonEnvironment } from '../platform/pythonEnvironments/info'; import { createDeferred } from '../platform/common/utils/async'; diff --git a/src/telemetry/types.ts b/src/telemetryTypes.ts similarity index 98% rename from src/telemetry/types.ts rename to src/telemetryTypes.ts index 48b93a5cc88..22441d3d06e 100644 --- a/src/telemetry/types.ts +++ b/src/telemetryTypes.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; -import { InterpreterUri } from '../platform/common/types'; +import { InterpreterUri } from './platform/common/types'; import type { JSONObject } from '@lumino/coreutils'; // eslint-disable-next-line import { @@ -11,17 +11,17 @@ import { NativeMouseCommandTelemetry, Telemetry, VSCodeNativeTelemetry -} from '../platform/common/constants'; -import { CheckboxState, EventName, PlatformErrors, SliceOperationSource } from './constants'; -import { DebuggingTelemetry } from '../kernels/debugger/constants'; -import { EnvironmentType, PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { TelemetryErrorProperties, ErrorCategory } from '../platform/errors/types'; -import { ExportFormat } from '../notebooks/export/types'; -import { InterruptResult, KernelConnectionMetadata, KernelInterpreterDependencyResponse } from '../kernels/types'; -import { IExportedKernelService } from '../standalone/api/extension'; -import { PreferredKernelExactMatchReason } from '../notebooks/controllers/notebookControllerManager'; -import { SelectJupyterUriCommandSource } from '../kernels/jupyter/serverSelector'; -import { TerminalShellType } from '../platform/terminals/types'; +} from './platform/common/constants'; +import { CheckboxState, EventName, PlatformErrors, SliceOperationSource } from './telemetry/constants'; +import { DebuggingTelemetry } from './kernels/debugger/constants'; +import { EnvironmentType, PythonEnvironment } from './platform/pythonEnvironments/info'; +import { TelemetryErrorProperties, ErrorCategory } from './platform/errors/types'; +import { ExportFormat } from './notebooks/export/types'; +import { InterruptResult, KernelConnectionMetadata, KernelInterpreterDependencyResponse } from './kernels/types'; +import { IExportedKernelService } from './standalone/api/extension'; +import { PreferredKernelExactMatchReason } from './notebooks/controllers/notebookControllerManager'; +import { SelectJupyterUriCommandSource } from './kernels/jupyter/serverSelector'; +import { TerminalShellType } from './platform/terminals/types'; export type ResourceSpecificTelemetryProperties = Partial<{ resourceType: 'notebook' | 'interactive'; From 0dac7c9009ef0032827a5269c9f0f4358182a221 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 22 Jun 2022 11:44:29 -0700 Subject: [PATCH 3/6] telemetry typings as top component and helpers moved into platform --- TELEMETRY.md | 9645 ----------------- src/extension.node.ts | 8 +- src/extension.web.ts | 6 +- src/kernels/helpers.ts | 2 +- .../installer/productInstaller.node.ts | 4 +- .../ipywidgets/baseIPyWidgetScriptManager.ts | 2 +- .../ipywidgets/commonMessageCoordinator.ts | 2 +- .../ipyWidgetScriptSourceProvider.ts | 2 +- .../localIPyWidgetScriptManager.node.ts | 2 +- .../jupyterCellOutputMimeTypeTracker.node.ts | 2 +- src/kernels/kernelDependencyService.node.ts | 2 +- src/kernels/raw/finder/helper.ts | 2 +- src/kernels/telemetry/helper.ts | 8 +- .../telemetry/sendKernelTelemetryEvent.ts | 5 +- .../controllers/notebookControllerManager.ts | 2 +- .../telemetry/interpreterPackageTracker.ts | 2 +- .../notebookOrKernelLanguageTelemetry.ts | 2 +- src/platform/common/experiments/service.ts | 2 +- .../common/platform/platformService.node.ts | 2 +- .../environmentActivationService.node.ts | 2 +- .../process/pythonExecutionFactory.node.ts | 2 +- src/platform/common/serviceRegistry.node.ts | 2 +- .../common/variables/environment.node.ts | 2 +- .../environmentVariablesProvider.node.ts | 2 +- src/platform/errors/index.ts | 2 +- src/{ => platform}/telemetry/constants.ts | 0 .../telemetry/envFileTelemetry.node.ts | 8 +- .../extensionInstallTelemetry.node.ts | 6 +- src/{ => platform}/telemetry/helpers.ts | 4 +- src/{ => platform}/telemetry/index.ts | 16 +- .../telemetry/interpreterCountTracker.ts | 10 +- .../telemetry/interpreterPackages.node.ts | 18 +- .../telemetry/interpreterPackages.web.ts | 6 +- .../telemetry/languageInitializer.ts | 6 +- .../telemetry/serviceRegistry.node.ts | 6 +- .../telemetry/serviceRegistry.web.ts | 6 +- .../telemetry/startupTelemetry.ts | 10 +- src/{ => platform}/telemetry/telemetry.ts | 14 +- .../telemetry/workspaceInterpreterTracker.ts | 14 +- src/platform/terminals/types.ts | 2 +- .../activation/workspaceActivation.node.ts | 2 +- .../import-export/importTracker.node.ts | 4 +- src/{telemetryTypes.ts => telemetry.ts} | 4 +- .../common/experiments/service.unit.test.ts | 2 +- ...yWidgetScriptManager.vscode.common.test.ts | 2 +- .../installer/productPath.unit.test.ts | 2 +- src/test/telemetry/importTracker.unit.test.ts | 4 +- .../extension-side/dataviewer/dataViewer.ts | 2 +- .../dataviewer/dataViewerCommandRegistry.ts | 2 +- .../extension-side/dataviewer/types.ts | 2 +- .../data-explorer/sliceControl.tsx | 2 +- 51 files changed, 112 insertions(+), 9756 deletions(-) rename src/{ => platform}/telemetry/constants.ts (100%) rename src/{ => platform}/telemetry/envFileTelemetry.node.ts (88%) rename src/{ => platform}/telemetry/extensionInstallTelemetry.node.ts (88%) rename src/{ => platform}/telemetry/helpers.ts (93%) rename src/{ => platform}/telemetry/index.ts (97%) rename src/{ => platform}/telemetry/interpreterCountTracker.ts (84%) rename src/{ => platform}/telemetry/interpreterPackages.node.ts (91%) rename src/{ => platform}/telemetry/interpreterPackages.web.ts (79%) rename src/{ => platform}/telemetry/languageInitializer.ts (78%) rename src/{ => platform}/telemetry/serviceRegistry.node.ts (83%) rename src/{ => platform}/telemetry/serviceRegistry.web.ts (83%) rename src/{ => platform}/telemetry/startupTelemetry.ts (87%) rename src/{ => platform}/telemetry/telemetry.ts (91%) rename src/{ => platform}/telemetry/workspaceInterpreterTracker.ts (84%) rename src/{telemetryTypes.ts => telemetry.ts} (99%) diff --git a/TELEMETRY.md b/TELEMETRY.md index 76126e523d6..a32e6eb1106 100644 --- a/TELEMETRY.md +++ b/TELEMETRY.md @@ -2,9648 +2,3 @@ Expand each section to see more information about that event. -
- DATASCIENCE.ADD_CELL_BELOW - -## Description - - - - Data Science - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/commands/commandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/commands/commandRegistry.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.AddCellBelow) - private async addCellBelow(): Promise { - await this.getCurrentCodeWatcher()?.addEmptyCellToBottom(); - } -``` - -
-
- DATASCIENCE.CLICKED_EXPORT_NOTEBOOK_AS_QUICK_PICK - -## Description - - -No description provided - -## Properties - -- format: ExportFormat - -## Locations Used - -[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) -```typescript - if (pickedItem !== undefined) { - pickedItem.handler(); - } else { - sendTelemetryEvent(Telemetry.ClickedExportNotebookAsQuickPick); - } - } - } -``` - - -[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) -```typescript - label: DataScience.exportPythonQuickPickLabel(), - picked: true, - handler: () => { - sendTelemetryEvent(Telemetry.ClickedExportNotebookAsQuickPick, undefined, { - format: ExportFormat.python - }); - this.commandManager -``` - - -[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) -```typescript - label: DataScience.exportHTMLQuickPickLabel(), - picked: false, - handler: () => { - sendTelemetryEvent(Telemetry.ClickedExportNotebookAsQuickPick, undefined, { - format: ExportFormat.html - }); - this.commandManager -``` - - -[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) -```typescript - label: DataScience.exportPDFQuickPickLabel(), - picked: false, - handler: () => { - sendTelemetryEvent(Telemetry.ClickedExportNotebookAsQuickPick, undefined, { - format: ExportFormat.pdf - }); - this.commandManager -``` - -
-
- DATASCIENCE.COLLAPSE_ALL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.COPY_SOURCE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.CREATE_NEW_INTERACTIVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.CreateNewInteractive, undefined, false) - private async createNewInteractiveWindow(connection?: KernelConnectionMetadata): Promise { - await this.interactiveWindowProvider.getOrCreate(undefined, connection); - } -``` - -
-
- DATASCIENCE.DATA_VIEWER_DATA_DIMENSIONALITY - -## Description - - - - - Telemetry event sent when a slice is first applied in a - data viewer instance to a sliceable Python variable. - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) -```typescript - - private maybeSendSliceDataDimensionalityTelemetry(numberOfDimensions: number) { - if (!this.sentDataViewerSliceDimensionalityTelemetry) { - sendTelemetryEvent(Telemetry.DataViewerDataDimensionality, undefined, { numberOfDimensions }); - this.sentDataViewerSliceDimensionalityTelemetry = true; - } - } -``` - -
-
- DATASCIENCE.DATA_VIEWER_SLICE_ENABLEMENT_STATE_CHANGED - -## Description - - - - - Telemetry event sent whenever the user toggles the checkbox - controlling whether a slice is currently being applied to an - n-dimensional variable. - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) -```typescript - break; - - case DataViewerMessages.SliceEnablementStateChanged: - void sendTelemetryEvent(Telemetry.DataViewerSliceEnablementStateChanged, undefined, { - newState: payload.newState ? CheckboxState.Checked : CheckboxState.Unchecked - }); - break; -``` - -
-
- DATASCIENCE.DATA_VIEWER_SLICE_OPERATION - -## Description - - - - - Telemetry event sent whenever the user applies a valid slice - to a sliceable Python variable in the data viewer. - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) -```typescript - if (payload.shape?.length) { - this.maybeSendSliceDataDimensionalityTelemetry(payload.shape.length); - } - sendTelemetryEvent(Telemetry.DataViewerSliceOperation, undefined, { source: request.source }); - return this.postMessage(DataViewerMessages.InitializeData, payload); - } - }); -``` - -
-
- DATASCIENCE.DEBUG_CONTINUE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/commands/commandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/commands/commandRegistry.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.DebugContinue) - private async debugContinue(): Promise { - // Make sure that we are in debug mode - if (this.debugService?.activeDebugSession) { -``` - -
-
- DATASCIENCE.DEBUG_CURRENT_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - return this.codeLenses; - } - - @captureTelemetry(Telemetry.DebugCurrentCell) - public async debugCurrentCell() { - if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { - return; -``` - - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - return this.runMatchingCell(range, advance); - } - - @captureTelemetry(Telemetry.DebugCurrentCell) - public async debugCell(range: Range): Promise { - if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { - return; -``` - -
-
- DATASCIENCE.DEBUG_FILE_INTERACTIVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - return this.runFileInteractiveInternal(false); - } - - @captureTelemetry(Telemetry.DebugFileInteractive) - public async debugFileInteractive() { - return this.runFileInteractiveInternal(true); - } -``` - -
-
- DATASCIENCE.DEBUG_STEP_OVER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/commands/commandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/commands/commandRegistry.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.DebugStepOver) - private async debugStepOver(): Promise { - // Make sure that we are in debug mode - if (this.debugService?.activeDebugSession) { -``` - -
-
- DATASCIENCE.DEBUG_STOP - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/commands/commandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/commands/commandRegistry.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.DebugStop) - private async debugStop(uri: Uri): Promise { - // Make sure that we are in debug mode - if (this.debugService?.activeDebugSession && this.interactiveWindowProvider) { -``` - -
-
- DATASCIENCE.DEBUGGING.CLICKED_ON_SETUP - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) -```typescript - ); - - if (response === DataScience.setup()) { - sendTelemetryEvent(DebuggingTelemetry.clickedOnSetup); - this.appShell.openUrl( - 'https://github.com/microsoft/vscode-jupyter/wiki/Setting-Up-Run-by-Line-and-Debugging-for-Notebooks' - ); -``` - -
-
- DATASCIENCE.DEBUGGING.CLICKED_RUN_AND_DEBUG_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/debugger/debuggingManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManager.ts) -```typescript - }), - - this.commandManager.registerCommand(DSCommands.RunAndDebugCell, async (cell: NotebookCell | undefined) => { - sendTelemetryEvent(DebuggingTelemetry.clickedRunAndDebugCell); - const editor = this.vscNotebook.activeNotebookEditor; - if (!cell) { - const range = editor?.selections[0]; -``` - -
-
- DATASCIENCE.DEBUGGING.CLICKED_RUNBYLINE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/debugger/debuggingManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManager.ts) -```typescript - }), - - this.commandManager.registerCommand(DSCommands.RunByLine, async (cell: NotebookCell | undefined) => { - sendTelemetryEvent(DebuggingTelemetry.clickedRunByLine); - const editor = this.vscNotebook.activeNotebookEditor; - if (!cell) { - const range = editor?.selections[0]; -``` - -
-
- DATASCIENCE.DEBUGGING.CLOSED_MODAL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) -```typescript - 'https://github.com/microsoft/vscode-jupyter/wiki/Setting-Up-Run-by-Line-and-Debugging-for-Notebooks' - ); - } else { - sendTelemetryEvent(DebuggingTelemetry.closedModal); - } - } -} -``` - -
-
- DATASCIENCE.DEBUGGING.ENDED_SESSION - -## Description - - -No description provided - -## Properties - -- - reason: 'normally' | 'onKernelDisposed' | 'onAnInterrupt' | 'onARestart' | 'withKeybinding'; - -## Locations Used - -[src/kernels/debugger/kernelDebugAdapterBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/debugger/kernelDebugAdapterBase.ts) -```typescript - this.kernel.onDisposed(() => { - debug.stopDebugging(this.session).then(noop, noop); - this.endSession.fire(this.session); - sendTelemetryEvent(DebuggingTelemetry.endedSession, undefined, { reason: 'onKernelDisposed' }); - }) - ); - } -``` - - -[src/kernels/debugger/kernelDebugAdapterBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/debugger/kernelDebugAdapterBase.ts) -```typescript - cellStateChange.state === NotebookCellExecutionState.Idle && - !this.disconnected - ) { - sendTelemetryEvent(DebuggingTelemetry.endedSession, undefined, { reason: 'normally' }); - this.disconnect().ignoreErrors(); - } - }, -``` - - -[src/notebooks/debugger/debuggingManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManager.ts) -```typescript - if (editor) { - const controller = this.notebookToRunByLineController.get(editor.notebook); - if (controller) { - sendTelemetryEvent(DebuggingTelemetry.endedSession, undefined, { - reason: 'withKeybinding' - }); - controller.stop(); -``` - -
-
- DATASCIENCE.DEBUGGING.IPYKERNEL6_STATUS - -## Description - - -No description provided - -## Properties - -- - status: 'installed' | 'notInstalled'; - -## Locations Used - -[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) -```typescript - } - - const result = await isUsingIpykernel6OrLater(kernel); - sendTelemetryEvent(DebuggingTelemetry.ipykernel6Status, undefined, { - status: result === IpykernelCheckResult.Ok ? 'installed' : 'notInstalled' - }); - return result; -``` - -
-
- DATASCIENCE.DEBUGGING.SUCCESSFULLY_STARTED_IW_JUPYTER - -## Description - - - - - Telemetry sent when we have managed to successfully start the Interactive Window debugger using the Jupyter protocol. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.DEBUGGING.SUCCESSFULLY_STARTED_RUN_AND_DEBUG_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/debugger/debugCellControllers.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debugCellControllers.ts) -```typescript - private readonly kernel: IKernel, - private readonly commandManager: ICommandManager - ) { - sendTelemetryEvent(DebuggingTelemetry.successfullyStartedRunAndDebugCell); - } - - public async willSendEvent(_msg: DebugProtocolMessage): Promise { -``` - - -[src/interactive-window/debugger/jupyter/debugCellControllers.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/jupyter/debugCellControllers.ts) -```typescript - public readonly debugCell: NotebookCell, - private readonly kernel: IKernel - ) { - sendTelemetryEvent(DebuggingTelemetry.successfullyStartedRunAndDebugCell); - } - - public async willSendEvent(_msg: DebugProtocolMessage): Promise { -``` - -
-
- DATASCIENCE.DEBUGGING.SUCCESSFULLY_STARTED_RUNBYLINE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/debugger/runByLineController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/runByLineController.ts) -```typescript - private readonly kernel: IKernel, - private readonly settings: IConfigurationService - ) { - sendTelemetryEvent(DebuggingTelemetry.successfullyStartedRunByLine); - } - - public continue(): void { -``` - -
-
- DATASCIENCE.DEBUGPY_INSTALL_CANCELLED - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.DEBUGPY_INSTALL_FAILED - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.DEBUGPY_PROMPT_TO_INSTALL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.DEBUGPY_SUCCESSFULLY_INSTALLED - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.DELETE_ALL_CELLS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.DELETE_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.DISABLE_INTERACTIVE_SHIFT_ENTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/shiftEnterBanner.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/shiftEnterBanner.ts) -```typescript - ); - } - - @captureTelemetry(Telemetry.DisableInteractiveShiftEnter) - public async disableInteractiveShiftEnter(): Promise { - await this.configuration.updateSetting( - 'sendSelectionToInteractiveWindow', -``` - - -[src/test/datascience/shiftEnterBanner.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/shiftEnterBanner.unit.test.ts) -```typescript - - expect(Reporter.eventNames).to.deep.equal([ - Telemetry.ShiftEnterBannerShown, - Telemetry.DisableInteractiveShiftEnter - ]); - }); -}); -``` - -
-
- DATASCIENCE.ENABLE_INTERACTIVE_SHIFT_ENTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/shiftEnterBanner.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/shiftEnterBanner.ts) -```typescript - await this.disableBanner(); - } - - @captureTelemetry(Telemetry.EnableInteractiveShiftEnter) - public async enableInteractiveShiftEnter(): Promise { - await this.configuration.updateSetting( - 'sendSelectionToInteractiveWindow', -``` - - -[src/test/datascience/shiftEnterBanner.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/shiftEnterBanner.unit.test.ts) -```typescript - - expect(Reporter.eventNames).to.deep.equal([ - Telemetry.ShiftEnterBannerShown, - Telemetry.EnableInteractiveShiftEnter - ]); - }); - -``` - -
-
- DATASCIENCE.ENTER_JUPYTER_URI - -## Description - - - - - Captures the telemetry when the Uri is manually entered by the user as part of the workflow when selecting a Kernel. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - return multiStep.run(this.startSelectingURI.bind(this, allowLocal), {}); - } - - @captureTelemetry(Telemetry.EnterJupyterURI) - @traceDecoratorError('Failed to enter Jupyter Uri') - public async enterJupyterURI(): Promise { - let initialValue = defaultUri; -``` - -
-
- DATASCIENCE.EXECUTE_CELL - -## Description - - - - Applies to everything (interactive+Notebooks & local+remote) - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript - properties?: P[E] & { waitBeforeSending?: Promise }, - ex?: Error -) { - if (eventName === Telemetry.ExecuteCell) { - setSharedProperty('userExecutedCell', 'true'); - } - -``` - - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript - stopWatch?: StopWatch, - properties?: P[E] & { [waitBeforeSending]?: Promise } -) { - if (eventName === Telemetry.ExecuteCell) { - setSharedProperty('userExecutedCell', 'true'); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any -``` - - -[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) -```typescript - return; - } - initializeInteractiveOrNotebookTelemetryBasedOnUserAction(notebook.uri, this.connection); - sendKernelTelemetryEvent(notebook.uri, Telemetry.ExecuteCell); - // Notebook is trusted. Continue to execute cells - await Promise.all(cells.map((cell) => this.executeCell(notebook, cell))); - } -``` - - -[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) -```typescript - } - public async executeCell(cell: NotebookCell, codeOverride?: string): Promise { - traceCellMessage(cell, `kernel.executeCell, ${getDisplayPath(cell.notebook.uri)}`); - sendKernelTelemetryEvent(this.resourceUri, Telemetry.ExecuteCell); - const stopWatch = new StopWatch(); - const sessionPromise = this.startJupyterSession(); - const promise = this.kernelExecution.executeCell(sessionPromise, cell, codeOverride); -``` - - -[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) -```typescript - }; - - // Right now this is the guaranteed list. Might want to expand this. - assertEvent(Telemetry.ExecuteCell); - assertEvent(Telemetry.OpenNotebookAll); - assertEvent(Telemetry.NotebookStart); - }); -``` - -
-
- DATASCIENCE.EXECUTE_CELL_TIME - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.EXPAND_ALL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.EXPORT_NOTEBOOK - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.EXPORT_NOTEBOOK_AS - -## Description - - -No description provided - -## Properties - -- format: ExportFormat; -- cancelled?: boolean; -- successful?: boolean; -- opened?: boolean - -## Locations Used - -[src/notebooks/export/exportFileOpener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/export/exportFileOpener.ts) -```typescript - public async openFile(format: ExportFormat, uri: Uri, openDirectly: boolean = false) { - if (format === ExportFormat.python) { - await this.openPythonFile(uri, openDirectly); - sendTelemetryEvent(Telemetry.ExportNotebookAs, undefined, { - format: format, - successful: true, - opened: true -``` - - -[src/notebooks/export/exportFileOpener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/export/exportFileOpener.ts) -```typescript - }); - } else { - const opened = await this.askOpenFile(uri, openDirectly); - sendTelemetryEvent(Telemetry.ExportNotebookAs, undefined, { - format: format, - successful: true, - opened: opened -``` - - -[src/notebooks/export/fileConverter.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/export/fileConverter.ts) -```typescript - } - - if (reporter.token.isCancellationRequested) { - sendTelemetryEvent(Telemetry.ExportNotebookAs, undefined, { format: format, cancelled: true }); - return; - } - } -``` - -
-
- DATASCIENCE.EXPORT_NOTEBOOK_AS_COMMAND - -## Description - - -No description provided - -## Properties - -- format: ExportFormat - -## Locations Used - -[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) -```typescript - this.controllers.getSelectedNotebookController(sourceDocument)?.connection.interpreter || - this.controllers.getPreferredNotebookController(sourceDocument)?.connection.interpreter; - if (exportMethod) { - sendTelemetryEvent(Telemetry.ExportNotebookAsCommand, undefined, { format: exportMethod }); - } - } - -``` - -
-
- DATASCIENCE.EXPORT_NOTEBOOK_AS_FAILED - -## Description - - -No description provided - -## Properties - -- format: ExportFormat - -## Locations Used - -[src/notebooks/export/fileConverter.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/export/fileConverter.ts) -```typescript - await this.performExport(format, sourceDocument, target, token, candidateInterpreter); - } catch (e) { - traceError('Export failed', e); - sendTelemetryEvent(Telemetry.ExportNotebookAsFailed, undefined, { format: format }); - - if (format === ExportFormat.pdf) { - traceError(localize.DataScience.exportToPDFDependencyMessage()); -``` - -
-
- DATASCIENCE.EXPORT_PYTHON_FILE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) -```typescript - return result; - } - - @captureTelemetry(Telemetry.ExportPythonFileInteractive, undefined, false) - private async exportFile(file: Uri): Promise { - const filePath = getFilePath(file); - if (filePath && filePath.length > 0 && this.jupyterExporter) { -``` - -
-
- DATASCIENCE.EXPORT_PYTHON_FILE_AND_OUTPUT - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.ExportPythonFileAndOutputInteractive, undefined, false) - private async exportFileAndOutput(file: Uri): Promise { - const filePath = getFilePath(file); - if ( -``` - -
-
- DATASCIENCE.FAILED_SHOW_DATA_EXPLORER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/variablesView/variableView.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/variablesView/variableView.ts) -```typescript - } - } catch (e) { - traceError(e); - sendTelemetryEvent(Telemetry.FailedShowDataViewer); - this.appShell.showErrorMessage(localize.DataScience.showDataViewerFail()).then(noop, noop); - } - } -``` - -
-
- DATASCIENCE.FAILED_TO_CREATE_CONTROLLER - -## Description - - - - Telemetry sent when we fail to create a Notebook Controller (an entry for the UI kernel list in Native Notebooks). - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/controllers/notebookControllerManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/notebookControllerManager.ts) -```typescript - } - // We know that this fails when we have xeus kernels installed (untill that's resolved thats one instance when we can have duplicates). - sendTelemetryEvent( - Telemetry.FailedToCreateNotebookController, - undefined, - { kind: kernelConnection.kind }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any -``` - -
-
- DATASCIENCE.FAILED_TO_FIND_INTERPRETER_KERNEL_CONNECTION_FOR_INTERACTIVE - -## Description - - - - - Telemetry sent when we're unable to find a KernelSpec connection for Interactive window that can be started usig Python interpreter. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.FETCH_CONTROLLERS - -## Description - - - - - Telemetry sent when we have loaded some controllers. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/kernelFinder.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelFinder.base.ts) -```typescript - const key = `${kind}:${useCache}`; - if (this.startTimeForFetching && !this.fetchingTelemetrySent.has(key)) { - this.fetchingTelemetrySent.add(key); - sendTelemetryEvent(Telemetry.FetchControllers, this.startTimeForFetching.elapsedTime, { - cached: useCache === 'useCache', - kind - }); -``` - -
-
- DATASCIENCE.GET_PASSWORD_ATTEMPT - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) -```typescript - this.serverUriStorage.onDidRemoveUris(this.onDidRemoveUris, this, this.disposables); - } - - @captureTelemetry(Telemetry.GetPasswordAttempt) - public getPasswordConnectionInfo(url: string): Promise { - if (!url || url.length < 1) { - return Promise.resolve(undefined); -``` - -
-
- DATASCIENCE.GOTO_NEXT_CELL_IN_FILE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - }); - } - - @captureTelemetry(Telemetry.GotoNextCellInFile) - public gotoNextCell() { - const editor = this.documentManager.activeTextEditor; - if (!editor || !editor.selection) { -``` - -
-
- DATASCIENCE.GOTO_PREV_CELL_IN_FILE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.GotoPrevCellInFile) - public gotoPreviousCell() { - const editor = this.documentManager.activeTextEditor; - if (!editor || !editor.selection) { -``` - -
-
- DATASCIENCE.GOTO_SOURCE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.IMPORT_NOTEBOOK - -## Description - - -No description provided - -## Properties - -- scope: 'command' | 'file' - -## Locations Used - -[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) -```typescript - return this.statusProvider.waitWithStatus(promise, message, undefined, canceled); - } - - @captureTelemetry(Telemetry.ImportNotebook, { scope: 'command' }, false) - private async importNotebook(): Promise { - const filtersKey = localize.DataScience.importDialogFilter(); - const filtersObject: { [name: string]: string[] } = {}; -``` - - -[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.ImportNotebook, { scope: 'file' }, false) - private async importNotebookOnFile(file: Uri): Promise { - const filepath = getFilePath(file); - if (filepath && filepath.length > 0) { -``` - -
-
- DATASCIENCE.INTERACTIVE_WINDOW_DEBUG_SETUP_CODE_FAILURE - -## Description - - -No description provided - -## Properties - -- - ename: string; -- - evalue: string; - -## Locations Used - -[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) -```typescript - executeSilently(kernel.session, this.tracingEnableCode, { - traceErrors: true, - traceErrorsMessage: 'Execute_request failure enabling tracing code for IW', - telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure - }).ignoreErrors(); - } - -``` - - -[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) -```typescript - executeSilently(kernel.session, this.tracingDisableCode, { - traceErrors: true, - traceErrorsMessage: 'Execute_request failure disabling tracing code for IW', - telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure - }).ignoreErrors(); - } - -``` - - -[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) -```typescript - const importResults = await executeSilently(kernel.session, this.waitForDebugClientCode, { - traceErrors: true, - traceErrorsMessage: 'Execute_request failure starting debug session for IW', - telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure - }); - if (importResults.some((item) => item.output_type === 'error')) { - traceWarning(`${this.debuggerPackage} not found in path.`); -``` - - -[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) -```typescript - { - traceErrors: true, - traceErrorsMessage: 'Execute_request failure appending debugger paths for IW', - telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure - } - ) - : []; -``` - - -[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) -```typescript - ? await executeSilently(kernel.session, this.enableDebuggerCode, { - traceErrors: true, - traceErrorsMessage: 'Execute_request failure enabling debugging for IW', - telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure - }) - : []; - -``` - -
-
- DATASCIENCE.INTERRUPT - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) -```typescript - this.documentExecutions.set(document, newCellExecutionQueue); - return newCellExecutionQueue; - } - @captureTelemetry(Telemetry.Interrupt) - @captureTelemetry(Telemetry.InterruptJupyterTime) - private async interruptExecution( - session: IJupyterSession, -``` - -
-
- DATASCIENCE.JUPYTER_COMMAND_SEARCH - -## Description - - -No description provided - -## Properties - -- - where: 'activeInterpreter' | 'otherInterpreter' | 'path' | 'nowhere'; -- - command: JupyterCommands; - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.JUPYTER_KERNEL_API_ACCESS - -## Description - - -No description provided - -## Properties - -- - extensionId: string; -- - allowed: 'yes' | 'no'; - -## Locations Used - -[src/standalone/api/apiAccessService.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/apiAccessService.ts) -```typescript - const extensionPermissions = this.globalState.get(API_ACCESS_GLOBAL_KEY); - const extensionPermission = extensionPermissions?.find((item) => item.extensionId === info.extensionId); - if (extensionPermission) { - sendTelemetryEvent(Telemetry.JupyterKernelApiAccess, undefined, { - extensionId: info.extensionId, - allowed: extensionPermission.allowed - }); -``` - - -[src/standalone/api/apiAccessService.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/apiAccessService.ts) -```typescript - return this.globalState.update(API_ACCESS_GLOBAL_KEY, extensionPermissions); - }) - .then(noop, noop); - sendTelemetryEvent(Telemetry.JupyterKernelApiAccess, undefined, { - extensionId: info.extensionId, - allowed: allow ? 'yes' : 'no' - }); -``` - -
-
- DATASCIENCE.JUPYTER_KERNEL_API_USAGE - -## Description - - -No description provided - -## Properties - -- - extensionId: string; -- - pemUsed: keyof IExportedKernelService; - -## Locations Used - -[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) -```typescript - KernelConnectionMetadata - >(); - public get onDidChangeKernelSpecifications(): Event { - sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { - extensionId: this.callingExtensionId, - pemUsed: 'onDidChangeKernelSpecifications' - }); -``` - - -[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) -```typescript - return this._onDidChangeKernelSpecifications.event; - } - public get onDidChangeKernels(): Event { - sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { - extensionId: this.callingExtensionId, - pemUsed: 'onDidChangeKernels' - }); -``` - - -[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) -```typescript - ); - } - async getKernelSpecifications(refresh?: boolean): Promise { - sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { - extensionId: this.callingExtensionId, - pemUsed: 'getKernelSpecifications' - }); -``` - - -[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) -```typescript - return items.map((item) => this.translateKernelConnectionMetadataToExportedType(item)); - } - getActiveKernels(): { metadata: KernelConnectionMetadata; uri: Uri | undefined }[] { - sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { - extensionId: this.callingExtensionId, - pemUsed: 'getActiveKernels' - }); -``` - - -[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) -```typescript - return kernels; - } - getKernel(uri: Uri): { metadata: KernelConnectionMetadata; connection: IKernelConnectionInfo } | undefined { - sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { - extensionId: this.callingExtensionId, - pemUsed: 'getKernel' - }); -``` - - -[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) -```typescript - } - } - async startKernel(spec: KernelConnectionMetadata, uri: Uri): Promise { - sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { - extensionId: this.callingExtensionId, - pemUsed: 'startKernel' - }); -``` - - -[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) -```typescript - return this.startOrConnect(spec, uri); - } - async connect(spec: ActiveKernel, uri: Uri): Promise { - sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { - extensionId: this.callingExtensionId, - pemUsed: 'connect' - }); -``` - -
-
- DATASCIENCE.JUPYTER_KERNEL_FILTER_USED - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/controllers/kernelFilter/kernelFilterUI.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/kernelFilter/kernelFilterUI.ts) -```typescript - .map((item) => item.connection) - .filter((item) => !selectedItems.has(item)); - this.kernelFilter.storeHiddenKernels(hiddenConnections.map((item) => item)).then(noop, noop); - sendTelemetryEvent(Telemetry.JupyterKernelFilterUsed); - }, - this, - disposables -``` - -
-
- DATASCIENCE.JUPYTER_KERNEL_HIDDEN_VIA_FILTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/controllers/kernelFilter/kernelFilterService.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/kernelFilter/kernelFilterService.ts) -```typescript - }); - - if (hidden) { - sendTelemetryEvent(Telemetry.JupyterKernelHiddenViaFilter); - } - return hidden; - } -``` - -
-
- DATASCIENCE.JUPYTER_NOT_INSTALLED_ERROR_SHOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) -```typescript - moduleName: ProductNames.get(Product.jupyter)!, - pythonEnvType: interpreter.envType - }); - sendTelemetryEvent(Telemetry.JupyterNotInstalledErrorShown); - const selection = await this.applicationShell.showErrorMessage( - message, - { modal: true }, -``` - -
-
- DATASCIENCE.KERNEL_CRASH - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/kernelCrashMonitor.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelCrashMonitor.ts) -```typescript - } - private async endCellAndDisplayErrorsInCell(kernel: IKernel) { - const lastExecutedCell = this.lastExecutedCellPerKernel.get(kernel); - sendKernelTelemetryEvent(kernel.resourceUri, Telemetry.KernelCrash); - if (!lastExecutedCell) { - return; - } -``` - -
-
- DATASCIENCE.KERNEL_SPEC_LANGUAGE - -## Description - - -No description provided - -## Properties - -- - /** - * Language of the kernelSpec. - */ - language: string; -- - /** - * Whether this is a local or remote kernel. - */ - kind: 'local' | 'remote'; -- - /** - * Whether shell is used to start the kernel. E.g. `"/bin/sh"` is used in the argv of the kernelSpec. - * OCaml is one such kernel. - */ - usesShell?: boolean; - -## Locations Used - -[src/kernels/raw/finder/helper.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/finder/helper.ts) -```typescript - arg = arg.toLowerCase(); - return shellScripts.some((shell) => arg.includes(shell)); - }); - sendTelemetryEvent(Telemetry.KernelSpecLanguage, undefined, { - language: getTelemetrySafeLanguage(kernelSpec.language), - kind, - usesShell -``` - -
-
- DATASCIENCE.KERNEL_STARTUP_CODE_FAILURE - -## Description - - -No description provided - -## Properties - -- - ename: string; -- - evalue: string; - -## Locations Used - -[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) -```typescript - await this.executeSilently(session, startupCode, { - traceErrors: true, - traceErrorsMessage: 'Error executing jupyter extension internal startup code', - telemetryName: Telemetry.KernelStartupCodeFailure - }); - - // Run user specified startup commands -``` - -
-
- DATASCIENCE.NATIVE.CONVERT_NOTEBOOK_TO_PYTHON - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.CREATE_NEW_NOTEBOOK - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/notebookEditorProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/notebookEditorProvider.ts) -```typescript -export class NotebookEditorProvider implements INotebookEditorProvider { - private providers: Set = new Set(); - constructor(@inject(IVSCodeNotebook) private readonly vscodeNotebook: IVSCodeNotebook) {} - @captureTelemetry(Telemetry.CreateNewNotebook, undefined, false) - public async createNew(options?: { contents?: string; defaultCellLanguage: string }): Promise { - // contents will be ignored - const language = options?.defaultCellLanguage ?? PYTHON_LANGUAGE; -``` - -
-
- DATASCIENCE.NATIVE.KEYBOARD.ARROW_DOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.ARROW_UP - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.CHANGE_TO_CODE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.CHANGE_TO_MARKDOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.DELETE_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.INSERT_ABOVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.INSERT_BELOW - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.REDO - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.RUN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.RUN_AND_ADD - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.RUN_AND_MOVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.SAVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.TOGGLE_LINE_NUMBERS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.TOGGLE_OUTPUT - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.UNDO - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.KEYBOARD.UNFOCUS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.ADD_TO_END - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.CHANGE_TO_CODE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.CHANGE_TO_MARKDOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.DELETE_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.INSERT_BELOW - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.MOVE_CELL_DOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.MOVE_CELL_UP - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.RUN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.RUN_ABOVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.RUN_ALL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.RUN_BELOW - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.SAVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.SELECT_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.SELECT_SERVER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.MOUSE.TOGGLE_VARIABLE_EXPLORER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.OPEN_NOTEBOOK - -## Description - - -No description provided - -## Properties - -- scope: 'command' | 'file' - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.OPEN_NOTEBOOK_ALL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/activation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/activation.node.ts) -```typescript - } - this.notebookOpened = true; - this.PreWarmDaemonPool().ignoreErrors(); - sendTelemetryEvent(Telemetry.OpenNotebookAll); - - if (!this.rawSupported.isSupported && this.extensionChecker.isPythonExtensionInstalled) { - // Warm up our selected interpreter for the extension -``` - - -[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) -```typescript - - // Right now this is the guaranteed list. Might want to expand this. - assertEvent(Telemetry.ExecuteCell); - assertEvent(Telemetry.OpenNotebookAll); - assertEvent(Telemetry.NotebookStart); - }); - test('Run interactive window', async () => { -``` - -
-
- DATASCIENCE.NATIVE.OPEN_NOTEBOOK_SELECTION - -## Description - - - - - Telemetry sent with details of the selection of the quick pick for when user creates new notebook. - This only applies with other extensions like .NET registers with us. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NATIVE.OPEN_NOTEBOOK_SELECTION_REGISTERED - -## Description - - -No description provided - -## Properties - -- - /** - * The id of the extension registering with us to be displayed the dropdown list for notebook creation. - */ - extensionId: string; - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.NOTEBOOK_INTERRUPT - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function resetData(resource: Resource, eventName: string, properties: any) { - // Once we have successfully interrupted, clear the interrupt counter. - if (eventName === Telemetry.NotebookInterrupt) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookInterrupt] = properties; - // Check result to determine if success. -``` - - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript -function resetData(resource: Resource, eventName: string, properties: any) { - // Once we have successfully interrupted, clear the interrupt counter. - if (eventName === Telemetry.NotebookInterrupt) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookInterrupt] = properties; - // Check result to determine if success. - if (data && 'result' in data && data.result === InterruptResult.Success) { -``` - - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript - // Once we have successfully interrupted, clear the interrupt counter. - if (eventName === Telemetry.NotebookInterrupt) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookInterrupt] = properties; - // Check result to determine if success. - if (data && 'result' in data && data.result === InterruptResult.Success) { - clearInterruptCounter(resource); -``` - - -[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) -```typescript - // Otherwise a real error occurred. - sendKernelTelemetryEvent( - this.kernel.resourceUri, - Telemetry.NotebookInterrupt, - stopWatch.elapsedTime, - undefined, - exc -``` - - -[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) -```typescript - })(); - - return promise.then((result) => { - sendKernelTelemetryEvent(this.kernel.resourceUri, Telemetry.NotebookInterrupt, stopWatch.elapsedTime, { - result - }); - return result; -``` - -
-
- DATASCIENCE.NOTEBOOK_LANGUAGE - -## Description - - - - - Telemetry event sent to indicate the language used in a notebook - - @type { language: string } - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts) -```typescript -import { getTelemetrySafeLanguage } from '../../telemetry/helpers'; - -export function sendNotebookOrKernelLanguageTelemetry( - telemetryEvent: Telemetry.SwitchToExistingKernel | Telemetry.NotebookLanguage, - language?: string -) { - language = getTelemetrySafeLanguage(language); -``` - -
-
- DATASCIENCE.NOTEBOOK_RESTART - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript - } - } - // Once we have successfully restarted, clear the interrupt counter. - if (eventName === Telemetry.NotebookRestart) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookRestart] = properties; - // For restart to be successful, we should not have `failed` -``` - - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript - } - // Once we have successfully restarted, clear the interrupt counter. - if (eventName === Telemetry.NotebookRestart) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookRestart] = properties; - // For restart to be successful, we should not have `failed` - const failed = data && 'failed' in data ? data.failed : false; -``` - - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript - // Once we have successfully restarted, clear the interrupt counter. - if (eventName === Telemetry.NotebookRestart) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookRestart] = properties; - // For restart to be successful, we should not have `failed` - const failed = data && 'failed' in data ? data.failed : false; - if (!failed) { -``` - - -[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) -```typescript - await (this._jupyterSessionPromise - ? this.kernelExecution.restart(this._jupyterSessionPromise) - : this.start(new DisplayOptions(false))); - sendKernelTelemetryEvent(this.resourceUri, Telemetry.NotebookRestart, stopWatch.elapsedTime); - } catch (ex) { - traceError(`Restart failed ${getDisplayPath(this.uri)}`, ex); - this._ignoreJupyterSessionDisposedErrors = true; -``` - - -[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) -```typescript - this.restarting = undefined; - // If we get a kernel promise failure, then restarting timed out. Just shutdown and restart the entire server. - // Note, this code might not be necessary, as such an error is thrown only when interrupting a kernel times out. - sendKernelTelemetryEvent(this.resourceUri, Telemetry.NotebookRestart, stopWatch.elapsedTime, undefined, ex); - await session?.dispose().catch(noop); - this._ignoreJupyterSessionDisposedErrors = false; - throw ex; -``` - -
-
- DATASCIENCE.NOTEBOOK_START - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function incrementStartFailureCount(resource: Resource, eventName: any, properties: any) { - if (eventName === Telemetry.NotebookStart) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookStart] = properties; - // Check start failed. -``` - - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function incrementStartFailureCount(resource: Resource, eventName: any, properties: any) { - if (eventName === Telemetry.NotebookStart) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookStart] = properties; - // Check start failed. - if (data && 'failed' in data && data.failed) { -``` - - -[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) -```typescript -function incrementStartFailureCount(resource: Resource, eventName: any, properties: any) { - if (eventName === Telemetry.NotebookStart) { - let kv: Pick; - const data: undefined | typeof kv[Telemetry.NotebookStart] = properties; - // Check start failed. - if (data && 'failed' in data && data.failed) { - trackKernelResourceInformation(resource, { startFailed: true }); -``` - - -[src/kernels/jupyter/launcher/notebookProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/notebookProvider.ts) -```typescript - - sendKernelTelemetryWhenDone( - options.resource, - Telemetry.NotebookStart, - promise || Promise.resolve(undefined), - undefined, - { -``` - - -[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) -```typescript - // Right now this is the guaranteed list. Might want to expand this. - assertEvent(Telemetry.ExecuteCell); - assertEvent(Telemetry.OpenNotebookAll); - assertEvent(Telemetry.NotebookStart); - }); - test('Run interactive window', async () => { - const { activeInteractiveWindow } = await runNewPythonFile( -``` - -
-
- DATASCIENCE.OPEN_PLOT_VIEWER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/plotting/plotViewerProvider.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/plotting/plotViewerProvider.node.ts) -```typescript - this.currentViewer = this.serviceContainer.get(IPlotViewer); - this.currentViewerClosed = this.currentViewer.closed(this.closedViewer); - this.currentViewer.removed(this.removedPlot); - sendTelemetryEvent(Telemetry.OpenPlotViewer); - await this.currentViewer.show(); - } - -``` - -
-
- DATASCIENCE.OPENED_INTERACTIVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.PYTHON_VARIABLE_FETCHING_CODE_FAILURE - -## Description - - -No description provided - -## Properties - -- - ename: string; -- - evalue: string; - -## Locations Used - -[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) -```typescript - { - traceErrors: true, - traceErrorsMessage: 'Failure in execute_request for getDataFrameInfo', - telemetryName: Telemetry.PythonVariableFetchingCodeFailure - } - ); - -``` - - -[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) -```typescript - { - traceErrors: true, - traceErrorsMessage: 'Failure in execute_request for getDataFrameRows', - telemetryName: Telemetry.PythonVariableFetchingCodeFailure - } - ); - -``` - - -[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) -```typescript - { - traceErrors: true, - traceErrorsMessage: 'Failure in execute_request for getVariableProperties', - telemetryName: Telemetry.PythonVariableFetchingCodeFailure - } - ); - result = { ...result, ...this.deserializeJupyterResult(attributes) }; -``` - - -[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) -```typescript - { - traceErrors: true, - traceErrorsMessage: 'Failure in execute_request for getVariableNamesAndTypesFromKernel', - telemetryName: Telemetry.PythonVariableFetchingCodeFailure - } - ); - -``` - - -[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) -```typescript - { - traceErrors: true, - traceErrorsMessage: 'Failure in execute_request for getFullVariable', - telemetryName: Telemetry.PythonVariableFetchingCodeFailure - } - ); - -``` - -
-
- DATASCIENCE.RECOMMENT_EXTENSION - -## Description - - - - Telemetry sent when we recommend installing an extension. - -## Properties - -- - /** - * Extension we recommended the user to install. - */ - extensionId: string; -- - /** - * `displayed` - If prompt was displayed - * `dismissed` - If prompt was displayed & dismissed by the user - * `ok` - If prompt was displayed & ok clicked by the user - * `cancel` - If prompt was displayed & cancel clicked by the user - * `doNotShowAgain` - If prompt was displayed & doNotShowAgain clicked by the user - */ - action: 'displayed' | 'dismissed' | 'ok' | 'cancel' | 'doNotShowAgain'; - -## Locations Used - -[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) -```typescript - `[${extensionInfo.displayName}](${extensionInfo.extensionLink})`, - language - ); - sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'displayed' }); - const selection = await this.appShell.showInformationMessage( - message, - Common.bannerLabelYes(), -``` - - -[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) -```typescript - ); - switch (selection) { - case Common.bannerLabelYes(): { - sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'ok' }); - this.commandManager.executeCommand('extension.open', extensionId).then(noop, noop); - break; - } -``` - - -[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) -```typescript - break; - } - case Common.bannerLabelNo(): { - sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'cancel' }); - break; - } - case Common.doNotShowAgain(): { -``` - - -[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) -```typescript - break; - } - case Common.doNotShowAgain(): { - sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'doNotShowAgain' }); - const list = this.globalMemento.get(mementoKeyToNeverPromptExtensionAgain, []); - if (!list.includes(extensionId)) { - list.push(extensionId); -``` - - -[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) -```typescript - break; - } - default: - sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'dismissed' }); - } - } -} -``` - -
-
- DATASCIENCE.REDO - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.REFRESH_DATA_VIEWER - -## Description - - - - - Sent when the jupyter.refreshDataViewer command is invoked - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) -```typescript - - case DataViewerMessages.RefreshDataViewer: - this.refreshData().ignoreErrors(); - void sendTelemetryEvent(Telemetry.RefreshDataViewer); - break; - - case DataViewerMessages.SliceEnablementStateChanged: -``` - -
-
- DATASCIENCE.RESTART_KERNEL_COMMAND - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/notebookCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/notebookCommandListener.ts) -```typescript - return; - } - - sendTelemetryEvent(Telemetry.RestartKernelCommand); - const kernel = this.kernelProvider.get(document.uri); - - if (kernel) { -``` - -
-
- DATASCIENCE.RUN_ADD_EMPTY_CELL_TO_BOTTOM - -## Description - - - - - Misc - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.RUN_ALL_CELLS - -## Description - - - - - Run Cell Commands in Interactive Python - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - this.closeDocumentDisposable?.dispose(); // NOSONAR - this.updateRequiredDisposable?.dispose(); // NOSONAR - } - @captureTelemetry(Telemetry.RunAllCells) - public async runAllCells() { - const iw = await this.getActiveInteractiveWindow(); - const runCellCommands = this.codeLenses.filter( -``` - -
-
- DATASCIENCE.RUN_ALL_CELLS_ABOVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - - // Run all cells up to the cell containing this start line and character - @captureTelemetry(Telemetry.RunAllCellsAbove) - public async runAllCellsAbove(stopLine: number, stopCharacter: number) { - const iw = await this.getActiveInteractiveWindow(); - const runCellCommands = this.codeLenses.filter((c) => c.command && c.command.command === Commands.RunCell); -``` - -
-
- DATASCIENCE.RUN_BY_LINE - -## Description - - - - Run by line events - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.RUN_BY_LINE_STEP - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.RUN_BY_LINE_STOP - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.RUN_BY_LINE_VARIABLE_HOVER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/variables/debuggerVariables.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/debuggerVariables.ts) -```typescript - // Note, full variable results isn't necessary for this call. It only really needs the variable value. - const result = this.lastKnownVariables.find((v) => v.name === name); - if (result && kernel?.resourceUri && uriPath.extname(kernel?.resourceUri).toLowerCase() === '.ipynb') { - sendTelemetryEvent(Telemetry.RunByLineVariableHover); - } - return result; - } -``` - -
-
- DATASCIENCE.RUN_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.RUN_CELL_AND_ALL_BELOW - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - await finished; - } - - @captureTelemetry(Telemetry.RunCellAndAllBelow) - public async runCellAndAllBelow(startLine: number, startCharacter: number) { - const iw = await this.getActiveInteractiveWindow(); - const runCellCommands = this.codeLenses.filter((c) => c.command && c.command.command === Commands.RunCell); -``` - -
-
- DATASCIENCE.RUN_CHANGE_CELL_TO_CODE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - }); - } - - @captureTelemetry(Telemetry.ChangeCellToCode) - public changeCellToCode() { - this.applyToCells((editor, cell, _) => { - return this.changeCellTo(editor, cell, 'code'); -``` - -
-
- DATASCIENCE.RUN_CHANGE_CELL_TO_MARKDOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - await this.moveCellsDirection(false); - } - - @captureTelemetry(Telemetry.ChangeCellToMarkdown) - public changeCellToMarkdown() { - this.applyToCells((editor, cell, _) => { - return this.changeCellTo(editor, cell, 'markdown'); -``` - -
-
- DATASCIENCE.RUN_CURRENT_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - return this.runMatchingCell(range, false, true); - } - - @captureTelemetry(Telemetry.RunCurrentCell) - public async runCurrentCell(): Promise { - if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { - return; -``` - -
-
- DATASCIENCE.RUN_CURRENT_CELL_AND_ADD_BELOW - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.RunCurrentCellAndAddBelow) - public async runCurrentCellAndAddBelow(): Promise { - if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { - return; -``` - -
-
- DATASCIENCE.RUN_CURRENT_CELL_AND_ADVANCE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - return this.runMatchingCell(this.documentManager.activeTextEditor.selection, false); - } - - @captureTelemetry(Telemetry.RunCurrentCellAndAdvance) - public async runCurrentCellAndAdvance() { - if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { - return; -``` - -
-
- DATASCIENCE.RUN_DELETE_CELLS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.DeleteCells) - public deleteCells() { - const editor = this.documentManager.activeTextEditor; - if (!editor || !editor.selection) { -``` - -
-
- DATASCIENCE.RUN_EXTEND_SELECTION_BY_CELL_ABOVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - editor.selections = selections; - } - - @captureTelemetry(Telemetry.ExtendSelectionByCellAbove) - public extendSelectionByCellAbove() { - // This behaves similarly to excel "Extend Selection by One Cell Above". - // The direction of the selection matters (i.e. where the active cursor) -``` - -
-
- DATASCIENCE.RUN_EXTEND_SELECTION_BY_CELL_BELOW - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.ExtendSelectionByCellBelow) - public extendSelectionByCellBelow() { - // This behaves similarly to excel "Extend Selection by One Cell Above". - // The direction of the selection matters (i.e. where the active cursor) -``` - -
-
- DATASCIENCE.RUN_FILE_INTERACTIVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.RunFileInteractive) - public async runFileInteractive() { - return this.runFileInteractiveInternal(false); - } -``` - - -[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) -```typescript - }; - - // Right now this is the guaranteed list. Might want to expand this. - assertEvent(Telemetry.RunFileInteractive); - assertEvent(Telemetry.ExecuteCellPerceivedWarm); - assertEvent(Telemetry.SwitchKernel); - }); -``` - -
-
- DATASCIENCE.RUN_FROM_LINE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.RunFromLine) - public async runFromLine(targetLine: number) { - if (this.document && targetLine < this.document.lineCount) { - const iw = await this.getActiveInteractiveWindow(); -``` - -
-
- DATASCIENCE.RUN_INSERT_CELL_ABOVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.InsertCellAbove) - public insertCellAbove() { - const editor = this.documentManager.activeTextEditor; - if (editor && editor.selection) { -``` - -
-
- DATASCIENCE.RUN_INSERT_CELL_BELOW - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.InsertCellBelow) - public insertCellBelow() { - const editor = this.documentManager.activeTextEditor; - if (editor && editor.selection) { -``` - -
-
- DATASCIENCE.RUN_INSERT_CELL_BELOW_POSITION - -## Description - - - - - Cell Edit Commands in Interactive Python - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - ); - } - - @captureTelemetry(Telemetry.InsertCellBelowPosition) - public insertCellBelowPosition() { - const editor = this.documentManager.activeTextEditor; - if (editor && editor.selection) { -``` - -
-
- DATASCIENCE.RUN_MOVE_CELLS_DOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - await this.moveCellsDirection(true); - } - - @captureTelemetry(Telemetry.MoveCellsDown) - public async moveCellsDown(): Promise { - await this.moveCellsDirection(false); - } -``` - -
-
- DATASCIENCE.RUN_MOVE_CELLS_UP - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.MoveCellsUp) - public async moveCellsUp(): Promise { - await this.moveCellsDirection(true); - } -``` - -
-
- DATASCIENCE.RUN_SELECT_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - .then(noop, noop); - } - - @captureTelemetry(Telemetry.SelectCell) - public selectCell() { - const editor = this.documentManager.activeTextEditor; - if (editor && editor.selection) { -``` - -
-
- DATASCIENCE.RUN_SELECT_CELL_CONTENTS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.SelectCellContents) - public selectCellContents() { - const editor = this.documentManager.activeTextEditor; - if (!editor || !editor.selection) { -``` - -
-
- DATASCIENCE.RUN_SELECTION_OR_LINE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - await finished; - } - - @captureTelemetry(Telemetry.RunSelectionOrLine) - public async runSelectionOrLine(activeEditor: TextEditor | undefined, text?: string | Uri) { - if (this.document && activeEditor && urlPath.isEqual(activeEditor.document.uri, this.document.uri)) { - const iw = await this.getActiveInteractiveWindow(); -``` - -
-
- DATASCIENCE.RUN_TO_LINE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.RunToLine) - public async runToLine(targetLine: number) { - if (this.document && targetLine > 0) { - const iw = await this.getActiveInteractiveWindow(); -``` - -
-
- DATASCIENCE.SAVE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.SCROLLED_TO_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.SELECT_JUPYTER_INTERPRETER_Command - -## Description - - - - - Telemetry sent when user selects an interpreter to start jupyter server. - - @type {(never | undefined)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/interpreter/jupyterInterpreterSelectionCommand.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterSelectionCommand.node.ts) -```typescript - public async activate(): Promise { - this.disposables.push( - this.cmdManager.registerCommand('jupyter.selectJupyterInterpreter', () => { - sendTelemetryEvent(Telemetry.SelectJupyterInterpreterCommand); - this.service.selectInterpreter().ignoreErrors(); - }) - ); -``` - -
-
- DATASCIENCE.SELECT_JUPYTER_URI - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - @inject(IsWebExtension) private readonly isWebExtension: boolean - ) {} - - @captureTelemetry(Telemetry.SelectJupyterURI) - @traceDecoratorError('Failed to select Jupyter Uri') - public selectJupyterURI( - allowLocal: boolean, -``` - - -[src/kernels/jupyter/launcher/commandLineSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/commandLineSelector.ts) -```typescript - workspaceService.onDidChangeConfiguration(this.onDidChangeConfiguration.bind(this)); - } - - @captureTelemetry(Telemetry.SelectJupyterURI) - public selectJupyterCommandLine(file: Uri): Promise { - const multiStep = this.multiStepFactory.create<{}>(); - return multiStep.run(this.startSelectingCommandLine.bind(this, file), {}); -``` - -
-
- DATASCIENCE.SELECT_LOCAL_JUPYTER_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) -```typescript - // Else VSC is just setting a kernel for a notebook after it has opened. - if (existingKernel) { - const telemetryEvent = isLocalConnection(this.kernelConnection) - ? Telemetry.SelectLocalJupyterKernel - : Telemetry.SelectRemoteJupyterKernel; - sendKernelTelemetryEvent(document.uri, telemetryEvent); - this.notebookApi.notebookEditors -``` - -
-
- DATASCIENCE.SELECT_REMOTE_JUPYTER_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) -```typescript - if (existingKernel) { - const telemetryEvent = isLocalConnection(this.kernelConnection) - ? Telemetry.SelectLocalJupyterKernel - : Telemetry.SelectRemoteJupyterKernel; - sendKernelTelemetryEvent(document.uri, telemetryEvent); - this.notebookApi.notebookEditors - .filter((editor) => editor.notebook === document) -``` - -
-
- DATASCIENCE.SELFCERTSMESSAGECLOSE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/jupyterUtils.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterUtils.ts) -```typescript - await config.updateSetting('allowUnauthorizedRemoteConnection', true, undefined, ConfigurationTarget.Workspace); - return true; - } else if (value === closeOption) { - sendTelemetryEvent(Telemetry.SelfCertsMessageClose); - } - return false; -} -``` - - -[src/kernels/jupyter/jupyterUtils.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterUtils.ts) -```typescript - await config.updateSetting('allowUnauthorizedRemoteConnection', true, undefined, ConfigurationTarget.Workspace); - return true; - } else if (value === closeOption) { - sendTelemetryEvent(Telemetry.SelfCertsMessageClose); - } - return false; -} -``` - - -[src/kernels/errors/kernelErrorHandler.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/errors/kernelErrorHandler.ts) -```typescript - ) - .catch(noop); - } else if (value === closeOption) { - sendTelemetryEvent(Telemetry.SelfCertsMessageClose); - } - }) - .then(noop, noop); -``` - - -[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) -```typescript - ); - return this.requestCreator.getFetchMethod()(url, this.addAllowUnauthorized(url, true, options)); - } else if (value === closeOption) { - sendTelemetryEvent(Telemetry.SelfCertsMessageClose); - } - } - throw e; -``` - -
-
- DATASCIENCE.SELFCERTSMESSAGEENABLED - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/jupyterUtils.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterUtils.ts) -```typescript - closeOption - ); - if (value === enableOption) { - sendTelemetryEvent(Telemetry.SelfCertsMessageEnabled); - await config.updateSetting('allowUnauthorizedRemoteConnection', true, undefined, ConfigurationTarget.Workspace); - return true; - } else if (value === closeOption) { -``` - - -[src/kernels/jupyter/jupyterUtils.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterUtils.ts) -```typescript - closeOption - ); - if (value === enableOption) { - sendTelemetryEvent(Telemetry.SelfCertsMessageEnabled); - await config.updateSetting('allowUnauthorizedRemoteConnection', true, undefined, ConfigurationTarget.Workspace); - return true; - } else if (value === closeOption) { -``` - - -[src/kernels/errors/kernelErrorHandler.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/errors/kernelErrorHandler.ts) -```typescript - .showErrorMessage(DataScience.jupyterSelfCertFail().format(err.message), enableOption, closeOption) - .then((value) => { - if (value === enableOption) { - sendTelemetryEvent(Telemetry.SelfCertsMessageEnabled); - this.configuration - .updateSetting( - 'allowUnauthorizedRemoteConnection', -``` - - -[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) -```typescript - closeOption - ); - if (value === enableOption) { - sendTelemetryEvent(Telemetry.SelfCertsMessageEnabled); - await this.configService.updateSetting( - 'allowUnauthorizedRemoteConnection', - true, -``` - -
-
- DATASCIENCE.SET_JUPYTER_URI_LOCAL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - return computeServerId(uri); - } - } - @captureTelemetry(Telemetry.SetJupyterURIToLocal) - public async setJupyterURIToLocal(): Promise { - await this.serverUriStorage.setUriToLocal(); - } -``` - -
-
- DATASCIENCE.SET_JUPYTER_URI_UI_DISPLAYED - -## Description - - - - - This telemetry tracks the display of the Picker for Jupyter Remote servers. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - allowLocal: boolean, - commandSource: SelectJupyterUriCommandSource = 'nonUser' - ): Promise { - sendTelemetryEvent(Telemetry.SetJupyterURIUIDisplayed, undefined, { - commandSource - }); - const multiStep = this.multiStepFactory.create<{}>(); -``` - -
-
- DATASCIENCE.SET_JUPYTER_URI_USER_SPECIFIED - -## Description - - -No description provided - -## Properties - -- - azure: boolean; - -## Locations Used - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - await this.serverUriStorage.setUriToRemote(userURI, connection.displayName); - - // Indicate setting a jupyter URI to a remote setting. Check if an azure remote or not - sendTelemetryEvent(Telemetry.SetJupyterURIToUserSpecified, undefined, { - azure: userURI.toLowerCase().includes('azure') - }); - } -``` - -
-
- DATASCIENCE.SHOW_DATA_EXPLORER - -## Description - - -No description provided - -## Properties - -- rows: number | undefined; -- columns: number | undefined - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) -```typescript - - // Log telemetry about number of rows - try { - sendTelemetryEvent(Telemetry.ShowDataViewer, 0, { - rows: output.rowCount ? output.rowCount : 0, - columns: output.columns ? output.columns.length : 0 - }); -``` - - -[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) -```typescript - - private sendElapsedTimeTelemetry() { - if (this.rowsTimer && this.pendingRowsCount === 0) { - sendTelemetryEvent(Telemetry.ShowDataViewer, this.rowsTimer.elapsedTime); - } - } - -``` - -
-
- DATASCIENCE.START_SHOW_DATA_EXPLORER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewerFactory.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerFactory.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.StartShowDataViewer) - public async create(dataProvider: IDataViewerDataProvider, title: string): Promise { - let result: IDataViewer | undefined; - -``` - -
-
- DATASCIENCE.SUBMITCELLFROMREPL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.UNDO - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.USER_DID_NOT_INSTALL_JUPYTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) -```typescript - } - - case DataScience.selectDifferentJupyterInterpreter(): { - sendTelemetryEvent(Telemetry.UserDidNotInstallJupyter); - return JupyterInterpreterDependencyResponse.selectAnotherInterpreter; - } - -``` - - -[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) -```typescript - - case DataScience.pythonInteractiveHelpLink(): { - this.applicationShell.openUrl(HelpLinks.PythonInteractiveHelpLink); - sendTelemetryEvent(Telemetry.UserDidNotInstallJupyter); - return JupyterInterpreterDependencyResponse.cancel; - } - -``` - - -[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) -```typescript - } - - default: - sendTelemetryEvent(Telemetry.UserDidNotInstallJupyter); - return JupyterInterpreterDependencyResponse.cancel; - } - } finally { -``` - -
-
- DATASCIENCE.USER_DID_NOT_INSTALL_PANDAS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) -```typescript - sendTelemetryEvent(Telemetry.UserInstalledPandas); - } - } else { - sendTelemetryEvent(Telemetry.UserDidNotInstallPandas); - throw new Error(DataScience.pandasRequiredForViewing()); - } - } -``` - -
-
- DATASCIENCE.USER_INSTALLED_JUPYTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) -```typescript - return JupyterInterpreterDependencyResponse.cancel; - } - } - sendTelemetryEvent(Telemetry.UserInstalledJupyter); - - // Check if kernelspec module is something that accessible. - return this.checkKernelSpecAvailability(interpreter); -``` - -
-
- DATASCIENCE.USER_INSTALLED_MODULE - -## Description - - - - - Telemetry event sent when installing a jupyter dependency - - @type {product: string} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.USER_INSTALLED_PANDAS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) -```typescript - cancellationPromise - ]); - if (response === InstallerResponse.Installed) { - sendTelemetryEvent(Telemetry.UserInstalledPandas); - } - } else { - sendTelemetryEvent(Telemetry.UserDidNotInstallPandas); -``` - -
-
- DATASCIENCE.USER_STARTUP_CODE_FAILURE - -## Description - - -No description provided - -## Properties - -- - ename: string; -- - evalue: string; - -## Locations Used - -[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) -```typescript - await this.executeSilently(session, this.getUserStartupCommands(), { - traceErrors: true, - traceErrorsMessage: 'Error executing user defined startup code', - telemetryName: Telemetry.UserStartupCodeFailure - }); - } - -``` - -
-
- DATASCIENCE.VARIABLE_EXPLORER_TOGGLE - -## Description - - -No description provided - -## Properties - -- open: boolean; -- runByLine: boolean - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.VSCODE_NATIVE.CHANGE_TO_CODE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.VSCODE_NATIVE.CHANGE_TO_MARKDOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.VSCODE_NATIVE.DELETE_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.VSCODE_NATIVE.INSERT_CELL - -## Description - - - - Native notebooks events - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DATASCIENCE.VSCODE_NATIVE.MOVE_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.ACTIVE_INTERPRETER_LISTING_PERF - -## Description - - -No description provided - -## Properties - -- - /** - * Whether this is the first time in the session. - * (fetching kernels first time in the session is slower, later its cached). - * This is a generic property supported for all telemetry (sent by decorators). - */ - firstTime?: boolean; - -## Locations Used - -[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) -```typescript - } - } - private workspaceCachedActiveInterpreter = new Map>(); - @captureTelemetry(Telemetry.ActiveInterpreterListingPerf) - @traceDecoratorVerbose('Get Active Interpreter', TraceOptions.Arguments | TraceOptions.BeforeCall) - public getActiveInterpreter(resource?: Uri): Promise { - this.hookupOnDidChangeInterpreterEvent(); -``` - -
-
- DS_INTERNAL.ASK_USER_FOR_NEW_KERNEL_JUPYTER - -## Description - - - - - Sent when a jupyter session fails to start and we ask the user for a new kernel - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.CELL_COUNT - -## Description - - -No description provided - -## Properties - -- count: number - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.CODE_LENS_ACQ_TIME - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/editor-integration/codelensprovider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codelensprovider.ts) -```typescript - // On shutdown send how long on average we spent parsing code lens - if (this.totalGetCodeLensCalls > 0) { - sendTelemetryEvent( - Telemetry.CodeLensAverageAcquisitionTime, - this.totalExecutionTimeInMs / this.totalGetCodeLensCalls - ); - } -``` - -
-
- DS_INTERNAL.COMMAND_EXECUTED - -## Description - - - - - Telemetry sent when a command is executed. - -## Properties - - -No properties for event - - -## Locations Used - -[src/platform/common/application/commandManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/application/commandManager.ts) -```typescript - return commands.registerCommand( - command, - (...args: U) => { - sendTelemetryEvent(Telemetry.CommandExecuted, undefined, { command: command as string }); - if (thisArg) { - return callback.call(thisArg, ...(args as any)); - } else { -``` - - -[src/platform/common/application/commandManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/application/commandManager.ts) -```typescript - return commands.registerTextEditorCommand( - command, - (textEditor: TextEditor, edit: TextEditorEdit, ...args: any[]) => { - sendTelemetryEvent(Telemetry.CommandExecuted, undefined, { command: command as string }); - if (thisArg) { - return callback.call(thisArg, textEditor, edit, ...args); - } else { -``` - - -[src/platform/common/application/commandManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/application/commandManager.ts) -```typescript - U extends ICommandNameArgumentTypeMapping[E] - >(command: E, ...rest: U): Thenable { - if (!commandsToIgnore.has(command)) { - sendTelemetryEvent(Telemetry.CommandExecuted, undefined, { command: command as string }); - } - return commands.executeCommand(command, ...rest); - } -``` - -
-
- DS_INTERNAL.COMPLETION_TIME_FROM_JUPYTER - -## Description - - - - - Telemetry event sent to capture total time taken for completions list to be provided by Jupyter. - This is used to compare against time taken by LS. - - @type {(undefined | never)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.COMPLETION_TIME_FROM_LS - -## Description - - - - - Telemetry event sent to capture total time taken for completions list to be provided by LS. - This is used to compare against time taken by Jupyter. - - @type {(undefined | never)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.CONNECTFAILEDJUPYTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) -```typescript - throw new RemoteJupyterServerConnectionError(connection.baseUrl, options.serverId, err); - } - } else { - sendTelemetryEvent(Telemetry.ConnectFailedJupyter, undefined, undefined, err, true); - throw new LocalJupyterServerConnectionError(err); - } - } else { -``` - -
-
- DS_INTERNAL.CONNECTLOCALJUPYTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) -```typescript - traceInfo(`Connection complete server`); - - sendTelemetryEvent( - options.localJupyter ? Telemetry.ConnectLocalJupyter : Telemetry.ConnectRemoteJupyter - ); - return result; - } catch (err) { -``` - -
-
- DS_INTERNAL.CONNECTREMOTEEXPIREDCERTFAILEDJUPYTER - -## Description - - - - - Jupyter server's certificate has expired. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) -```typescript - sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); - throw new JupyterSelfCertsError(connection.baseUrl); - } else if (JupyterSelfCertsExpiredError.isSelfCertsExpiredError(err)) { - sendTelemetryEvent(Telemetry.ConnectRemoteExpiredCertFailedJupyter); - throw new JupyterSelfCertsExpiredError(connection.baseUrl); - } else { - throw new RemoteJupyterServerConnectionError(connection.baseUrl, options.serverId, err); -``` - -
-
- DS_INTERNAL.CONNECTREMOTEFAILEDJUPYTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) -```typescript - - // Something else went wrong - if (!options.localJupyter) { - sendTelemetryEvent(Telemetry.ConnectRemoteFailedJupyter, undefined, undefined, err, true); - - // Check for the self signed certs error specifically - if (JupyterSelfCertsError.isSelfCertsError(err)) { -``` - -
-
- DS_INTERNAL.CONNECTREMOTEJUPYTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) -```typescript - traceInfo(`Connection complete server`); - - sendTelemetryEvent( - options.localJupyter ? Telemetry.ConnectLocalJupyter : Telemetry.ConnectRemoteJupyter - ); - return result; - } catch (err) { -``` - -
-
- DS_INTERNAL.CONNECTREMOTEJUPYTER_VIA_LOCALHOST - -## Description - - - - - Connecting to an existing Jupyter server, but connecting to localhost. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) -```typescript - connection = await this.startOrConnect(options, cancelToken); - - if (!connection.localLaunch && LocalHosts.includes(connection.hostName.toLowerCase())) { - sendTelemetryEvent(Telemetry.ConnectRemoteJupyterViaLocalHost); - } - // eslint-disable-next-line no-constant-condition - traceInfo(`Connecting to process server`); -``` - -
-
- DS_INTERNAL.CONNECTREMOTESELFCERTFAILEDJUPYTER - -## Description - - - - - Jupyter server's certificate is not from a trusted authority. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - } - } catch (err) { - if (JupyterSelfCertsError.isSelfCertsError(err)) { - sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); - const handled = await handleSelfCertsError(this.applicationShell, this.configService, err.message); - if (!handled) { - return; -``` - - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - return; - } - } else if (JupyterSelfCertsExpiredError.isSelfCertsExpiredError(err)) { - sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); - const handled = await handleExpiredCertsError(this.applicationShell, this.configService, err.message); - if (!handled) { - return; -``` - - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - } catch (err) { - traceWarning('Uri verification error', err); - if (JupyterSelfCertsError.isSelfCertsError(err)) { - sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); - const handled = await handleSelfCertsError(this.applicationShell, this.configService, err.message); - if (!handled) { - return DataScience.jupyterSelfCertFailErrorMessageOnly(); -``` - - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - return DataScience.jupyterSelfCertFailErrorMessageOnly(); - } - } else if (JupyterSelfCertsExpiredError.isSelfCertsExpiredError(err)) { - sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); - const handled = await handleExpiredCertsError(this.applicationShell, this.configService, err.message); - if (!handled) { - return DataScience.jupyterSelfCertExpiredErrorMessageOnly(); -``` - - -[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) -```typescript - - // Check for the self signed certs error specifically - if (JupyterSelfCertsError.isSelfCertsError(err)) { - sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); - throw new JupyterSelfCertsError(connection.baseUrl); - } else if (JupyterSelfCertsExpiredError.isSelfCertsExpiredError(err)) { - sendTelemetryEvent(Telemetry.ConnectRemoteExpiredCertFailedJupyter); -``` - -
-
- DS_INTERNAL.ERROR_START_RAWKERNEL_WITHOUT_INTERPRETER - -## Description - - - - Whether we've attempted to start a raw Python kernel without any interpreter information. - If we don't detect such telemetry in a few months, then we can remove this along with the temporary code associated with this telemetry. - -## Properties - -- - /** - * Indicates whether the python extension is installed. - * If we send telemetry fro this & this is `true`, then we have a bug. - * If its `false`, then we can ignore this telemetry. - */ - pythonExtensionInstalled: boolean; - -## Locations Used - -[src/kernels/raw/session/hostRawNotebookProvider.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/hostRawNotebookProvider.node.ts) -```typescript - kernelConnection.kind === 'startUsingLocalKernelSpec' - ) { - if (!kernelConnection.interpreter) { - sendTelemetryEvent(Telemetry.AttemptedToLaunchRawKernelWithoutInterpreter, undefined, { - pythonExtensionInstalled: this.extensionChecker.isPythonExtensionInstalled - }); - } -``` - -
-
- DS_INTERNAL.EXECUTE_CELL_PERCEIVED_COLD - -## Description - - - - - Telemetry sent to capture first time execution of a cell. - If `notebook = true`, this its telemetry for native editor/notebooks. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/execution/cellExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/cellExecution.ts) -```typescript - const props = { notebook: true }; - if (!CellExecution.sentExecuteCellTelemetry) { - CellExecution.sentExecuteCellTelemetry = true; - sendTelemetryEvent(Telemetry.ExecuteCellPerceivedCold, this.stopWatchForTelemetry.elapsedTime, props); - } else { - sendTelemetryEvent(Telemetry.ExecuteCellPerceivedWarm, this.stopWatchForTelemetry.elapsedTime, props); - } -``` - - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - if (runningStopWatch) { - if (!CodeWatcher.sentExecuteCellTelemetry) { - CodeWatcher.sentExecuteCellTelemetry = true; - sendTelemetryEvent(Telemetry.ExecuteCellPerceivedCold, runningStopWatch.elapsedTime); - } else { - sendTelemetryEvent(Telemetry.ExecuteCellPerceivedWarm, runningStopWatch.elapsedTime); - } -``` - -
-
- DS_INTERNAL.EXECUTE_CELL_PERCEIVED_WARM - -## Description - - - - - Telemetry sent to capture subsequent execution of a cell. - If `notebook = true`, this its telemetry for native editor/notebooks. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/execution/cellExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/cellExecution.ts) -```typescript - CellExecution.sentExecuteCellTelemetry = true; - sendTelemetryEvent(Telemetry.ExecuteCellPerceivedCold, this.stopWatchForTelemetry.elapsedTime, props); - } else { - sendTelemetryEvent(Telemetry.ExecuteCellPerceivedWarm, this.stopWatchForTelemetry.elapsedTime, props); - } - } - private canExecuteCell() { -``` - - -[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) -```typescript - CodeWatcher.sentExecuteCellTelemetry = true; - sendTelemetryEvent(Telemetry.ExecuteCellPerceivedCold, runningStopWatch.elapsedTime); - } else { - sendTelemetryEvent(Telemetry.ExecuteCellPerceivedWarm, runningStopWatch.elapsedTime); - } - } - } -``` - - -[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) -```typescript - - // Right now this is the guaranteed list. Might want to expand this. - assertEvent(Telemetry.RunFileInteractive); - assertEvent(Telemetry.ExecuteCellPerceivedWarm); - assertEvent(Telemetry.SwitchKernel); - }); -}); -``` - -
-
- DS_INTERNAL.FAILED_TO_UPDATE_JUPYTER_KERNEL_SPEC - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/jupyterKernelService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterKernelService.node.ts) -```typescript - await this.fs.writeLocalFile(kernelSpecFilePath.fsPath, JSON.stringify(contents, undefined, 4)); - } catch (ex) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendTelemetryEvent(Telemetry.FailedToUpdateKernelSpec, undefined, undefined, ex as any, true); - throw ex; - } - if (cancelToken.isCancellationRequested) { -``` - - -[src/kernels/jupyter/jupyterKernelService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterKernelService.node.ts) -```typescript - await this.fs.writeLocalFile(kernelSpecFilePath, JSON.stringify(specModel, undefined, 2)); - } catch (ex) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendTelemetryEvent(Telemetry.FailedToUpdateKernelSpec, undefined, undefined, ex as any, true); - throw ex; - } - } -``` - -
-
- DS_INTERNAL.FIND_JUPYTER_COMMAND - -## Description - - -No description provided - -## Properties - -- command: string - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.FIND_JUPYTER_KERNEL_SPEC - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.FIND_KERNEL_FOR_LOCAL_CONNECTION - -## Description - - - - - Telemetry event sent once done searching for kernel spec and interpreter for a local connection. - - @type {{ - kernelSpecFound: boolean; - interpreterFound: boolean; - }} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.GET_ACTIVATED_ENV_VARIABLES - -## Description - - - - - Used to capture time taken to get enviornment variables for a python environment. - Also lets us know whether it worked or not. - -## Properties - - -No properties for event - - -## Locations Used - -[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) -```typescript - ]); - - const envType = interpreter.envType; - sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { - envType, - pythonEnvType: envType, - source: 'python', -``` - - -[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) -```typescript - interpreter?.uri - )}, shell cannot be determined.` - ); - sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, 0, { - envType, - pythonEnvType: envType, - source: 'jupyter', -``` - - -[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) -```typescript - const stopWatch = new StopWatch(); - try { - const env = await this.getCondaEnvVariables(resource, interpreter); - sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { - envType, - pythonEnvType: envType, - source: 'jupyter', -``` - - -[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) -```typescript - }); - return env; - } catch (ex) { - sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { - envType, - pythonEnvType: envType, - source: 'jupyter', -``` - - -[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) -```typescript - const processService = await processServicePromise; - const hasCustomEnvVars = Object.keys(customEnvVars).length; - if (!activationCommands || activationCommands.length === 0) { - sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { - envType, - pythonEnvType: envType, - source: 'jupyter', -``` - - -[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) -```typescript - } else if (returnedEnv) { - delete returnedEnv[PYTHON_WARNINGS]; - } - sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { - envType, - pythonEnvType: envType, - source: 'jupyter', -``` - - -[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) -```typescript - - return returnedEnv; - } catch (e) { - sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { - envType, - pythonEnvType: envType, - source: 'jupyter', -``` - -
-
- DS_INTERNAL.GET_PASSWORD_FAILURE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) -```typescript - const requestHeaders = { Cookie: cookieString, 'X-XSRFToken': xsrfCookie }; - return { requestHeaders }; - } else { - sendTelemetryEvent(Telemetry.GetPasswordFailure); - return undefined; - } - } -``` - -
-
- DS_INTERNAL.GET_PASSWORD_SUCCESS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) -```typescript - - // If we found everything return it all back if not, undefined as partial is useless - if (xsrfCookie && sessionCookieName && sessionCookieValue) { - sendTelemetryEvent(Telemetry.GetPasswordSuccess); - const cookieString = this.getSessionCookieString(xsrfCookie, sessionCookieName, sessionCookieValue); - const requestHeaders = { Cookie: cookieString, 'X-XSRFToken': xsrfCookie }; - return { requestHeaders }; -``` - -
-
- DS_INTERNAL.GET_PREFERRED_KERNEL_PERF - -## Description - - - - - Total time taken to get the preferred kernel for notebook. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.HASHED_NOTEBOOK_OUTPUT_MIME_TYPE_PERF - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.HASHED_OUTPUT_MIME_TYPE - -## Description - - -No description provided - -## Properties - -- - /** - * Hash of the cell output mimetype - * - * @type {string} - */ - hashedName: string; -- - hasText: boolean; -- - hasLatex: boolean; -- - hasHtml: boolean; -- - hasSvg: boolean; -- - hasXml: boolean; -- - hasJson: boolean; -- - hasImage: boolean; -- - hasGeo: boolean; -- - hasPlotly: boolean; -- - hasVega: boolean; -- - hasWidget: boolean; -- - hasJupyter: boolean; -- - hasVnd: boolean; - -## Locations Used - -[src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts) -```typescript - hasJupyter: lowerMimeType.includes('jupyter'), - hasVnd: lowerMimeType.includes('vnd') - }; - sendTelemetryEvent(Telemetry.HashedCellOutputMimeType, undefined, props); - } -} - -``` - -
-
- DS_INTERNAL.HASHED_OUTPUT_MIME_TYPE_PERF - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts) -```typescript - this.pendingChecks.set(id, setTimeout(check, 5000)); - } - - @captureTelemetry(Telemetry.HashedCellOutputMimeTypePerf) - private checkCell(cell: NotebookCell) { - this.pendingChecks.delete(cell.document.uri.toString()); - this.getCellOutputMimeTypes(cell).forEach(this.sendTelemetry.bind(this)); -``` - -
-
- DS_INTERNAL.HIDDEN_EXECUTION_TIME - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.INTERACTIVE_FILE_TOOLTIPS_PERF - -## Description - - - - Capture telemetry re: how long returning a tooltip takes - -## Properties - -- - // Result is null if user signalled cancellation or if we timed out - isResultNull: boolean; - -## Locations Used - -[src/interactive-window/editor-integration/hoverProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/hoverProvider.ts) -```typescript - const timeoutHandler = sleep(300).then(() => undefined); - this.stopWatch.reset(); - const result = await Promise.race([timeoutHandler, this.getVariableHover(document, position, token)]); - sendTelemetryEvent(Telemetry.InteractiveFileTooltipsPerf, this.stopWatch.elapsedTime, { - isResultNull: !!result - }); - return result; -``` - -
-
- DS_INTERNAL.INTERPRETER_LISTING_PERF - -## Description - - - - - Time taken to list the Python interpreters. - -## Properties - - -No properties for event - - -## Locations Used - -[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) -```typescript - return this.didChangeInterpreters.event; - } - - @captureTelemetry(Telemetry.InterpreterListingPerf) - @traceDecoratorVerbose('Get Interpreters', TraceOptions.Arguments | TraceOptions.BeforeCall) - public getInterpreters(resource?: Uri): Promise { - this.hookupOnDidChangeInterpreterEvent(); -``` - -
-
- DS_INTERNAL.INTERRUPT_JUPYTER_TIME - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) -```typescript - return newCellExecutionQueue; - } - @captureTelemetry(Telemetry.Interrupt) - @captureTelemetry(Telemetry.InterruptJupyterTime) - private async interruptExecution( - session: IJupyterSession, - pendingCells: Promise -``` - -
-
- DS_INTERNAL.INVALID_KERNEL_USED - -## Description - - - - - Telemetry event sent when a kernel picked crashes on startup - @type {(undefined | never)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/errors/jupyterInvalidKernelError.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/errors/jupyterInvalidKernelError.ts) -```typescript - DataScience.kernelInvalid().format(getDisplayNameOrNameOfKernelConnection(kernelConnectionMetadata)), - kernelConnectionMetadata - ); - sendTelemetryEvent(Telemetry.KernelInvalid); - } -} - -``` - -
-
- DS_INTERNAL.IPYWIDGET_DISCOVER_WIDGETS_NB_EXTENSIONS - -## Description - - - - - Total time taken to discover all IPyWidgets. - This is how long it takes to discover all widgets on disc (from python environment). - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) -```typescript - delete config['@jupyter-widgets/controls']; - delete config['@jupyter-widgets/output']; - } - sendTelemetryEvent(Telemetry.DiscoverIPyWidgetNamesPerf, stopWatch.elapsedTime, { - type: isLocalConnection(this.kernel.kernelConnectionMetadata) ? 'local' : 'remote' - }); - return config && Object.keys(config).length ? config : undefined; -``` - -
-
- DS_INTERNAL.IPYWIDGET_DISCOVERED - -## Description - - - - - Telemetry event sent with name of a Widget found. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.IPYWIDGET_DISCOVERY_ERRORED - -## Description - - - - - Something went wrong in looking for a widget. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/ipyWidgetScriptSource.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetScriptSource.ts) -```typescript - } - } catch (ex) { - traceError('Failed to get widget source due to an error', ex); - sendTelemetryEvent(Telemetry.HashedIPyWidgetScriptDiscoveryError); - } finally { - traceInfo( - `${ConsoleForegroundColors.Green}Script for ${moduleName}, is ${widgetSource.scriptUri} from ${widgetSource.source}` -``` - -
-
- DS_INTERNAL.IPYWIDGET_EXTENSIONJS_INFO - -## Description - - - - - Telemetry event sent once we've successfully or unsuccessfully parsed the extension.js file in the widget folder. - E.g. if we have a widget named ipyvolume, we attempt to parse the nbextensions/ipyvolume/extension.js file to get some info out of it. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) -```typescript - } - - if (indexOfRequireConfig < 0) { - sendTelemetryEvent(Telemetry.IPyWidgetExtensionJsInfo, undefined, { - widgetFolderNameHash, - failed: true, - patternUsedToRegisterRequireConfig, -``` - - -[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) -```typescript - // Find the end bracket for the require config call. - const endBracket = contents.indexOf(')', indexOfRequireConfig); - if (endBracket <= 0 || !patternUsedToRegisterRequireConfig) { - sendTelemetryEvent(Telemetry.IPyWidgetExtensionJsInfo, undefined, { - widgetFolderNameHash, - failed: true, - patternUsedToRegisterRequireConfig, -``` - - -[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) -```typescript - }); - - if (!requireConfig || !Object.keys(requireConfig).length) { - sendTelemetryEvent(Telemetry.IPyWidgetExtensionJsInfo, undefined, { - widgetFolderNameHash, - failed: true, - patternUsedToRegisterRequireConfig, -``` - - -[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) -```typescript - }); - return; - } - sendTelemetryEvent(Telemetry.IPyWidgetExtensionJsInfo, undefined, { - widgetFolderNameHash, - patternUsedToRegisterRequireConfig, - requireEntryPointCount: Object.keys(requireConfig).length -``` - -
-
- DS_INTERNAL.IPYWIDGET_LOAD_DISABLED - -## Description - - - - - Telemetry event sent when an loading of 3rd party ipywidget JS scripts from 3rd party source has been disabled. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.IPYWIDGET_LOAD_FAILURE - -## Description - - - - - Telemetry event sent when an ipywidget module fails to load. Module name is hashed. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) -```typescript - } - traceError(`Widget load failure ${errorMessage}`, payload); - - sendTelemetryEvent(Telemetry.IPyWidgetLoadFailure, 0, { - isOnline: payload.isOnline, - moduleHash: getTelemetrySafeHashedString(payload.moduleName), - moduleVersion: payload.moduleVersion, -``` - -
-
- DS_INTERNAL.IPYWIDGET_LOAD_SUCCESS - -## Description - - - - - Telemetry event sent when an ipywidget module loads. Module name is hashed. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) -```typescript - - private sendLoadSucceededTelemetry(payload: LoadIPyWidgetClassLoadAction) { - try { - sendTelemetryEvent(Telemetry.IPyWidgetLoadSuccess, 0, { - moduleHash: getTelemetrySafeHashedString(payload.moduleName), - moduleVersion: payload.moduleVersion - }); -``` - -
-
- DS_INTERNAL.IPYWIDGET_OVERHEAD - -## Description - - - - - Telemetry event sent to indicate the overhead of syncing the kernel with the UI. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/ipyWidgetMessageDispatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetMessageDispatcher.ts) -```typescript - } - - private sendOverheadTelemetry() { - sendTelemetryEvent(Telemetry.IPyWidgetOverhead, 0, { - totalOverheadInMs: this.totalWaitTime, - numberOfMessagesWaitedOn: this.totalWaitedMessages, - averageWaitTime: this.totalWaitTime / this.totalWaitedMessages, -``` - -
-
- DS_INTERNAL.IPYWIDGET_PROMPT_TO_USE_CDN - -## Description - - - - - Telemetry sent when we prompt user to use a CDN for IPyWidget scripts. - This is always sent when we display a prompt. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts) -```typescript - return this.configurationPromise.promise; - } - this.configurationPromise = createDeferred(); - sendTelemetryEvent(Telemetry.IPyWidgetPromptToUseCDN); - const selection = await this.appShell.showInformationMessage( - DataScience.useCDNForWidgetsNoInformation(), - { modal: true }, -``` - -
-
- DS_INTERNAL.IPYWIDGET_PROMPT_TO_USE_CDN_SELECTION - -## Description - - - - - Telemetry sent when user does something with the prompt displayed to user about using CDN for IPyWidget scripts. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts) -```typescript - break; - } - - sendTelemetryEvent(Telemetry.IPyWidgetPromptToUseCDNSelection, undefined, { selection: selectionForTelemetry }); - this.configurationPromise.resolve(); - } - private async updateScriptSources(scriptSources: WidgetCDNs[]) { -``` - -
-
- DS_INTERNAL.IPYWIDGET_RENDER_FAILURE - -## Description - - - - - Telemetry event sent when the widget render function fails (note, this may not be sufficient to capture all failures). - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) -```typescript - private sendRenderFailureTelemetry(payload: Error) { - try { - traceError('Error rendering a widget: ', payload); - sendTelemetryEvent(Telemetry.IPyWidgetRenderFailure); - } catch { - // Do nothing on a failure - } -``` - -
-
- DS_INTERNAL.IPYWIDGET_TEST_AVAILABILITY_ON_CDN - -## Description - - - - - Total time taken to discover a widget script on CDN. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.IPYWIDGET_TIME_TO_COPY_NBEXTENSIONS_DIR - -## Description - - - - - Total time take to copy the nb extensions folder. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts) -```typescript - LocalIPyWidgetScriptManager.nbExtensionsCopiedKernelConnectionList.add( - this.kernel.kernelConnectionMetadata.id - ); - sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, stopWatch.elapsedTime); - return baseUrl; - } catch (ex) { - sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, undefined, undefined, ex); -``` - - -[src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts) -```typescript - sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, stopWatch.elapsedTime); - return baseUrl; - } catch (ex) { - sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, undefined, undefined, ex); - throw ex; - } - } -``` - -
-
- DS_INTERNAL.IPYWIDGET_UNHANDLED_MESSAGE - -## Description - - - - - Telemetry event sent when the widget tries to send a kernel message but nothing was listening - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) -```typescript - this.jupyterOutput.appendLine( - DataScience.unhandledMessage().format(msg.header.msg_type, JSON.stringify(msg.content)) - ); - sendTelemetryEvent(Telemetry.IPyWidgetUnhandledMessage, undefined, { msg_type: msg.header.msg_type }); - } catch { - // Don't care if this doesn't get logged - } -``` - -
-
- DS_INTERNAL.IPYWIDGET_USED_BY_USER - -## Description - - - - - Telemetry event sent with name of a Widget that is used. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts) -```typescript - } - } - - sendTelemetryEvent(Telemetry.HashedIPyWidgetNameUsed, undefined, { - hashedName: getTelemetrySafeHashedString(found.moduleName), - source: found.source, - cdnSearched: this.configuredScriptSources.length > 0 -``` - -
-
- DS_INTERNAL.IPYWIDGET_WIDGET_VERSION_NOT_SUPPORTED_LOAD_FAILURE - -## Description - - - - - Telemetry event sent when an ipywidget version that is not supported is used & we have trapped this and warned the user abou it. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) -```typescript - } - private sendUnsupportedWidgetVersionFailureTelemetry(payload: NotifyIPyWidgetWidgetVersionNotSupportedAction) { - try { - sendTelemetryEvent(Telemetry.IPyWidgetWidgetVersionNotSupportedLoadFailure, 0, { - moduleHash: getTelemetrySafeHashedString(payload.moduleName), - moduleVersion: payload.moduleVersion - }); -``` - -
-
- DS_INTERNAL.JUPYTER_CREATING_NOTEBOOK - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/liveshare/hostJupyterServer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/liveshare/hostJupyterServer.ts) -```typescript - this.throwIfDisposedOrCancelled(cancelToken); - const baseUrl = this.connection?.baseUrl || ''; - this.logRemoteOutput(DataScience.createdNewNotebook().format(baseUrl)); - sendKernelTelemetryEvent(resource, Telemetry.JupyterCreatingNotebook, stopWatch.elapsedTime); - return session; - } catch (ex) { - sendKernelTelemetryEvent( -``` - - -[src/kernels/jupyter/launcher/liveshare/hostJupyterServer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/liveshare/hostJupyterServer.ts) -```typescript - } catch (ex) { - sendKernelTelemetryEvent( - resource, - Telemetry.JupyterCreatingNotebook, - stopWatch.elapsedTime, - undefined, - // eslint-disable-next-line @typescript-eslint/no-explicit-any -``` - -
-
- DS_INTERNAL.JUPYTER_CUSTOM_COMMAND_LINE - -## Description - - - - - Telemetry event sent to when user customizes the jupyter command line - @type {(undefined | never)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/commandLineSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/commandLineSelector.ts) -```typescript - - private async setJupyterCommandLine(val: string): Promise { - if (val) { - sendTelemetryEvent(Telemetry.JupyterCommandLineNonDefault); - } - const split = parseArgsStringToArgv(val); - await this.configuration.updateSetting( -``` - -
-
- DS_INTERNAL.JUPYTER_IDLE_TIMEOUT - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/errors/jupyterWaitForIdleError.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/errors/jupyterWaitForIdleError.ts) -```typescript -export class JupyterWaitForIdleError extends BaseKernelError { - constructor(kernelConnectionMetadata: KernelConnectionMetadata) { - super('timeout', DataScience.jupyterLaunchTimedOut(), kernelConnectionMetadata); - sendTelemetryEvent(Telemetry.SessionIdleTimeout); - } -} - -``` - -
-
- DS_INTERNAL.JUPYTER_INSTALL_FAILED - -## Description - - - - - Telemetry event sent if there's an error installing a jupyter required dependency - - @type { product: string } - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.JUPYTER_INTALLED_BUT_NO_KERNELSPEC_MODULE - -## Description - - - - - Telemetry event sent when jupyter has been found in interpreter but we cannot find kernelspec. - - @type {(never | undefined)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) -```typescript - return JupyterInterpreterDependencyResponse.ok; - } - // Indicate no kernel spec module. - sendTelemetryEvent(Telemetry.JupyterInstalledButNotKernelSpecModule); - if (Cancellation.isCanceled(token)) { - return JupyterInterpreterDependencyResponse.cancel; - } -``` - -
-
- DS_INTERNAL.JUPYTER_REGISTER_INTERPRETER_AS_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/jupyterKernelService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterKernelService.node.ts) -```typescript - */ - // eslint-disable-next-line - // eslint-disable-next-line complexity - @captureTelemetry(Telemetry.RegisterInterpreterAsKernel, undefined, true) - @traceDecoratorError('Failed to register an interpreter as a kernel') - // eslint-disable-next-line - private async registerKernel( -``` - -
-
- DS_INTERNAL.JUPYTER_START_TIMEOUT - -## Description - - -No description provided - -## Properties - -- - /** - * Total time spent in attempting to start and connect to jupyter before giving up. - * - * @type {number} - */ - timeout: number; - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.JUPYTERSTARTUPCOST - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) -```typescript - } - - // eslint-disable-next-line - @captureTelemetry(Telemetry.StartJupyter) - private async startNotebookServer( - resource: Resource, - useDefaultConfig: boolean, -``` - -
-
- DS_INTERNAL.KERNEL_COUNT - -## Description - - - - Misc - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/telemetry/kernelTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/telemetry/kernelTelemetry.ts) -```typescript - }); - trackKernelResourceInformation(resource, counters); - if (stopWatch) { - sendKernelTelemetryEvent(resource, Telemetry.KernelCount, stopWatch.elapsedTime, counters); - } -} - -``` - -
-
- DS_INTERNAL.KERNEL_ENUMERATION - -## Description - - - - - Telemetry event sent to every time a kernel enumeration is done - - @type {...} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.KERNEL_LAUNCHER_PERF - -## Description - - - - - Total time taken to Launch a raw kernel. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/launcher/kernelLauncher.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/launcher/kernelLauncher.node.ts) -```typescript - // Should be available now, wait with a timeout - return await this.launchProcess(kernelConnectionMetadata, resource, workingDirectory, timeout, cancelToken); - })(); - sendKernelTelemetryWhenDone(resource, Telemetry.KernelLauncherPerf, promise); - return promise; - } - -``` - -
-
- DS_INTERNAL.KERNEL_LISTING_PERF - -## Description - - -No description provided - -## Properties - -- - /** - * Whether this is the first time in the session. - * (fetching kernels first time in the session is slower, later its cached). - * This is a generic property supported for all telemetry (sent by decorators). - */ - firstTime?: boolean; -- - /** - * Whether this telemetry is for listing of all kernels or just python or just non-python. - * (fetching kernels first time in the session is slower, later its cached). - */ - kind: 'remote' | 'local' | 'localKernelSpec' | 'localPython'; - -## Locations Used - -[src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts) -```typescript - /** - * @param {boolean} includePythonKernels Include/exclude Python kernels in the result. - */ - @captureTelemetry(Telemetry.KernelListingPerf, { kind: 'localKernelSpec' }) - public async listKernelSpecs( - includePythonKernels: boolean, - cancelToken?: CancellationToken -``` - - -[src/kernels/raw/finder/localPythonAndRelatedNonPythonKernelSpecFinder.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/finder/localPythonAndRelatedNonPythonKernelSpecFinder.node.ts) -```typescript - ) { - super(fs, workspaceService, extensionChecker, globalState); - } - @captureTelemetry(Telemetry.KernelListingPerf, { kind: 'localPython' }) - public async listKernelSpecs(resource: Resource, ignoreCache?: boolean, cancelToken?: CancellationToken) { - // Get an id for the workspace folder, if we don't have one, use the fsPath of the resource - const workspaceFolderId = -``` - - -[src/kernels/raw/finder/localKernelFinder.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/finder/localKernelFinder.node.ts) -```typescript - * Search all our local file system locations for installed kernel specs and return them - */ - @traceDecoratorError('List kernels failed') - @captureTelemetry(Telemetry.KernelListingPerf, { kind: 'local' }) - public async listKernels( - resource: Resource, - @ignoreLogging() cancelToken?: CancellationToken -``` - - -[src/kernels/jupyter/remoteKernelFinder.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/remoteKernelFinder.ts) -```typescript - ) {} - - // Talk to the remote server to determine sessions - @captureTelemetry(Telemetry.KernelListingPerf, { kind: 'remote' }) - public async listKernels( - _resource: Resource, - connInfo: INotebookProviderConnection, -``` - -
-
- DS_INTERNAL.KERNEL_NOT_INSTALLED - -## Description - - -No description provided - -## Properties - -- - action: 'displayed'; -- // Message displayed. - /** - * Language found in the notebook if a known language. Otherwise 'unknown' - */ - language: string; - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.KERNEL_PROVIDER_PERF - -## Description - - - - - Total time taken to list kernels for VS Code. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.KERNEL_REGISTER_FAILED - -## Description - - - - - Telemetry event sent to indicate registering a kernel with jupyter failed. - - @type {(undefined | never)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.KERNEL_SPEC_NOT_FOUND - -## Description - - - - - Telemetry event sent to indicate 'jupyter kernelspec' is not possible. - - @type {(undefined | never)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) -```typescript - .then(() => true) - .catch((e) => { - traceError(`Kernel spec not found: `, e); - sendTelemetryEvent(Telemetry.KernelSpecNotFound); - return false; - }); - } -``` - -
-
- DS_INTERNAL.LOCAL_KERNEL_SPEC_COUNT - -## Description - - -No description provided - -## Properties - -- - /** - * Number of kernel specs. - */ - count: number; - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.NATIVE_VARIABLE_VIEW_LOADED - -## Description - - - - Native variable view events - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/variablesView/variableView.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/variablesView/variableView.ts) -```typescript - this.dataViewerChecker = new DataViewerChecker(configuration, appShell); - } - - @captureTelemetry(Telemetry.NativeVariableViewLoaded) - public async load(codeWebview: vscodeWebviewView) { - await super.loadWebview(Uri.file(process.cwd()), codeWebview).catch(traceError); - -``` - -
-
- DS_INTERNAL.NATIVE_VARIABLE_VIEW_MADE_VISIBLE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/variablesView/variableView.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/variablesView/variableView.ts) -```typescript - - // I've we've been made visible, make sure that we are updated - if (visible) { - sendTelemetryEvent(Telemetry.NativeVariableViewMadeVisible); - // If there is an active execution count, update the view with that info - // Keep the variables up to date if document has run cells while the view was not visible - if (this.notebookWatcher.activeNotebookExecutionCount !== undefined) { -``` - -
-
- DS_INTERNAL.NATIVE.NOTEBOOK_OPEN_COUNT - -## Description - - -No description provided - -## Properties - -- count: number - -## Locations Used - -[src/notebooks/notebookUsageTracker.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/notebookUsageTracker.ts) -```typescript - public dispose() { - // Send a bunch of telemetry - if (this.openedNotebookCount) { - sendTelemetryEvent(Telemetry.NotebookOpenCount, undefined, { count: this.openedNotebookCount }); - } - if (this.executedNotebooksIndexedByUri.size) { - sendTelemetryEvent(Telemetry.NotebookRunCount, undefined, { -``` - -
-
- DS_INTERNAL.NATIVE.NOTEBOOK_OPEN_TIME - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.NATIVE.NOTEBOOK_RUN_COUNT - -## Description - - -No description provided - -## Properties - -- count: number - -## Locations Used - -[src/notebooks/notebookUsageTracker.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/notebookUsageTracker.ts) -```typescript - sendTelemetryEvent(Telemetry.NotebookOpenCount, undefined, { count: this.openedNotebookCount }); - } - if (this.executedNotebooksIndexedByUri.size) { - sendTelemetryEvent(Telemetry.NotebookRunCount, undefined, { - count: this.executedNotebooksIndexedByUri.size - }); - } -``` - -
-
- DS_INTERNAL.NATIVE.OPEN_NOTEBOOK_FAILURE - -## Description - - - - - Telemetry event fired if a failure occurs loading a notebook - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.NEW_FILE_USED_IN_INTERACTIVE - -## Description - - - - - Telemetry event sent when a user runs the interactive window with a new file - @type {(undefined | never)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.NUMBER_OF_REMOTE_KERNEL_IDS_SAVED - -## Description - - - - When users connect to a remote kernel, we store the kernel id so we can re-connect to that - when user opens the same notebook. We only store the last 100. - Count is the number of entries saved in the list. - -## Properties - -- count: number - -## Locations Used - -[src/kernels/jupyter/preferredRemoteKernelIdProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/preferredRemoteKernelIdProvider.ts) -```typescript - } - - // Prune list if too big - sendTelemetryEvent(Telemetry.NumberOfSavedRemoteKernelIds, undefined, { count: list.length }); - while (list.length > MaximumKernelIdListSize) { - requiresUpdate = true; - list.shift(); -``` - -
-
- DS_INTERNAL.PERCEIVED_JUPYTER_STARTUP_NOTEBOOK - -## Description - - - - - Time take for jupyter server to start and be ready to run first user cell. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) -```typescript - // Setup telemetry - if (!this.perceivedJupyterStartupTelemetryCaptured) { - this.perceivedJupyterStartupTelemetryCaptured = true; - sendTelemetryEvent(Telemetry.PerceivedJupyterStartupNotebook, stopWatch.elapsedTime); - executionPromise - .finally(() => - sendTelemetryEvent(Telemetry.StartExecuteNotebookCellPerceivedCold, stopWatch.elapsedTime) -``` - - -[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) -```typescript - - sendKernelTelemetryEvent( - this.resourceUri, - Telemetry.PerceivedJupyterStartupNotebook, - stopWatch.elapsedTime - ); - this._session = session; -``` - -
-
- DS_INTERNAL.PREFERRED_KERNEL - -## Description - - - - - Telemetry sent when we have attempted to find the preferred kernel. - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/controllers/notebookControllerManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/notebookControllerManager.ts) -```typescript - ? PYTHON_LANGUAGE - : getTelemetrySafeLanguage(getLanguageInNotebookMetadata(notebookMetadata) || ''); - - sendTelemetryEvent(Telemetry.PreferredKernel, undefined, { - result: preferredConnection ? 'found' : 'notfound', - resourceType, - language: telemetrySafeLanguage, -``` - -
-
- DS_INTERNAL.PREFERRED_KERNEL_EXACT_MATCH - -## Description - - -No description provided - -## Properties - -- - matchedReason: PreferredKernelExactMatchReason; - -## Locations Used - -[src/notebooks/controllers/notebookControllerManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/notebookControllerManager.ts) -```typescript - onlyConnection && (matchReason |= PreferredKernelExactMatchReason.OnlyKernel); - topMatchIsPreferredInterpreter && (matchReason |= PreferredKernelExactMatchReason.WasPreferredInterpreter); - isExactMatch && (matchReason |= PreferredKernelExactMatchReason.IsExactMatch); - sendTelemetryEvent(Telemetry.PreferredKernelExactMatch, undefined, { - matchedReason: matchReason - }); - } -``` - -
-
- DS_INTERNAL.PYTHON_EXTENSION_INSTALLED_VIA_KERNEL_PICKER - -## Description - - -No description provided - -## Properties - -- - action: - | 'success' // Correctly installed and hooked the API - | 'failed'; - -## Locations Used - -[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) -```typescript - - if (this.extensionChecker.isPythonExtensionInstalled) { - traceInfo('Python Extension installed via Kernel Picker command'); - sendTelemetryEvent(Telemetry.PythonExtensionInstalledViaKernelPicker, undefined, { - action: 'success' - }); - -``` - - -[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) -```typescript - await this.controllerManager.loadNotebookControllers(true); - } else { - traceError('Failed to install Python Extension via Kernel Picker command'); - sendTelemetryEvent(Telemetry.PythonExtensionInstalledViaKernelPicker, undefined, { - action: 'failed' - }); - throw new Error('Failed to install Python Extension via Kernel Picker command'); -``` - -
-
- DS_INTERNAL.PYTHON_EXTENSION_NOT_INSTALLED - -## Description - - -No description provided - -## Properties - -- - action: - | 'displayed' // Message displayed. - | 'dismissed' // user dismissed the message. - | 'download'; - -## Locations Used - -[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) -```typescript - // Ask user if they want to install and then wait for them to actually install it. - const yes = localize.Common.bannerLabelYes(); - const no = localize.Common.bannerLabelNo(); - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'displayed' }); - const answer = await this.appShell.showInformationMessage( - localize.DataScience.pythonExtensionRequired(), - { modal: true }, -``` - - -[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) -```typescript - no - ); - if (answer === yes) { - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'download' }); - await this.installPythonExtension(); - } else { - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'dismissed' }); -``` - - -[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) -```typescript - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'download' }); - await this.installPythonExtension(); - } else { - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'dismissed' }); - } - } - private async installPythonExtension() { -``` - - -[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) -```typescript - // click run again - private async installPythonExtensionViaKernelPicker(): Promise { - if (!this.extensionChecker.isPythonExtensionInstalled) { - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'displayed' }); - - // First present a simple modal dialog to indicate what we are about to do - const selection = await this.appShell.showInformationMessage( -``` - - -[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) -```typescript - Common.install() - ); - if (selection === Common.install()) { - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'download' }); - } else { - // If they don't want to install, just bail out at this point - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'dismissed' }); -``` - - -[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) -```typescript - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'download' }); - } else { - // If they don't want to install, just bail out at this point - sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'dismissed' }); - return; - } - -``` - -
-
- DS_INTERNAL.PYTHON_KERNEL_EXECUTABLE_MATCHES - -## Description - - - - - Telemetry sent for local Python Kernels. - Tracking whether we have managed to launch the kernel that matches the interpreter. - If match=false, then this means we have failed to launch the right kernel. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/helpers.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/helpers.node.ts) -```typescript - } - const sysExecutable = concatMultilineString(output.text).trim().toLowerCase(); - const match = areInterpreterPathsSame(kernelConnection.interpreter.uri, Uri.file(sysExecutable)); - sendTelemetryEvent(Telemetry.PythonKerneExecutableMatches, undefined, { - match: match ? 'true' : 'false', - kernelConnectionType: kernelConnection.kind - }); -``` - - -[src/kernels/helpers.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/helpers.node.ts) -```typescript - Uri.file(execOutput.stdout.trim().toLowerCase()), - Uri.file(sysExecutable) - ); - sendTelemetryEvent(Telemetry.PythonKerneExecutableMatches, undefined, { - match: match ? 'true' : 'false', - kernelConnectionType: kernelConnection.kind - }); -``` - -
-
- DS_INTERNAL.PYTHON_MODULE_INSTALL - -## Description - - -No description provided - -## Properties - -- - moduleName: string; -- - /** - * Whether the module was already (once before) installed into the python environment or - * whether this already exists (detected via `pip list`) - */ - isModulePresent?: 'true' | undefined; -- - action: - | 'cancelled' // User cancelled the installation or closed the notebook or the like. - | 'displayed' // Install prompt may have been displayed. - | 'prompted' // Install prompt was displayed. - | 'installed' // Installation disabled (this is what python extension returns). - | 'ignored' // Installation disabled (this is what python extension returns). - | 'disabled' // Installation disabled (this is what python extension returns). - | 'failed' // Installation disabled (this is what python extension returns). - | 'install' // User chose install from prompt. - | 'donotinstall' // User chose not to install from prompt. - | 'differentKernel' // User chose to select a different kernel. - | 'error' // Some other error. - | 'installedInJupyter' // The package was successfully installed in Jupyter whilst failed to install in Python ext. - | 'failedToInstallInJupyter' // Failed to install the package in Jupyter as well as Python ext. - | 'dismissed'; -- // User chose to dismiss the prompt. - resourceType?: 'notebook' | 'interactive'; -- - /** - * Hash of the resource (notebook.uri or pythonfile.uri associated with this). - * If we run the same notebook tomorrow, the hash will be the same. - */ - resourceHash?: string; -- - pythonEnvType?: EnvironmentType; - -## Locations Used - -[src/kernels/installer/productInstaller.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/installer/productInstaller.node.ts) -```typescript - action = 'failed'; - throw ex; - } finally { - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action, - moduleName: ProductNames.get(product)! - }); -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - const productNameForTelemetry = products.map((product) => ProductNames.get(product)!).join(', '); - const resourceType = resource ? getResourceType(resource) : undefined; - const resourceHash = resource ? getTelemetrySafeHashedString(resource.toString()) : undefined; - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'displayed', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - : [Common.install()]; - try { - if (!this.isCodeSpace) { - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'prompted', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - promptCancellationPromise - ]); - if (cancelTokenSource.token.isCancellationRequested) { - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'dismissed', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - return KernelInterpreterDependencyResponse.cancel; - } - if (selection === selectKernel) { - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'differentKernel', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - }); - return KernelInterpreterDependencyResponse.selectDifferentKernel; - } else if (selection === Common.install()) { - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'install', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - cancellationPromise - ]); - if (response === InstallerResponse.Installed) { - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'installed', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - }); - return KernelInterpreterDependencyResponse.ok; - } else if (response === InstallerResponse.Ignore) { - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'failed', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - } - } - - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'dismissed', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) -```typescript - return KernelInterpreterDependencyResponse.cancel; - } catch (ex) { - traceError(`Failed to install ${productNameForTelemetry}`, ex); - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'error', - moduleName: productNameForTelemetry, - resourceType, -``` - - -[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) -```typescript - pipInstalledInNonCondaEnv === false ? [Product.pip].concat(missingProducts) : missingProducts, - interpreter.displayName - ); - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'displayed', - moduleName: ProductNames.get(Product.jupyter)!, - pythonEnvType: interpreter.envType -``` - - -[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) -```typescript - interpreter: PythonEnvironment, - tokenSource: CancellationTokenSource - ): Promise { - sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { - action: 'displayed', - moduleName: ProductNames.get(Product.pandas)!, - pythonEnvType: interpreter?.envType -``` - -
-
- DS_INTERNAL.PYTHON_NOT_INSTALLED - -## Description - - -No description provided - -## Properties - -- - action: - | 'displayed' // Message displayed. - | 'dismissed' // user dismissed the message. - | 'download'; - -## Locations Used - -[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) -```typescript - // Unlike installing the python extension we don't expect in progress executions to be handled - // when this command is installed, user will have to manually install python and rerun the cell - private async installPythonViaKernelPicker(): Promise { - sendTelemetryEvent(Telemetry.PythonNotInstalled, undefined, { action: 'displayed' }); - const selection = await this.appShell.showErrorMessage( - DataScience.pythonNotInstalledNonMarkdown(), - { modal: true }, -``` - - -[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) -```typescript - ); - - if (selection === Common.install()) { - sendTelemetryEvent(Telemetry.PythonNotInstalled, undefined, { action: 'download' }); - // Direct the user to download from python.org - this.appShell.openUrl('https://www.python.org/downloads'); - } else { -``` - - -[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) -```typescript - // Direct the user to download from python.org - this.appShell.openUrl('https://www.python.org/downloads'); - } else { - sendTelemetryEvent(Telemetry.PythonNotInstalled, undefined, { action: 'dismissed' }); - } - } - -``` - -
-
- DS_INTERNAL.RANK_KERNELS_PERF - -## Description - - - - - Total time taken to find a kernel on disc or on a remote machine. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/kernelFinder.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelFinder.base.ts) -```typescript - ) {} - - @traceDecoratorVerbose('Rank Kernels', TraceOptions.BeforeCall | TraceOptions.Arguments) - @captureTelemetry(Telemetry.RankKernelsPerf) - public async rankKernels( - resource: Resource, - notebookMetadata?: nbformat.INotebookMetadata, -``` - -
-
- DS_INTERNAL.RAWKERNEL_CREATING_NOTEBOOK - -## Description - - - - Telemetry send when we create a notebook for a raw kernel or jupyter - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/hostRawNotebookProvider.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/hostRawNotebookProvider.node.ts) -```typescript - return this.rawNotebookSupportedService.isSupported; - } - - @captureTelemetry(Telemetry.RawKernelCreatingNotebook, undefined, true) - public async createNotebook( - resource: Resource, - kernelConnection: KernelConnectionMetadata, -``` - -
-
- DS_INTERNAL.RAWKERNEL_INFO_RESPONSE - -## Description - - - - - After starting a kernel we send a request to get the kernel info. - This tracks the total time taken to get the response back (or wether we timedout). - If we timeout and later we find successful comms for this session, then timeout is too low - or we need more attempts. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - } else { - traceWarning(`Didn't get response for requestKernelInfo after ${stopWatch.elapsedTime}ms.`); - } - sendTelemetryEvent(Telemetry.RawKernelInfoResonse, stopWatch.elapsedTime, { - attempts, - timedout: !gotIoPubMessage.completed - }); -``` - -
-
- DS_INTERNAL.RAWKERNEL_PROCESS_LAUNCH - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/launcher/kernelProcess.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/launcher/kernelProcess.node.ts) -```typescript - } - } - - @captureTelemetry(Telemetry.RawKernelProcessLaunch, undefined, true) - public async launch(workingDirectory: string, timeout: number, cancelToken: CancellationToken): Promise { - if (this.launchedOnce) { - throw new Error('Kernel has already been launched.'); -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_CONNECT - -## Description - - - - Raw kernel timing events - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - throw error; - } - } finally { - sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionConnect, stopWatch.elapsedTime); - } - - this.connected = true; -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_DISPOSED - -## Description - - - - - This event is sent when a RawSession's `dispose` method is called. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawSession.node.ts) -```typescript - public async dispose() { - // We want to know who called dispose on us - const stacktrace = new Error().stack; - sendTelemetryEvent(Telemetry.RawKernelSessionDisposed, undefined, { stacktrace }); - - // Now actually dispose ourselves - this.isDisposing = true; -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_KERNEL_PROCESS_EXITED - -## Description - - - - - This event is sent when the underlying kernelProcess for a - RawJupyterSession exits. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/launcher/kernelLauncher.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/launcher/kernelLauncher.node.ts) -```typescript - - const disposable = kernelProcess.exited( - ({ exitCode, reason }) => { - sendTelemetryEvent(Telemetry.RawKernelSessionKernelProcessExited, undefined, { - exitCode, - exitReason: getTelemetrySafeErrorMessageFromPythonTraceback(reason) - }); -``` - - -[src/kernels/raw/session/rawSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawSession.node.ts) -```typescript - traceError(`Disposing session as kernel process died ExitCode: ${e.exitCode}, Reason: ${e.reason}`); - // Send telemetry so we know why the kernel process exited, - // as this affects our kernel startup success - sendTelemetryEvent(Telemetry.RawKernelSessionKernelProcessExited, undefined, { - exitCode: e.exitCode, - exitReason: getTelemetrySafeErrorMessageFromPythonTraceback(e.reason) - }); -``` - - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - if (session !== this.session) { - return; - } - sendTelemetryEvent(Telemetry.RawKernelSessionKernelProcessExited, undefined, { - exitCode, - exitReason: getTelemetrySafeErrorMessageFromPythonTraceback(reason) - }); -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_NO_IPYKERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/controllers/kernelConnector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/kernelConnector.ts) -```typescript - const rawNotebookProvider = serviceContainer.tryGet(IRawNotebookProvider); - const rawLocalKernel = rawNotebookProvider?.isSupported && isLocal; - if (rawLocalKernel && errorContext === 'start') { - sendKernelTelemetryEvent(resource, Telemetry.RawKernelSessionStartNoIpykernel, { - reason: handleResult - }); - } -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_SHUTDOWN - -## Description - - - - - This event is sent when a RawJupyterSession's `shutdownSession` - method is called. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - // We want to know why we got shut down - const stacktrace = new Error().stack; - return super.shutdownSession(session, statusHandler, isRequestToShutdownRestartSession).then(() => { - sendTelemetryEvent(Telemetry.RawKernelSessionShutdown, undefined, { - isRequestToShutdownRestartSession, - stacktrace - }); -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_START - -## Description - - - - Raw kernel single events - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - Cancellation.throwIfCanceled(options.token); - // Only connect our session if we didn't cancel or timeout - sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStartSuccess); - sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStart, stopWatch.elapsedTime); - traceInfo( - `${DataScience.kernelStarted().format( - getDisplayNameOrNameOfKernelConnection(this.kernelConnectionMetadata) -``` - - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - if (isCancellationError(error) || options.token.isCancellationRequested) { - sendKernelTelemetryEvent( - this.resource, - Telemetry.RawKernelSessionStart, - stopWatch.elapsedTime, - undefined, - error -``` - - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - } else if (error instanceof TimedOutError) { - sendKernelTelemetryEvent( - this.resource, - Telemetry.RawKernelSessionStart, - stopWatch.elapsedTime, - undefined, - error -``` - - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - // Send our telemetry event with the error included - sendKernelTelemetryEvent( - this.resource, - Telemetry.RawKernelSessionStart, - stopWatch.elapsedTime, - undefined, - // eslint-disable-next-line @typescript-eslint/no-explicit-any -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_START_EXCEPTION - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - ); - sendKernelTelemetryEvent( - this.resource, - Telemetry.RawKernelSessionStartException, - undefined, - undefined, - // eslint-disable-next-line @typescript-eslint/no-explicit-any -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_START_SUCCESS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - newSession = await this.startRawSession(options); - Cancellation.throwIfCanceled(options.token); - // Only connect our session if we didn't cancel or timeout - sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStartSuccess); - sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStart, stopWatch.elapsedTime); - traceInfo( - `${DataScience.kernelStarted().format( -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_START_TIMEOUT - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - undefined, - error - ); - sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStartTimeout); - traceError('Raw session failed to start in given timeout'); - throw error; - } else { -``` - -
-
- DS_INTERNAL.RAWKERNEL_SESSION_START_USER_CANCEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - undefined, - error - ); - sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStartUserCancel); - traceVerbose('Starting of raw session cancelled by user'); - throw error; - } else if (error instanceof TimedOutError) { -``` - -
-
- DS_INTERNAL.RAWKERNEL_START_RAW_SESSION - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) -```typescript - return this.startRawSession({ token: cancelToken, ui: new DisplayOptions(disableUI) }); - } - - @captureTelemetry(Telemetry.RawKernelStartRawSession, undefined, true) - private async startRawSession(options: { token: CancellationToken; ui: IDisplayOptions }): Promise { - if ( - this.kernelConnectionMetadata.kind !== 'startUsingLocalKernelSpec' && -``` - -
-
- DS_INTERNAL.REGISTER_AND_USE_INTERPRETER_AS_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/jupyterKernelService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterKernelService.node.ts) -```typescript - ); - } - - sendTelemetryEvent(Telemetry.RegisterAndUseInterpreterAsKernel); - return kernelSpecFilePath.fsPath; - } - private async updateKernelEnvironment( -``` - -
-
- DS_INTERNAL.REMOTE_KERNEL_SPEC_COUNT - -## Description - - -No description provided - -## Properties - -- - /** - * Number of kernel specs. - */ - count: number; - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.RESTART_JUPYTER_TIME - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) -```typescript - } - - @captureTelemetry(Telemetry.RestartKernel) - @captureTelemetry(Telemetry.RestartJupyterTime) - private async restartExecution(session: IJupyterSession): Promise { - // Just use the internal session. Pending cells should have been canceled by the caller - await session.restart(); -``` - -
-
- DS_INTERNAL.RESTART_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) -```typescript - }); - } - - @captureTelemetry(Telemetry.RestartKernel) - @captureTelemetry(Telemetry.RestartJupyterTime) - private async restartExecution(session: IJupyterSession): Promise { - // Just use the internal session. Pending cells should have been canceled by the caller -``` - -
-
- DS_INTERNAL.RUNTEST - -## Description - - -No description provided - -## Properties - -- - testName: string; -- - testResult: string; -- - perfWarmup?: 'true'; -- - commitHash?: string; -- - timedCheckpoints?: string; - -## Locations Used - -[src/test/testHooks.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/testHooks.node.ts) -```typescript - dimensions = { ...dimensions, commitHash: process.env.GIT_SHA }; - } - - traceInfoIfCI(`Sending telemetry event ${Telemetry.RunTest} with dimensions ${dimensions}`); - telemetryReporter.sendDangerousTelemetryEvent(Telemetry.RunTest, dimensions, measures); - }, - afterAll: async () => { -``` - - -[src/test/testHooks.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/testHooks.node.ts) -```typescript - } - - traceInfoIfCI(`Sending telemetry event ${Telemetry.RunTest} with dimensions ${dimensions}`); - telemetryReporter.sendDangerousTelemetryEvent(Telemetry.RunTest, dimensions, measures); - }, - afterAll: async () => { - if (!IS_CI_SERVER) { -``` - -
-
- DS_INTERNAL.SELECT_JUPYTER_INTERPRETER - -## Description - - -No description provided - -## Properties - -- - /** - * The result of the selection. - * notSelected - No interpreter was selected. - * selected - An interpreter was selected (and configured to have jupyter and notebook). - * installationCancelled - Installation of jupyter and/or notebook was cancelled for an interpreter. - * - * @type {('notSelected' | 'selected' | 'installationCancelled')} - */ - result?: 'notSelected' | 'selected' | 'installationCancelled'; - -## Locations Used - -[src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts) -```typescript - public async selectInterpreter(): Promise { - const interpreter = await this.jupyterInterpreterSelector.selectInterpreter(); - if (!interpreter) { - sendTelemetryEvent(Telemetry.SelectJupyterInterpreter, undefined, { result: 'notSelected' }); - return; - } - -``` - - -[src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts) -```typescript - return interpreter; - } - case JupyterInterpreterDependencyResponse.cancel: - sendTelemetryEvent(Telemetry.SelectJupyterInterpreter, undefined, { result: 'installationCancelled' }); - return; - default: - return this.selectInterpreter(); -``` - - -[src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts) -```typescript - this._selectedInterpreter = interpreter; - this._onDidChangeInterpreter.fire(interpreter); - this.interpreterSelectionState.updateSelectedPythonPath(interpreter.uri); - sendTelemetryEvent(Telemetry.SelectJupyterInterpreter, undefined, { result: 'selected' }); - } - - // For a given python path check if it can run jupyter for us -``` - -
-
- DS_INTERNAL.SELECT_JUPYTER_INTERPRETER_MESSAGE_DISPLAYED - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.node.ts) -```typescript - if (!interpreter) { - // Unlikely scenario, user hasn't selected python, python extension will fall over. - // Get user to select something. - sendTelemetryEvent(Telemetry.SelectJupyterInterpreterMessageDisplayed); - return DataScience.selectJupyterInterpreter(); - } - } -``` - -
-
- DS_INTERNAL.SETTINGS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/standalone/activation/globalActivation.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/activation/globalActivation.ts) -```typescript - resultSettings[k] = currentValue; - } - } - sendTelemetryEvent(Telemetry.DataScienceSettings, 0, resultSettings); - } - } -} -``` - -
-
- DS_INTERNAL.SHIFTENTER_BANNER_SHOWN - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/interactive-window/shiftEnterBanner.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/shiftEnterBanner.ts) -```typescript - return; - } - - sendTelemetryEvent(Telemetry.ShiftEnterBannerShown); - const response = await this.appShell.showInformationMessage(this.bannerMessage, ...this.bannerLabels); - switch (response) { - case this.bannerLabels[InteractiveShiftEnterLabelIndex.Yes]: { -``` - - -[src/test/datascience/shiftEnterBanner.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/shiftEnterBanner.unit.test.ts) -```typescript - config.verifyAll(); - - expect(Reporter.eventNames).to.deep.equal([ - Telemetry.ShiftEnterBannerShown, - Telemetry.EnableInteractiveShiftEnter - ]); - }); -``` - - -[src/test/datascience/shiftEnterBanner.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/shiftEnterBanner.unit.test.ts) -```typescript - config.verifyAll(); - - expect(Reporter.eventNames).to.deep.equal([ - Telemetry.ShiftEnterBannerShown, - Telemetry.DisableInteractiveShiftEnter - ]); - }); -``` - -
-
- DS_INTERNAL.SHOW_DATA_NO_PANDAS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) -```typescript - throw new Error(DataScience.pandasTooOldForViewingFormat().format(versionStr)); - } - - sendTelemetryEvent(Telemetry.PandasNotInstalled); - await this.installMissingDependencies(interpreter, tokenSource); - } finally { - tokenSource.dispose(); -``` - -
-
- DS_INTERNAL.SHOW_DATA_PANDAS_TOO_OLD - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) -```typescript - if (isVersionOfPandasSupported(pandasVersion)) { - return; - } - sendTelemetryEvent(Telemetry.PandasTooOld); - // Warn user that we cannot start because pandas is too old. - const versionStr = `${pandasVersion.major}.${pandasVersion.minor}.${pandasVersion.build}`; - throw new Error(DataScience.pandasTooOldForViewingFormat().format(versionStr)); -``` - -
-
- DS_INTERNAL.START_EXECUTE_NOTEBOOK_CELL_PERCEIVED_COLD - -## Description - - - - - Time take for jupyter server to be busy from the time user first hit `run` cell until jupyter reports it is busy running a cell. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) -```typescript - sendTelemetryEvent(Telemetry.PerceivedJupyterStartupNotebook, stopWatch.elapsedTime); - executionPromise - .finally(() => - sendTelemetryEvent(Telemetry.StartExecuteNotebookCellPerceivedCold, stopWatch.elapsedTime) - ) - .catch(noop); - } -``` - -
-
- DS_INTERNAL.START_JUPYTER_PROCESS - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/launcher/notebookStarter.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/notebookStarter.node.ts) -```typescript - } - - // Fire off telemetry for the process being talkable - sendTelemetryEvent(Telemetry.StartJupyterProcess, stopWatch.elapsedTime); - - try { - const port = parseInt(url.parse(connection.baseUrl).port || '0', 10); -``` - -
-
- DS_INTERNAL.START_RAW_FAILED_UI_DISABLED - -## Description - - - - Telemetry sent when starting auto starting Native Notebook kernel fails silently. - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.START_SESSION_FAILED_JUPYTER - -## Description - - - - - Telemetry event sent when starting a session for a local connection failed. - - @type {(undefined | never)} - @memberof IEventNamePropertyMapping - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/common/baseJupyterSession.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/common/baseJupyterSession.ts) -```typescript -export class JupyterSessionStartError extends WrappedError { - constructor(originalException: Error) { - super(originalException.message, originalException); - sendTelemetryEvent(Telemetry.StartSessionFailedJupyter, undefined, undefined, originalException, true); - } -} - -``` - -
-
- DS_INTERNAL.SWITCH_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) -```typescript - default: - // We don't know as its the default kernel on Jupyter server. - } - sendKernelTelemetryEvent(document.uri, Telemetry.SwitchKernel); - // If we have an existing kernel, then we know for a fact the user is changing the kernel. - // Else VSC is just setting a kernel for a notebook after it has opened. - if (existingKernel) { -``` - - -[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) -```typescript - // Right now this is the guaranteed list. Might want to expand this. - assertEvent(Telemetry.RunFileInteractive); - assertEvent(Telemetry.ExecuteCellPerceivedWarm); - assertEvent(Telemetry.SwitchKernel); - }); -}); - -``` - -
-
- DS_INTERNAL.SWITCH_TO_EXISTING_KERNEL - -## Description - - -No description provided - -## Properties - -- language: string - -## Locations Used - -[src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts) -```typescript -import { getTelemetrySafeLanguage } from '../../telemetry/helpers'; - -export function sendNotebookOrKernelLanguageTelemetry( - telemetryEvent: Telemetry.SwitchToExistingKernel | Telemetry.NotebookLanguage, - language?: string -) { - language = getTelemetrySafeLanguage(language); -``` - - -[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) -```typescript - } - switch (this.connection.kind) { - case 'startUsingPythonInterpreter': - sendNotebookOrKernelLanguageTelemetry(Telemetry.SwitchToExistingKernel, PYTHON_LANGUAGE); - break; - case 'connectToLiveRemoteKernel': - sendNotebookOrKernelLanguageTelemetry( -``` - - -[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) -```typescript - break; - case 'connectToLiveRemoteKernel': - sendNotebookOrKernelLanguageTelemetry( - Telemetry.SwitchToExistingKernel, - this.connection.kernelModel.language - ); - break; -``` - - -[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) -```typescript - case 'startUsingLocalKernelSpec': - case 'startUsingRemoteKernelSpec': - sendNotebookOrKernelLanguageTelemetry( - Telemetry.SwitchToExistingKernel, - this.connection.kernelSpec.language - ); - break; -``` - -
-
- DS_INTERNAL.SWITCH_TO_INTERPRETER_AS_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.SYNC_ALL_CELLS - -## Description - - - - Sync events - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.SYNC_SINGLE_CELL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.USE_EXISTING_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.USE_INTERPRETER_AS_KERNEL - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.VARIABLE_EXPLORER_FETCH_TIME - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/variables/jupyterVariables.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/jupyterVariables.ts) -```typescript - } - - // IJupyterVariables implementation - @captureTelemetry(Telemetry.VariableExplorerFetchTime, undefined, true) - public async getVariables(request: IJupyterVariablesRequest, kernel?: IKernel): Promise { - return this.variableHandler.getVariables(request, kernel); - } -``` - -
-
- DS_INTERNAL.VARIABLE_EXPLORER_VARIABLE_COUNT - -## Description - - -No description provided - -## Properties - -- variableCount: number - -## Locations Used - -[src/webviews/extension-side/variablesView/variableView.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/variablesView/variableView.ts) -```typescript - const response = await this.variables.getVariables(args, activeNotebook); - - this.postMessage(InteractiveWindowMessages.GetVariablesResponse, response).ignoreErrors(); - sendTelemetryEvent(Telemetry.VariableExplorerVariableCount, undefined, { - variableCount: response.totalCount - }); - } else { -``` - -
-
- DS_INTERNAL.VSCNOTEBOOK_CELL_TRANSLATION_FAILED - -## Description - - -No description provided - -## Properties - -- - isErrorOutput: boolean; - -## Locations Used - -[src/kernels/execution/helpers.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/helpers.ts) -```typescript - // Unless we already know its an unknown output type. - const outputType: nbformat.OutputType = - customMetadata?.outputType || (isStream ? 'stream' : 'display_data'); - sendTelemetryEvent(Telemetry.VSCNotebookCellTranslationFailed, undefined, { - isErrorOutput: outputType === 'error' - }); - -``` - -
-
- DS_INTERNAL.WAIT_FOR_IDLE_JUPYTER - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/session/jupyterSession.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/session/jupyterSession.ts) -```typescript - return true; - } - - @captureTelemetry(Telemetry.WaitForIdleJupyter, undefined, true) - public waitForIdle(timeout: number): Promise { - // Wait for idle on this session - return this.waitForIdleOnSession(this.session, timeout); -``` - -
-
- DS_INTERNAL.WEB_FETCH_ERROR - -## Description - - - - - Event sent when trying to talk to a remote server and the browser gives us a generic fetch error - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) -```typescript - } - } else { - if (err.message.includes('Failed to fetch') && this.isWebExtension) { - sendTelemetryEvent(Telemetry.FetchError, undefined, { currentTask: 'connecting' }); - } - await this.errorHandler.handleError( - new RemoteJupyterServerConnectionError(userURI, computeServerId(userURI), err) -``` - -
-
- DS_INTERNAL.WEBVIEW_STARTUP - -## Description - - -No description provided - -## Properties - -- type: string - -## Locations Used - -[src/platform/webviews/webviewHost.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/webviews/webviewHost.ts) -```typescript - protected webViewRendered() { - if (this.webviewInit && !this.webviewInit.resolved) { - // Send telemetry for startup - sendTelemetryEvent(Telemetry.WebviewStartup, this.startupStopwatch.elapsedTime, { type: this.title }); - - // Resolve our started promise. This means the webpanel is ready to go. - this.webviewInit.resolve(); -``` - -
-
- DS_INTERNAL.WEBVIEW_STYLE_UPDATE - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -Event can be removed. Not referenced anywhere - -
-
- DS_INTERNAL.ZMQ_NATIVE_BINARIES_LOADING - -## Description - - - - - Telemetry event sent when the ZMQ native binaries do work. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawNotebookSupportedService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawNotebookSupportedService.node.ts) -```typescript - try { - require('zeromq'); - traceInfo(`ZMQ install verified.`); - sendTelemetryEvent(Telemetry.ZMQSupported); - this._isSupported = true; - } catch (e) { - traceError(`Exception while attempting zmq :`, e); -``` - -
-
- DS_INTERNAL.ZMQ_NATIVE_BINARIES_NOT_LOADING - -## Description - - - - - Telemetry event sent when the ZMQ native binaries do not work. - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/raw/session/rawNotebookSupportedService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawNotebookSupportedService.node.ts) -```typescript - this._isSupported = true; - } catch (e) { - traceError(`Exception while attempting zmq :`, e); - sendTelemetryEvent(Telemetry.ZMQNotSupported); - this._isSupported = false; - } - -``` - -
-
- ENVFILE_VARIABLE_SUBSTITUTION - -## Description - - - - - Telemetry event sent when substituting Environment variables to calculate value of variables - -## Properties - - -No properties for event - - -## Locations Used - -[src/platform/common/variables/environment.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/variables/environment.node.ts) -```typescript - }); - if (!invalid && replacement !== value) { - value = replacement; - sendTelemetryEvent(EventName.ENVFILE_VARIABLE_SUBSTITUTION); - } - - return value.replace(/\\\$/g, '$'); -``` - -
-
- ENVFILE_WORKSPACE - -## Description - - - - - Telemetry event sent when an environment file is detected in the workspace. - -## Properties - - -No properties for event - - -## Locations Used - -[src/telemetry/envFileTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/telemetry/envFileTelemetry.node.ts) -```typescript -} - -function sendTelemetry(hasCustomEnvPath: boolean = false) { - sendTelemetryEvent(EventName.ENVFILE_WORKSPACE, undefined, { hasCustomEnvPath }); - - envFileTelemetrySent = true; -} -``` - -
-
- EXTENSION.LOAD - -## Description - - - - - Telemetry event sent with details just after editor loads - -## Properties - - -No properties for event - - -## Locations Used - -[src/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/telemetry/startupTelemetry.ts) -```typescript - await activatedPromise; - durations.totalActivateTime = stopWatch.elapsedTime; - const props = await getActivationTelemetryProps(serviceContainer); - sendTelemetryEvent(EventName.EXTENSION_LOAD, durations, props); - } catch (ex) { - traceError('sendStartupTelemetry() failed.', ex); - } -``` - - -[src/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/telemetry/startupTelemetry.ts) -```typescript - traceError('getActivationTelemetryProps() failed.', ex); - } - } - sendTelemetryEvent(EventName.EXTENSION_LOAD, durations, props, ex); - } catch (exc2) { - traceError('sendErrorTelemetry() failed.', exc2); - } -``` - - -[src/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/telemetry/startupTelemetry.ts) -```typescript - -async function getActivationTelemetryProps( - serviceContainer: IServiceContainer -): Promise { - // eslint-disable-next-line - // TODO: Not all of this data is showing up in the database... - // eslint-disable-next-line -``` - -
-
- HASHED_PACKAGE_NAME - -## Description - - - - - Telemetry event sent with details when tracking imports - -## Properties - - -No properties for event - - -## Locations Used - -[src/standalone/import-export/importTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/importTracker.node.ts) -```typescript - // Hash the package name so that we will never accidentally see a - // user's private package name. - const hash = getTelemetrySafeHashedString(packageName); - sendTelemetryEvent(EventName.HASHED_PACKAGE_NAME, undefined, { hashedNamev2: hash }); - } - - private lookForImports(lines: (string | undefined)[]) { -``` - - -[src/test/telemetry/importTracker.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/telemetry/importTracker.unit.test.ts) -```typescript - public static expectHashes(...hashes: string[]) { - expect(Reporter.eventNames).to.contain(EventName.HASHED_PACKAGE_PERF); - if (hashes.length > 0) { - expect(Reporter.eventNames).to.contain(EventName.HASHED_PACKAGE_NAME); - } - - Reporter.properties.pop(); // HASHED_PACKAGE_PERF -``` - -
-
- HASHED_PACKAGE_PERF - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/standalone/import-export/importTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/importTracker.node.ts) -```typescript - } - } - - @captureTelemetry(EventName.HASHED_PACKAGE_PERF) - private checkNotebookDocument(e: NotebookDocument) { - this.pendingChecks.delete(e.uri.fsPath); - const lines = this.getNotebookDocumentLines(e); -``` - - -[src/standalone/import-export/importTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/importTracker.node.ts) -```typescript - this.lookForImports(lines); - } - - @captureTelemetry(EventName.HASHED_PACKAGE_PERF) - private checkNotebookCell(e: NotebookCellExecutionStateChangeEvent) { - if (!isJupyterNotebook(e.cell.notebook)) { - return; -``` - - -[src/standalone/import-export/importTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/importTracker.node.ts) -```typescript - this.lookForImports(result); - } - - @captureTelemetry(EventName.HASHED_PACKAGE_PERF) - private checkDocument(document: TextDocument) { - this.pendingChecks.delete(document.fileName); - const lines = this.getDocumentLines(document); -``` - - -[src/test/telemetry/importTracker.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/telemetry/importTracker.unit.test.ts) -```typescript - public static measures: {}[] = []; - - public static expectHashes(...hashes: string[]) { - expect(Reporter.eventNames).to.contain(EventName.HASHED_PACKAGE_PERF); - if (hashes.length > 0) { - expect(Reporter.eventNames).to.contain(EventName.HASHED_PACKAGE_NAME); - } -``` - -
-
- JUPYTER_EXPERIMENTS_OPT_IN_OUT - -## Description - - - - - Telemetry event sent with details when a user has requested to opt it or out of an experiment group - -## Properties - - -No properties for event - - -## Locations Used - -[src/platform/common/experiments/service.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/experiments/service.ts) -```typescript - // so we need to perform these checks and send the corresponding telemetry manually. - switch (this.getOptInOptOutStatus(experiment)) { - case 'optOut': { - sendTelemetryEvent(EventName.JUPYTER_EXPERIMENTS_OPT_IN_OUT, undefined, { - expNameOptedOutOf: experiment - }); - -``` - - -[src/platform/common/experiments/service.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/experiments/service.ts) -```typescript - } - case 'optIn': { - await this.experimentationService.isCachedFlightEnabled(experiment); - sendTelemetryEvent(EventName.JUPYTER_EXPERIMENTS_OPT_IN_OUT, undefined, { - expNameOptedInto: experiment - }); - -``` - - -[src/test/common/experiments/service.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/common/experiments/service.unit.test.ts) -```typescript - assert.isTrue(result); - assert.equal(telemetryEvents.length, 1); - assert.deepEqual(telemetryEvents[0], { - eventName: EventName.JUPYTER_EXPERIMENTS_OPT_IN_OUT, - properties: { expNameOptedInto: experiment } - }); - sinon.assert.calledOnce(isCachedFlightEnabledStub); -``` - - -[src/test/common/experiments/service.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/common/experiments/service.unit.test.ts) -```typescript - assert.isFalse(result); - assert.equal(telemetryEvents.length, 1); - assert.deepEqual(telemetryEvents[0], { - eventName: EventName.JUPYTER_EXPERIMENTS_OPT_IN_OUT, - properties: { expNameOptedOutOf: experiment } - }); - sinon.assert.notCalled(isCachedFlightEnabledStub); -``` - -
-
- JUPYTER_IS_INSTALLED - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/kernels/jupyter/jupyterDetectionTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterDetectionTelemetry.node.ts) -```typescript - const minor = parseInt(versionMatch[2], 10); - const frontEndVersion = parseFloat(`${major}.${minor}`); - if (shell) { - sendTelemetryEvent(Telemetry.JupyterInstalled, undefined, { - frontEnd, - frontEndVersion, - detection: 'shell', -``` - - -[src/kernels/jupyter/jupyterDetectionTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterDetectionTelemetry.node.ts) -```typescript - shellType: shell - }); - } else { - sendTelemetryEvent(Telemetry.JupyterInstalled, undefined, { - frontEnd, - frontEndVersion, - detection: 'process' -``` - - -[src/kernels/jupyter/jupyterDetectionTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterDetectionTelemetry.node.ts) -```typescript - }); - } - } else { - sendTelemetryEvent(Telemetry.JupyterInstalled, undefined, { - failed: true, - reason: 'notInstalled', - frontEnd -``` - - -[src/kernels/jupyter/jupyterDetectionTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterDetectionTelemetry.node.ts) -```typescript - }); - } - } catch (ex) { - sendTelemetryEvent(Telemetry.JupyterInstalled, undefined, { - failed: true, - reason: 'notInstalled', - frontEnd -``` - -
-
- OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_ERROR_EX - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts) -```typescript - sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_SUCCESS); - } - } catch (e) { - sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_ERROR, undefined, undefined, e); - traceError(e); - this.errorHandler.handleError(e).then(noop, noop); - } -``` - -
-
- OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_REQUEST_EX - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts) -```typescript - this.disposables.push(disposable); - } - private async onVariablePanelShowDataViewerRequest(request: IShowDataViewerFromVariablePanel) { - sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_REQUEST); - if ( - this.debugService?.activeDebugSession && - this.variableProvider && -``` - -
-
- OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_SUCCESS_EX - -## Description - - -No description provided - -## Properties - - -No properties for event - - -## Locations Used - -[src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts) -```typescript - if (columnSize && (await this.dataViewerChecker.isRequestedColumnSizeAllowed(columnSize))) { - const title: string = `${DataScience.dataExplorerTitle()} - ${jupyterVariable.name}`; - await this.dataViewerFactory.create(jupyterVariableDataProvider, title); - sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_SUCCESS); - } - } catch (e) { - sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_ERROR, undefined, undefined, e); -``` - -
-
- PLATFORM.INFO - -## Description - - - - - Telemetry event sent after fetching the OS version - -## Properties - - -No properties for event - - -## Locations Used - -[src/platform/common/platform/platformService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/platform/platformService.node.ts) -```typescript - public version?: SemVer; - constructor() { - if (this.osType === OSType.Unknown) { - sendTelemetryEvent(EventName.PLATFORM_INFO, undefined, { - failureType: PlatformErrors.FailedToDetermineOS - }); - } -``` - - -[src/platform/common/platform/platformService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/platform/platformService.node.ts) -```typescript - try { - const ver = coerce(os.release()); - if (ver) { - sendTelemetryEvent(EventName.PLATFORM_INFO, undefined, { - osVersion: `${ver.major}.${ver.minor}.${ver.patch}` - }); - return (this.version = ver); -``` - - -[src/platform/common/platform/platformService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/platform/platformService.node.ts) -```typescript - } - throw new Error('Unable to parse version'); - } catch (ex) { - sendTelemetryEvent(EventName.PLATFORM_INFO, undefined, { - failureType: PlatformErrors.FailedToParseVersion - }); - return parseVersion(os.release()); -``` - -
-
- PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES - -## Description - - -No description provided - -## Properties - -- - /** - * Carries `true` if environment variables are present, `false` otherwise - * - * @type {boolean} - */ - hasEnvVars?: boolean; -- - /** - * Carries `true` if fetching environment variables failed, `false` otherwise - * - * @type {boolean} - */ - failed?: boolean; -- - /** - * Whether the environment was activated within a terminal or not. - * - * @type {boolean} - */ - activatedInTerminal?: boolean; -- - /** - * Whether the environment was activated by the wrapper class. - * If `true`, this telemetry is sent by the class that wraps the two activation providers . - * - * @type {boolean} - */ - activatedByWrapper?: boolean; - -## Locations Used - -[src/platform/common/process/pythonExecutionFactory.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/pythonExecutionFactory.node.ts) -```typescript - options.allowEnvironmentFetchExceptions - ); - const hasEnvVars = envVars && Object.keys(envVars).length > 0; - sendTelemetryEvent(EventName.PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES, undefined, { hasEnvVars }); - if (!hasEnvVars) { - return this.create({ - resource: options.resource, -``` - -
-
- TERMINAL_ENV_VAR_EXTRACTION - -## Description - - - - - Telemetry sent only when we fail to extract the env variables for a shell. - -## Properties - - -No properties for event - - -## Locations Used - -[src/platform/terminals/helper.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/terminals/helper.node.ts) -```typescript - terminal?: Terminal - ): Promise<{ env?: NodeJS.ProcessEnv; shell: TerminalShellType }> { - if (this.platform.osType === OSType.Unknown) { - sendTelemetryEvent(Telemetry.TerminalEnvVariableExtraction, undefined, { - failed: true, - reason: 'unknownOs', - shellType: undefined -``` - - -[src/platform/terminals/helper.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/terminals/helper.node.ts) -```typescript - return { env, shell }; - } catch (ex) { - traceError('Failed to extract environment variables', ex); - sendTelemetryEvent(Telemetry.TerminalEnvVariableExtraction, undefined, { - failed: true, - reason: failureReason, - shellType: shell -``` - -
-
- TERMINAL_SHELL_IDENTIFICATION - -## Description - - - - Telemetry event sent to provide information on whether we have successfully identify the type of shell used. - This information is useful in determining how well we identify shells on users machines. - This impacts extraction of env variables from current shell. - So, the better this works, the better it is for the user. - failed - If true, indicates we have failed to identify the shell. Note this impacts impacts ability to activate environments in the terminal & code. - shellIdentificationSource - How was the shell identified. One of 'terminalName' | 'settings' | 'environment' | 'default' - If terminalName, then this means we identified the type of the shell based on the name of the terminal. - If settings, then this means we identified the type of the shell based on user settings in VS Code. - If environment, then this means we identified the type of the shell based on their environment (env variables, etc). - I.e. their default OS Shell. - If default, then we reverted to OS defaults (cmd on windows, and bash on the rest). - This is the worst case scenario. - I.e. we could not identify the shell at all. - hasCustomShell - If undefined (not set), we didn't check. - If true, user has customzied their shell in VSC Settings. - hasShellInEnv - If undefined (not set), we didn't check. - If true, user has a shell in their environment. - If false, user does not have a shell in their environment. - -## Properties - -- - failed: boolean; -- - reason: 'unknownShell' | undefined; -- - terminalProvided: boolean; -- - shellIdentificationSource: 'terminalName' | 'settings' | 'environment' | 'default' | 'vscode'; -- - hasCustomShell: undefined | boolean; -- - hasShellInEnv: undefined | boolean; - -## Locations Used - -[src/platform/terminals/shellDetector.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/terminals/shellDetector.node.ts) -```typescript - // This information is useful in determining how well we identify shells on users machines. - // This impacts executing code in terminals and activation of environments in terminal. - // So, the better this works, the better it is for the user. - sendTelemetryEvent(Telemetry.TerminalShellIdentification, undefined, telemetryProperties); - traceVerbose(`Shell identified as '${shell}'`); - - // If we could not identify the shell, use the defaults. -``` - -
diff --git a/src/extension.node.ts b/src/extension.node.ts index b4ee4458927..e2a595b6446 100644 --- a/src/extension.node.ts +++ b/src/extension.node.ts @@ -63,7 +63,7 @@ import { import { createDeferred } from './platform/common/utils/async'; import { Common, OutputChannelNames } from './platform/common/utils/localize'; import { IServiceContainer, IServiceManager } from './platform/ioc/types'; -import { sendErrorTelemetry, sendStartupTelemetry } from './telemetry/startupTelemetry'; +import { sendErrorTelemetry, sendStartupTelemetry } from './platform/telemetry/startupTelemetry'; import { noop } from './platform/common/utils/misc'; import { PythonExtension } from './webviews/webview-side/common/constants'; import { registerTypes as registerPlatformTypes } from './platform/serviceRegistry.node'; @@ -71,7 +71,7 @@ import { registerTypes as registerKernelTypes } from './kernels/serviceRegistry. import { registerTypes as registerNotebookTypes } from './notebooks/serviceRegistry.node'; import { registerTypes as registerInteractiveTypes } from './interactive-window/serviceRegistry.node'; import { registerTypes as registerStandaloneTypes } from './standalone/serviceRegistry.node'; -import { registerTypes as registerTelemetryTypes } from './telemetry/serviceRegistry.node'; +import { registerTypes as registerTelemetryTypes } from './platform/telemetry/serviceRegistry.node'; import { registerTypes as registerIntellisenseTypes } from './intellisense/serviceRegistry.node'; import { IExtensionActivationManager } from './platform/activation/types'; import { isCI, isTestExecution, JUPYTER_OUTPUT_CHANNEL, STANDARD_OUTPUT_CHANNEL } from './platform/common/constants'; @@ -79,7 +79,7 @@ import { getDisplayPath } from './platform/common/platform/fs-paths'; import { IFileSystemNode } from './platform/common/platform/types.node'; import { getJupyterOutputChannel } from './standalone/devTools/jupyterOutputChannel'; import { registerLogger, setLoggingLevel } from './platform/logging'; -import { setExtensionInstallTelemetryProperties } from './telemetry/extensionInstallTelemetry.node'; +import { setExtensionInstallTelemetryProperties } from './platform/telemetry/extensionInstallTelemetry.node'; import { Container } from 'inversify/lib/container/container'; import { ServiceContainer } from './platform/ioc/container'; import { ServiceManager } from './platform/ioc/serviceManager'; @@ -87,7 +87,7 @@ import { OutputChannelLogger } from './platform/logging/outputChannelLogger'; import { ConsoleLogger } from './platform/logging/consoleLogger'; import { FileLogger } from './platform/logging/fileLogger.node'; import { createWriteStream } from 'fs-extra'; -import { initializeGlobals as initializeTelemetryGlobals } from './telemetry/telemetry'; +import { initializeGlobals as initializeTelemetryGlobals } from './platform/telemetry/telemetry'; durations.codeLoadingTime = stopWatch.elapsedTime; diff --git a/src/extension.web.ts b/src/extension.web.ts index 51cd4bd78b2..a546616665a 100644 --- a/src/extension.web.ts +++ b/src/extension.web.ts @@ -60,11 +60,11 @@ import { import { createDeferred } from './platform/common/utils/async'; import { Common, OutputChannelNames } from './platform/common/utils/localize'; import { IServiceContainer, IServiceManager } from './platform/ioc/types'; -import { sendErrorTelemetry, sendStartupTelemetry } from './telemetry/startupTelemetry'; +import { sendErrorTelemetry, sendStartupTelemetry } from './platform/telemetry/startupTelemetry'; import { noop } from './platform/common/utils/misc'; import { PythonExtension } from './webviews/webview-side/common/constants'; import { registerTypes as registerPlatformTypes } from './platform/serviceRegistry.web'; -import { registerTypes as registerTelemetryTypes } from './telemetry/serviceRegistry.web'; +import { registerTypes as registerTelemetryTypes } from './platform/telemetry/serviceRegistry.web'; import { registerTypes as registerKernelTypes } from './kernels/serviceRegistry.web'; import { registerTypes as registerNotebookTypes } from './notebooks/serviceRegistry.web'; import { registerTypes as registerInteractiveTypes } from './interactive-window/serviceRegistry.web'; @@ -80,7 +80,7 @@ import { ServiceContainer } from './platform/ioc/container'; import { ServiceManager } from './platform/ioc/serviceManager'; import { OutputChannelLogger } from './platform/logging/outputChannelLogger'; import { ConsoleLogger } from './platform/logging/consoleLogger'; -import { initializeGlobals as initializeTelemetryGlobals } from './telemetry/telemetry'; +import { initializeGlobals as initializeTelemetryGlobals } from './platform/telemetry/telemetry'; durations.codeLoadingTime = stopWatch.elapsedTime; diff --git a/src/kernels/helpers.ts b/src/kernels/helpers.ts index 12c3354c10c..6092b20dcbe 100644 --- a/src/kernels/helpers.ts +++ b/src/kernels/helpers.ts @@ -27,7 +27,7 @@ import { getDisplayPath, getFilePath } from '../platform/common/platform/fs-path import { DataScience } from '../platform/common/utils/localize'; import { SysInfoReason } from '../platform/messageTypes'; import { getNormalizedInterpreterPath, getInterpreterHash } from '../platform/pythonEnvironments/info/interpreter'; -import { getTelemetrySafeVersion } from '../telemetry/helpers'; +import { getTelemetrySafeVersion } from '../platform/telemetry/helpers'; import { EnvironmentType, PythonEnvironment } from '../platform/pythonEnvironments/info'; import { fsPathToUri } from '../platform/vscode-path/utils'; import { deserializePythonEnvironment, serializePythonEnvironment } from '../platform/api/pythonApi'; diff --git a/src/kernels/installer/productInstaller.node.ts b/src/kernels/installer/productInstaller.node.ts index 4976e42f1ea..b8c3f0c9459 100644 --- a/src/kernels/installer/productInstaller.node.ts +++ b/src/kernels/installer/productInstaller.node.ts @@ -29,12 +29,12 @@ import { import { noop } from '../../platform/common/utils/misc'; import { IServiceContainer } from '../../platform/ioc/types'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { InterpreterPackages } from '../../telemetry/interpreterPackages.node'; +import { InterpreterPackages } from '../../platform/telemetry/interpreterPackages.node'; import { getInterpreterHash } from '../../platform/pythonEnvironments/info/interpreter'; import { STANDARD_OUTPUT_CHANNEL } from '../../platform/common/constants'; import { sleep } from '../../platform/common/utils/async'; import { trackPackageInstalledIntoInterpreter } from './productInstaller'; -import { IInterpreterPackages } from '../../telemetryTypes'; +import { IInterpreterPackages } from '../../telemetry'; import { translateProductToModule } from './utils'; export async function isModulePresentInEnvironment(memento: Memento, product: Product, interpreter: PythonEnvironment) { diff --git a/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts b/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts index 023064a5dc6..97bcb491340 100644 --- a/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts +++ b/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts @@ -9,7 +9,7 @@ import { IDisposable } from '../../platform/common/types'; import { traceWarning } from '../../platform/logging'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; import { IKernel, isLocalConnection } from '../types'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import * as stripComments from 'strip-comments'; import { IIPyWidgetScriptManager } from './types'; import { StopWatch } from '../../platform/common/utils/stopWatch'; diff --git a/src/kernels/ipywidgets/commonMessageCoordinator.ts b/src/kernels/ipywidgets/commonMessageCoordinator.ts index 889a297ebce..6589df793d5 100644 --- a/src/kernels/ipywidgets/commonMessageCoordinator.ts +++ b/src/kernels/ipywidgets/commonMessageCoordinator.ts @@ -21,7 +21,7 @@ import { } from '../../platform/messageTypes'; import { IServiceContainer } from '../../platform/ioc/types'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { Commands } from '../../platform/common/constants'; import { IKernelProvider } from '../types'; import { IPyWidgetMessageDispatcherFactory } from './ipyWidgetMessageDispatcherFactory'; diff --git a/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts b/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts index aa6c307cbfa..6f85e542969 100644 --- a/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts +++ b/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts @@ -7,7 +7,7 @@ import '../../platform/common/extensions'; import { traceError, traceInfo } from '../../platform/logging'; import { WidgetCDNs, IConfigurationService, IHttpClient } from '../../platform/common/types'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { IKernel } from '../types'; import { ILocalResourceUriConverter, diff --git a/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts b/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts index ef89ffc7b3e..fd414d08ec4 100644 --- a/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts +++ b/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts @@ -7,7 +7,7 @@ import { IFileSystemNode } from '../../platform/common/platform/types.node'; import { IExtensionContext } from '../../platform/common/types'; import { StopWatch } from '../../platform/common/utils/stopWatch'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { IKernel } from '../types'; import { BaseIPyWidgetScriptManager } from './baseIPyWidgetScriptManager'; import { IIPyWidgetScriptManager, INbExtensionsPathProvider } from './types'; diff --git a/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts b/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts index c76acb44b36..9e1c4c17b1f 100644 --- a/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts +++ b/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts @@ -12,7 +12,7 @@ import { disposeAllDisposables } from '../../platform/common/helpers'; import { IDisposableRegistry } from '../../platform/common/types'; import { isJupyterNotebook } from '../../platform/common/utils'; import { captureTelemetry, sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { createJupyterCellFromVSCNotebookCell } from '../execution/helpers'; // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const flatten = require('lodash/flatten') as typeof import('lodash/flatten'); diff --git a/src/kernels/kernelDependencyService.node.ts b/src/kernels/kernelDependencyService.node.ts index 421a1184cf3..4e08df90e60 100644 --- a/src/kernels/kernelDependencyService.node.ts +++ b/src/kernels/kernelDependencyService.node.ts @@ -21,7 +21,7 @@ import { DataScience, Common } from '../platform/common/utils/localize'; import { IServiceContainer } from '../platform/ioc/types'; import { EnvironmentType, PythonEnvironment } from '../platform/pythonEnvironments/info'; import { sendTelemetryEvent, Telemetry } from '../telemetry'; -import { getTelemetrySafeHashedString } from '../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../platform/telemetry/helpers'; import { isModulePresentInEnvironmentCache, trackPackageInstalledIntoInterpreter } from './installer/productInstaller'; import { ProductNames } from './installer/productNames'; import { IInstaller, Product, InstallerResponse } from './installer/types'; diff --git a/src/kernels/raw/finder/helper.ts b/src/kernels/raw/finder/helper.ts index 3a406c84614..42000ce22a0 100644 --- a/src/kernels/raw/finder/helper.ts +++ b/src/kernels/raw/finder/helper.ts @@ -3,7 +3,7 @@ import { Telemetry } from '../../../platform/common/constants'; import { sendTelemetryEvent } from '../../../telemetry'; -import { getTelemetrySafeLanguage } from '../../../telemetry/helpers'; +import { getTelemetrySafeLanguage } from '../../../platform/telemetry/helpers'; import { IJupyterKernelSpec } from '../../types'; const shellScripts = ['/bin/sh', '/bin/bash', '/bin/zsh']; diff --git a/src/kernels/telemetry/helper.ts b/src/kernels/telemetry/helper.ts index 39931ddf9eb..16ae7aa89e5 100644 --- a/src/kernels/telemetry/helper.ts +++ b/src/kernels/telemetry/helper.ts @@ -1,13 +1,13 @@ import { Resource } from '../../platform/common/types'; -import { WorkspaceInterpreterTracker } from '../../telemetry/workspaceInterpreterTracker'; +import { WorkspaceInterpreterTracker } from '../../platform/telemetry/workspaceInterpreterTracker'; import { PYTHON_LANGUAGE } from '../../platform/common/constants'; -import { InterpreterCountTracker } from '../../telemetry/interpreterCountTracker'; -import { getTelemetrySafeHashedString, getTelemetrySafeLanguage } from '../../telemetry/helpers'; +import { InterpreterCountTracker } from '../../platform/telemetry/interpreterCountTracker'; +import { getTelemetrySafeHashedString, getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; import { getNormalizedInterpreterPath } from '../../platform/pythonEnvironments/info/interpreter'; import { getResourceType } from '../../platform/common/utils'; import { getComparisonKey } from '../../platform/vscode-path/resources'; import { getFilePath } from '../../platform/common/platform/fs-paths'; -import { trackedInfo, pythonEnvironmentsByHash, updatePythonPackages } from '../../telemetry/telemetry'; +import { trackedInfo, pythonEnvironmentsByHash, updatePythonPackages } from '../../platform/telemetry/telemetry'; import { KernelConnectionMetadata } from '../types'; import { setSharedProperty } from '../../telemetry'; diff --git a/src/kernels/telemetry/sendKernelTelemetryEvent.ts b/src/kernels/telemetry/sendKernelTelemetryEvent.ts index 0ddc63b21c8..b7b46948cbc 100644 --- a/src/kernels/telemetry/sendKernelTelemetryEvent.ts +++ b/src/kernels/telemetry/sendKernelTelemetryEvent.ts @@ -1,8 +1,7 @@ import { Resource } from '../../platform/common/types'; -import { IEventNamePropertyMapping } from '../../telemetryTypes'; import { Telemetry } from '../../platform/common/constants'; -import { setSharedProperty, sendTelemetryEvent, waitBeforeSending } from '../../telemetry'; -import { getContextualPropsForTelemetry } from '../../telemetry/telemetry'; +import { setSharedProperty, sendTelemetryEvent, waitBeforeSending, IEventNamePropertyMapping } from '../../telemetry'; +import { getContextualPropsForTelemetry } from '../../platform/telemetry/telemetry'; import { clearInterruptCounter, trackKernelResourceInformation } from './helper'; import { StopWatch } from '../../platform/common/utils/stopWatch'; import { populateTelemetryWithErrorInfo } from '../../platform/errors'; diff --git a/src/notebooks/controllers/notebookControllerManager.ts b/src/notebooks/controllers/notebookControllerManager.ts index 534748252b3..d04e16d6770 100644 --- a/src/notebooks/controllers/notebookControllerManager.ts +++ b/src/notebooks/controllers/notebookControllerManager.ts @@ -63,7 +63,7 @@ import { isPythonNotebook } from '../../kernels/helpers'; import { getNotebookMetadata, getResourceType } from '../../platform/common/utils'; -import { getTelemetrySafeLanguage } from '../../telemetry/helpers'; +import { getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; import { INotebookMetadata } from '@jupyterlab/nbformat'; import { ServerConnectionType } from '../../kernels/jupyter/launcher/serverConnectionType'; import { computeServerId } from '../../kernels/jupyter/jupyterUtils'; diff --git a/src/notebooks/telemetry/interpreterPackageTracker.ts b/src/notebooks/telemetry/interpreterPackageTracker.ts index f9e87ff3404..99760d044a2 100644 --- a/src/notebooks/telemetry/interpreterPackageTracker.ts +++ b/src/notebooks/telemetry/interpreterPackageTracker.ts @@ -12,7 +12,7 @@ import { INotebookControllerManager } from '../types'; import { IInstaller, Product } from '../../kernels/installer/types'; import { IVSCodeNotebookController } from '../controllers/types'; import { trackKernelResourceInformation } from '../../kernels/telemetry/helper'; -import { IInterpreterPackages } from '../../telemetryTypes'; +import { IInterpreterPackages } from '../../telemetry'; @injectable() export class InterpreterPackageTracker implements IExtensionSingleActivationService { diff --git a/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts b/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts index 45824ef882d..03c0fcfc032 100644 --- a/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts +++ b/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts @@ -3,7 +3,7 @@ 'use strict'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeLanguage } from '../../telemetry/helpers'; +import { getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; export function sendNotebookOrKernelLanguageTelemetry( telemetryEvent: Telemetry.SwitchToExistingKernel | Telemetry.NotebookLanguage, diff --git a/src/platform/common/experiments/service.ts b/src/platform/common/experiments/service.ts index 2af0022af3c..b0a876d2662 100644 --- a/src/platform/common/experiments/service.ts +++ b/src/platform/common/experiments/service.ts @@ -7,7 +7,7 @@ import { inject, injectable, named } from 'inversify'; import { Memento } from 'vscode'; import { getExperimentationService, IExperimentationService, TargetPopulation } from 'vscode-tas-client'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../telemetry/constants'; import { IApplicationEnvironment } from '../application/types'; import { JVSC_EXTENSION_ID, STANDARD_OUTPUT_CHANNEL } from '../constants'; import { traceVerbose } from '../../logging'; diff --git a/src/platform/common/platform/platformService.node.ts b/src/platform/common/platform/platformService.node.ts index 6c96dc3c970..889464f6db3 100644 --- a/src/platform/common/platform/platformService.node.ts +++ b/src/platform/common/platform/platformService.node.ts @@ -7,7 +7,7 @@ import * as os from 'os'; import { coerce, SemVer } from 'semver'; import { Uri } from 'vscode'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName, PlatformErrors } from '../../../telemetry/constants'; +import { EventName, PlatformErrors } from '../../telemetry/constants'; import { getOSType, OSType } from '../utils/platform'; import { parseVersion } from '../utils/version.node'; import { NON_WINDOWS_PATH_VARIABLE_NAME, WINDOWS_PATH_VARIABLE_NAME } from './constants.node'; diff --git a/src/platform/common/process/environmentActivationService.node.ts b/src/platform/common/process/environmentActivationService.node.ts index c301ec030ae..552411737cd 100644 --- a/src/platform/common/process/environmentActivationService.node.ts +++ b/src/platform/common/process/environmentActivationService.node.ts @@ -24,7 +24,7 @@ import { getDisplayPath } from '../platform/fs-paths'; import { IEnvironmentActivationService } from '../../interpreter/activation/types'; import { IInterpreterService } from '../../interpreter/contracts'; import { CurrentProcess } from './currentProcess.node'; -import { getTelemetrySafeHashedString } from '../../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; import { CondaService } from './condaService.node'; import { condaVersionSupportsLiveStreaming, createCondaEnv } from './pythonEnvironment.node'; import { printEnvVariablesToFile } from './internal/scripts/index.node'; diff --git a/src/platform/common/process/pythonExecutionFactory.node.ts b/src/platform/common/process/pythonExecutionFactory.node.ts index 27570ef3e91..9f5d32b7f56 100644 --- a/src/platform/common/process/pythonExecutionFactory.node.ts +++ b/src/platform/common/process/pythonExecutionFactory.node.ts @@ -6,7 +6,7 @@ import { IEnvironmentActivationService } from '../../interpreter/activation/type import { IServiceContainer } from '../../ioc/types'; import { EnvironmentType, PythonEnvironment } from '../../pythonEnvironments/info'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../telemetry/constants'; import { IWorkspaceService } from '../application/types'; import { ignoreLogging, traceDecoratorVerbose, traceError, traceInfo } from '../../logging'; import { getDisplayPath } from '../platform/fs-paths'; diff --git a/src/platform/common/serviceRegistry.node.ts b/src/platform/common/serviceRegistry.node.ts index 565925b7331..06e86dc96de 100644 --- a/src/platform/common/serviceRegistry.node.ts +++ b/src/platform/common/serviceRegistry.node.ts @@ -45,7 +45,7 @@ import { IsWindows } from './types'; import { IMultiStepInputFactory, MultiStepInputFactory } from './utils/multiStepInput'; -import { LanguageInitializer } from '../../telemetry/languageInitializer'; +import { LanguageInitializer } from '../telemetry/languageInitializer'; import { registerTypes as registerPlatformTypes } from './platform/serviceRegistry.node'; import { registerTypes as processRegisterTypes } from './process/serviceRegistry.node'; import { registerTypes as variableRegisterTypes } from './variables/serviceRegistry.node'; diff --git a/src/platform/common/variables/environment.node.ts b/src/platform/common/variables/environment.node.ts index 3d12c9a43ec..3630f0e75c5 100644 --- a/src/platform/common/variables/environment.node.ts +++ b/src/platform/common/variables/environment.node.ts @@ -4,7 +4,7 @@ import { inject, injectable } from 'inversify'; import * as path from '../../vscode-path/path'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../telemetry/constants'; import { traceError } from '../../logging'; import { isFileNotFoundError } from '../platform/errors'; import { IFileSystemNode } from '../platform/types.node'; diff --git a/src/platform/common/variables/environmentVariablesProvider.node.ts b/src/platform/common/variables/environmentVariablesProvider.node.ts index 593a7304e79..e69ef54160a 100644 --- a/src/platform/common/variables/environmentVariablesProvider.node.ts +++ b/src/platform/common/variables/environmentVariablesProvider.node.ts @@ -4,7 +4,7 @@ import { inject, injectable, optional } from 'inversify'; import * as path from '../../vscode-path/path'; import { ConfigurationChangeEvent, Disposable, Event, EventEmitter, FileSystemWatcher, Uri } from 'vscode'; import { TraceOptions } from '../../logging/types'; -import { sendFileCreationTelemetry } from '../../../telemetry/envFileTelemetry.node'; +import { sendFileCreationTelemetry } from '../../telemetry/envFileTelemetry.node'; import { IWorkspaceService } from '../application/types'; import { IDisposableRegistry } from '../types'; import { InMemoryCache } from '../utils/cacheUtils'; diff --git a/src/platform/errors/index.ts b/src/platform/errors/index.ts index 37c88acf836..7ccf2e417fb 100644 --- a/src/platform/errors/index.ts +++ b/src/platform/errors/index.ts @@ -3,7 +3,7 @@ import { FetchError } from 'node-fetch'; import * as stackTrace from 'stack-trace'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../telemetry/helpers'; import { getErrorTags } from './errors'; import { getLastFrameFromPythonTraceback } from './errorUtils'; import { getErrorCategory, TelemetryErrorProperties, BaseError, WrappedError } from './types'; diff --git a/src/telemetry/constants.ts b/src/platform/telemetry/constants.ts similarity index 100% rename from src/telemetry/constants.ts rename to src/platform/telemetry/constants.ts diff --git a/src/telemetry/envFileTelemetry.node.ts b/src/platform/telemetry/envFileTelemetry.node.ts similarity index 88% rename from src/telemetry/envFileTelemetry.node.ts rename to src/platform/telemetry/envFileTelemetry.node.ts index 1aaed720a1d..4861115518f 100644 --- a/src/telemetry/envFileTelemetry.node.ts +++ b/src/platform/telemetry/envFileTelemetry.node.ts @@ -3,12 +3,12 @@ 'use strict'; -import { IWorkspaceService } from '../platform/common/application/types'; -import { Resource } from '../platform/common/types'; -import { SystemVariables } from '../platform/common/variables/systemVariables.node'; +import { IWorkspaceService } from '../common/application/types'; +import { Resource } from '../common/types'; +import { SystemVariables } from '../common/variables/systemVariables.node'; import { sendTelemetryEvent } from '.'; -import { IFileSystemNode } from '../platform/common/platform/types.node'; +import { IFileSystemNode } from '../common/platform/types.node'; import { EventName } from './constants'; let _defaultEnvFileSetting: string | undefined; diff --git a/src/telemetry/extensionInstallTelemetry.node.ts b/src/platform/telemetry/extensionInstallTelemetry.node.ts similarity index 88% rename from src/telemetry/extensionInstallTelemetry.node.ts rename to src/platform/telemetry/extensionInstallTelemetry.node.ts index 073e5a9e871..b1453040459 100644 --- a/src/telemetry/extensionInstallTelemetry.node.ts +++ b/src/platform/telemetry/extensionInstallTelemetry.node.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as path from '../platform/vscode-path/path'; +import * as path from '../vscode-path/path'; import { setSharedProperty } from '.'; -import { IFileSystemNode } from '../platform/common/platform/types.node'; -import { EXTENSION_ROOT_DIR } from '../platform/constants.node'; +import { IFileSystemNode } from '../common/platform/types.node'; +import { EXTENSION_ROOT_DIR } from '../constants.node'; /** * Sets shared telemetry property about where the extension was installed from diff --git a/src/telemetry/helpers.ts b/src/platform/telemetry/helpers.ts similarity index 93% rename from src/telemetry/helpers.ts rename to src/platform/telemetry/helpers.ts index 76193aec607..f5fc6d5c586 100644 --- a/src/telemetry/helpers.ts +++ b/src/platform/telemetry/helpers.ts @@ -2,8 +2,8 @@ // Licensed under the MIT License. import * as hashjs from 'hash.js'; -import { KnownKernelLanguageAliases, VSCodeKnownNotebookLanguages } from '../platform/common/constants'; -import { traceError } from '../platform/logging'; +import { KnownKernelLanguageAliases, VSCodeKnownNotebookLanguages } from '../common/constants'; +import { traceError } from '../logging'; export function getTelemetrySafeLanguage(language: string = 'unknown') { language = (language || 'unknown').toLowerCase(); diff --git a/src/telemetry/index.ts b/src/platform/telemetry/index.ts similarity index 97% rename from src/telemetry/index.ts rename to src/platform/telemetry/index.ts index da6dd62714c..cf3840855d3 100644 --- a/src/telemetry/index.ts +++ b/src/platform/telemetry/index.ts @@ -3,14 +3,14 @@ // eslint-disable-next-line import TelemetryReporter from '@vscode/extension-telemetry/lib/telemetryReporter'; -import { IWorkspaceService } from '../platform/common/application/types'; -import { AppinsightsKey, isTestExecution, isUnitTestExecution, JVSC_EXTENSION_ID } from '../platform/common/constants'; -import { traceError, traceEverything } from '../platform/logging'; -import { StopWatch } from '../platform/common/utils/stopWatch'; -import { noop } from '../platform/common/utils/misc'; +import { IWorkspaceService } from '../common/application/types'; +import { AppinsightsKey, isTestExecution, isUnitTestExecution, JVSC_EXTENSION_ID } from '../common/constants'; +import { traceError, traceEverything } from '../logging'; +import { StopWatch } from '../common/utils/stopWatch'; +import { noop } from '../common/utils/misc'; import { isPromise } from 'rxjs/internal-compatibility'; -import { populateTelemetryWithErrorInfo } from '../platform/errors'; -import { IEventNamePropertyMapping } from '../telemetryTypes'; +import { populateTelemetryWithErrorInfo } from '../errors'; +import { IEventNamePropertyMapping } from '../../telemetry'; /** * TODO@rebornix @@ -22,7 +22,7 @@ export { NativeMouseCommandTelemetry, Telemetry, VSCodeNativeTelemetry -} from '../platform/common/constants'; +} from '../common/constants'; export const waitBeforeSending = 'waitBeforeSending'; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/src/telemetry/interpreterCountTracker.ts b/src/platform/telemetry/interpreterCountTracker.ts similarity index 84% rename from src/telemetry/interpreterCountTracker.ts rename to src/platform/telemetry/interpreterCountTracker.ts index 0bf267d1657..57b79c5cdb8 100644 --- a/src/telemetry/interpreterCountTracker.ts +++ b/src/platform/telemetry/interpreterCountTracker.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { IExtensionSingleActivationService } from '../platform/activation/types'; +import { IExtensionSingleActivationService } from '../activation/types'; import { inject, injectable } from 'inversify'; -import { IInterpreterService } from '../platform/interpreter/contracts'; -import { IPythonApiProvider, IPythonExtensionChecker } from '../platform/api/types'; -import { noop } from '../platform/common/utils/misc'; -import { IDisposableRegistry } from '../platform/common/types'; +import { IInterpreterService } from '../interpreter/contracts'; +import { IPythonApiProvider, IPythonExtensionChecker } from '../api/types'; +import { noop } from '../common/utils/misc'; +import { IDisposableRegistry } from '../common/types'; @injectable() export class InterpreterCountTracker implements IExtensionSingleActivationService { diff --git a/src/telemetry/interpreterPackages.node.ts b/src/platform/telemetry/interpreterPackages.node.ts similarity index 91% rename from src/telemetry/interpreterPackages.node.ts rename to src/platform/telemetry/interpreterPackages.node.ts index feb70678950..0be4a5f6473 100644 --- a/src/telemetry/interpreterPackages.node.ts +++ b/src/platform/telemetry/interpreterPackages.node.ts @@ -2,16 +2,16 @@ // Licensed under the MIT License. import { inject, injectable } from 'inversify'; -import { IPythonApiProvider, IPythonExtensionChecker } from '../platform/api/types'; -import { IPythonExecutionFactory } from '../platform/common/process/types.node'; -import { IDisposableRegistry, InterpreterUri } from '../platform/common/types'; -import { createDeferred, Deferred } from '../platform/common/utils/async'; -import { isResource, noop } from '../platform/common/utils/misc'; -import { IInterpreterService } from '../platform/interpreter/contracts'; -import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { getComparisonKey } from '../platform/vscode-path/resources'; +import { IPythonApiProvider, IPythonExtensionChecker } from '../api/types'; +import { IPythonExecutionFactory } from '../common/process/types.node'; +import { IDisposableRegistry, InterpreterUri } from '../common/types'; +import { createDeferred, Deferred } from '../common/utils/async'; +import { isResource, noop } from '../common/utils/misc'; +import { IInterpreterService } from '../interpreter/contracts'; +import { PythonEnvironment } from '../pythonEnvironments/info'; +import { getComparisonKey } from '../vscode-path/resources'; import { getTelemetrySafeHashedString, getTelemetrySafeVersion } from './helpers'; -import { IInterpreterPackages } from '../telemetryTypes'; +import { IInterpreterPackages } from '../../telemetry'; const interestedPackages = new Set( [ diff --git a/src/telemetry/interpreterPackages.web.ts b/src/platform/telemetry/interpreterPackages.web.ts similarity index 79% rename from src/telemetry/interpreterPackages.web.ts rename to src/platform/telemetry/interpreterPackages.web.ts index 11192325b3a..1fcd4fdb555 100644 --- a/src/telemetry/interpreterPackages.web.ts +++ b/src/platform/telemetry/interpreterPackages.web.ts @@ -2,9 +2,9 @@ // Licensed under the MIT License. import { injectable } from 'inversify'; -import { InterpreterUri } from '../platform/common/types'; -import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { IInterpreterPackages } from '../telemetryTypes'; +import { InterpreterUri } from '../common/types'; +import { PythonEnvironment } from '../pythonEnvironments/info'; +import { IInterpreterPackages } from '../../telemetry'; /** * Tracks packages in use for interpreters. In the web version this isn't implemented yet. diff --git a/src/telemetry/languageInitializer.ts b/src/platform/telemetry/languageInitializer.ts similarity index 78% rename from src/telemetry/languageInitializer.ts rename to src/platform/telemetry/languageInitializer.ts index 131c716210b..901bf404663 100644 --- a/src/telemetry/languageInitializer.ts +++ b/src/platform/telemetry/languageInitializer.ts @@ -3,9 +3,9 @@ import { injectable } from 'inversify'; import { languages } from 'vscode'; -import { IExtensionSingleActivationService } from '../platform/activation/types'; -import { VSCodeKnownNotebookLanguages } from '../platform/common/constants'; -import { noop } from '../platform/common/utils/misc'; +import { IExtensionSingleActivationService } from '../activation/types'; +import { VSCodeKnownNotebookLanguages } from '../common/constants'; +import { noop } from '../common/utils/misc'; /** * Initializes the list of known languages with whats registered in VS Code. diff --git a/src/telemetry/serviceRegistry.node.ts b/src/platform/telemetry/serviceRegistry.node.ts similarity index 83% rename from src/telemetry/serviceRegistry.node.ts rename to src/platform/telemetry/serviceRegistry.node.ts index b5b9c31b63d..02aa4a97216 100644 --- a/src/telemetry/serviceRegistry.node.ts +++ b/src/platform/telemetry/serviceRegistry.node.ts @@ -3,12 +3,12 @@ 'use strict'; -import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../platform/activation/types'; -import { IServiceManager } from '../platform/ioc/types'; +import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../activation/types'; +import { IServiceManager } from '../ioc/types'; import { InterpreterCountTracker } from './interpreterCountTracker'; import { InterpreterPackages } from './interpreterPackages.node'; import { WorkspaceInterpreterTracker } from './workspaceInterpreterTracker'; -import { IInterpreterPackages } from '../telemetryTypes'; +import { IInterpreterPackages } from '../../telemetry'; export function registerTypes(serviceManager: IServiceManager) { serviceManager.addSingleton(IInterpreterPackages, InterpreterPackages); diff --git a/src/telemetry/serviceRegistry.web.ts b/src/platform/telemetry/serviceRegistry.web.ts similarity index 83% rename from src/telemetry/serviceRegistry.web.ts rename to src/platform/telemetry/serviceRegistry.web.ts index 8c5c79a989f..8a7d01241f0 100644 --- a/src/telemetry/serviceRegistry.web.ts +++ b/src/platform/telemetry/serviceRegistry.web.ts @@ -3,11 +3,11 @@ 'use strict'; -import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../platform/activation/types'; -import { IServiceManager } from '../platform/ioc/types'; +import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../activation/types'; +import { IServiceManager } from '../ioc/types'; import { InterpreterCountTracker } from './interpreterCountTracker'; import { WorkspaceInterpreterTracker } from './workspaceInterpreterTracker'; -import { IInterpreterPackages } from '../telemetryTypes'; +import { IInterpreterPackages } from '../../telemetry'; import { InterpreterPackages } from './interpreterPackages.web'; export function registerTypes(serviceManager: IServiceManager) { diff --git a/src/telemetry/startupTelemetry.ts b/src/platform/telemetry/startupTelemetry.ts similarity index 87% rename from src/telemetry/startupTelemetry.ts rename to src/platform/telemetry/startupTelemetry.ts index 69dab4dd81d..950224fb81c 100644 --- a/src/telemetry/startupTelemetry.ts +++ b/src/platform/telemetry/startupTelemetry.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { IWorkspaceService } from '../platform/common/application/types'; -import { isTestExecution } from '../platform/common/constants'; -import { traceError } from '../platform/logging'; -import { IServiceContainer } from '../platform/ioc/types'; +import { IWorkspaceService } from '../common/application/types'; +import { isTestExecution } from '../common/constants'; +import { traceError } from '../logging'; +import { IServiceContainer } from '../ioc/types'; import { sendTelemetryEvent } from '.'; import { EventName } from './constants'; -import { IEventNamePropertyMapping } from '../telemetryTypes'; +import { IEventNamePropertyMapping } from '../../telemetry'; interface IStopWatch { elapsedTime: number; diff --git a/src/telemetry/telemetry.ts b/src/platform/telemetry/telemetry.ts similarity index 91% rename from src/telemetry/telemetry.ts rename to src/platform/telemetry/telemetry.ts index f7ebfe2b0e0..c9806057aba 100644 --- a/src/telemetry/telemetry.ts +++ b/src/platform/telemetry/telemetry.ts @@ -4,14 +4,14 @@ // eslint-disable-next-line @typescript-eslint/no-require-imports import cloneDeep = require('lodash/cloneDeep'); import { Uri } from 'vscode'; -import { Resource } from '../platform/common/types'; -import { IInterpreterPackages, ResourceSpecificTelemetryProperties } from '../telemetryTypes'; +import { Resource } from '../common/types'; +import { IInterpreterPackages, ResourceSpecificTelemetryProperties } from '../../telemetry'; import { getTelemetrySafeHashedString } from './helpers'; -import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { createDeferred } from '../platform/common/utils/async'; -import { getResourceType } from '../platform/common/utils'; -import { IServiceContainer } from '../platform/ioc/types'; -import { getComparisonKey } from '../platform/vscode-path/resources'; +import { PythonEnvironment } from '../pythonEnvironments/info'; +import { createDeferred } from '../common/utils/async'; +import { getResourceType } from '../common/utils'; +import { IServiceContainer } from '../ioc/types'; +import { getComparisonKey } from '../vscode-path/resources'; type Context = { previouslySelectedKernelConnectionId: string; diff --git a/src/telemetry/workspaceInterpreterTracker.ts b/src/platform/telemetry/workspaceInterpreterTracker.ts similarity index 84% rename from src/telemetry/workspaceInterpreterTracker.ts rename to src/platform/telemetry/workspaceInterpreterTracker.ts index abb0a654a41..51bc0b75f02 100644 --- a/src/telemetry/workspaceInterpreterTracker.ts +++ b/src/platform/telemetry/workspaceInterpreterTracker.ts @@ -2,14 +2,14 @@ // Licensed under the MIT License. import { Uri } from 'vscode'; -import { IDisposableRegistry, IExtensions, Resource } from '../platform/common/types'; -import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { IExtensionSyncActivationService } from '../platform/activation/types'; -import { IWorkspaceService } from '../platform/common/application/types'; +import { IDisposableRegistry, IExtensions, Resource } from '../common/types'; +import { PythonEnvironment } from '../pythonEnvironments/info'; +import { IExtensionSyncActivationService } from '../activation/types'; +import { IWorkspaceService } from '../common/application/types'; import { inject, injectable } from 'inversify'; -import { IInterpreterService } from '../platform/interpreter/contracts'; -import { IPythonExtensionChecker } from '../platform/api/types'; -import { areInterpreterPathsSame } from '../platform/pythonEnvironments/info/interpreter'; +import { IInterpreterService } from '../interpreter/contracts'; +import { IPythonExtensionChecker } from '../api/types'; +import { areInterpreterPathsSame } from '../pythonEnvironments/info/interpreter'; @injectable() export class WorkspaceInterpreterTracker implements IExtensionSyncActivationService { diff --git a/src/platform/terminals/types.ts b/src/platform/terminals/types.ts index 43774e83cb1..ddd1be950ec 100644 --- a/src/platform/terminals/types.ts +++ b/src/platform/terminals/types.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { Terminal, TextEditor, Uri } from 'vscode'; -import { IEventNamePropertyMapping } from '../../telemetryTypes'; +import { IEventNamePropertyMapping } from '../../telemetry'; import { Resource } from '../common/types'; export const ICodeExecutionService = Symbol('ICodeExecutionService'); diff --git a/src/standalone/activation/workspaceActivation.node.ts b/src/standalone/activation/workspaceActivation.node.ts index 6628d0ebdf9..eb6bbeaa144 100644 --- a/src/standalone/activation/workspaceActivation.node.ts +++ b/src/standalone/activation/workspaceActivation.node.ts @@ -1,6 +1,6 @@ import { inject, injectable } from 'inversify'; import { TextDocument } from 'vscode'; -import { sendActivationTelemetry } from '../../telemetry/envFileTelemetry.node'; +import { sendActivationTelemetry } from '../../platform/telemetry/envFileTelemetry.node'; import { IPythonExtensionChecker } from '../../platform/api/types'; import { IWorkspaceService, IActiveResourceService, IDocumentManager } from '../../platform/common/application/types'; import { PYTHON_LANGUAGE } from '../../platform/common/constants'; diff --git a/src/standalone/import-export/importTracker.node.ts b/src/standalone/import-export/importTracker.node.ts index 96c529ed0ef..fd8b66f39de 100644 --- a/src/standalone/import-export/importTracker.node.ts +++ b/src/standalone/import-export/importTracker.node.ts @@ -14,8 +14,8 @@ import '../../platform/common/extensions'; import { disposeAllDisposables } from '../../platform/common/helpers'; import { IDisposable, IDisposableRegistry } from '../../platform/common/types'; import { noop } from '../../platform/common/utils/misc'; -import { EventName } from '../../telemetry/constants'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { EventName } from '../../platform/telemetry/constants'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { getAssociatedJupyterNotebook, isJupyterNotebook, splitMultilineString } from '../../platform/common/utils'; /* diff --git a/src/telemetryTypes.ts b/src/telemetry.ts similarity index 99% rename from src/telemetryTypes.ts rename to src/telemetry.ts index 22441d3d06e..f51bb459801 100644 --- a/src/telemetryTypes.ts +++ b/src/telemetry.ts @@ -12,7 +12,7 @@ import { Telemetry, VSCodeNativeTelemetry } from './platform/common/constants'; -import { CheckboxState, EventName, PlatformErrors, SliceOperationSource } from './telemetry/constants'; +import { CheckboxState, EventName, PlatformErrors, SliceOperationSource } from './platform/telemetry/constants'; import { DebuggingTelemetry } from './kernels/debugger/constants'; import { EnvironmentType, PythonEnvironment } from './platform/pythonEnvironments/info'; import { TelemetryErrorProperties, ErrorCategory } from './platform/errors/types'; @@ -23,6 +23,8 @@ import { PreferredKernelExactMatchReason } from './notebooks/controllers/noteboo import { SelectJupyterUriCommandSource } from './kernels/jupyter/serverSelector'; import { TerminalShellType } from './platform/terminals/types'; +export * from './platform/telemetry/index'; + export type ResourceSpecificTelemetryProperties = Partial<{ resourceType: 'notebook' | 'interactive'; /** diff --git a/src/test/common/experiments/service.unit.test.ts b/src/test/common/experiments/service.unit.test.ts index b1b3bcb4ca6..5e11d34097d 100644 --- a/src/test/common/experiments/service.unit.test.ts +++ b/src/test/common/experiments/service.unit.test.ts @@ -14,7 +14,7 @@ import { ConfigurationService } from '../../../platform/common/configuration/ser import { ExperimentService } from '../../../platform/common/experiments/service'; import { IConfigurationService } from '../../../platform/common/types'; import * as Telemetry from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../../platform/telemetry/constants'; import { JVSC_EXTENSION_ID_FOR_TESTS } from '../../constants.node'; import { MockOutputChannel } from '../../mockClasses'; import { MockMemento } from '../../mocks/mementos'; diff --git a/src/test/datascience/ipywidgets/ipyWidgetScriptManager.vscode.common.test.ts b/src/test/datascience/ipywidgets/ipyWidgetScriptManager.vscode.common.test.ts index ee04d2e8202..0c361a99b9f 100644 --- a/src/test/datascience/ipywidgets/ipyWidgetScriptManager.vscode.common.test.ts +++ b/src/test/datascience/ipywidgets/ipyWidgetScriptManager.vscode.common.test.ts @@ -20,7 +20,7 @@ import { PYTHON_LANGUAGE } from '../../../platform/common/constants'; import { traceInfo } from '../../../platform/logging'; import { IKernel, IKernelProvider, isLocalConnection } from '../../../kernels/types'; import { IIPyWidgetScriptManager, IIPyWidgetScriptManagerFactory } from '../../../kernels/ipywidgets/types'; -import { getTelemetrySafeHashedString } from '../../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../../platform/telemetry/helpers'; import { IFileSystem } from '../../../platform/common/platform/types'; import { IFileSystemNode } from '../../../platform/common/platform/types.node'; diff --git a/src/test/kernels/installer/productPath.unit.test.ts b/src/test/kernels/installer/productPath.unit.test.ts index da730028a08..8343183a74c 100644 --- a/src/test/kernels/installer/productPath.unit.test.ts +++ b/src/test/kernels/installer/productPath.unit.test.ts @@ -10,7 +10,7 @@ import * as TypeMoq from 'typemoq'; import { Memento, Uri } from 'vscode'; import '../../../platform/common/extensions'; import { IConfigurationService, IOutputChannel } from '../../../platform/common/types'; -import { InterpreterPackages } from '../../../telemetry/interpreterPackages.node'; +import { InterpreterPackages } from '../../../platform/telemetry/interpreterPackages.node'; import { IServiceContainer } from '../../../platform/ioc/types'; import { ProductInstaller } from '../../../kernels/installer/productInstaller.node'; import { BaseProductPathsService } from '../../../kernels/installer/productPath.node'; diff --git a/src/test/telemetry/importTracker.unit.test.ts b/src/test/telemetry/importTracker.unit.test.ts index ad3589b08e8..6e610ab5c08 100644 --- a/src/test/telemetry/importTracker.unit.test.ts +++ b/src/test/telemetry/importTracker.unit.test.ts @@ -17,8 +17,8 @@ import { } from '../../platform/common/constants'; import { disposeAllDisposables } from '../../platform/common/helpers'; import { IDisposable } from '../../platform/common/types'; -import { EventName } from '../../telemetry/constants'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { EventName } from '../../platform/telemetry/constants'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { ImportTracker } from '../../standalone/import-export/importTracker.node'; import { createDocument } from '../datascience/editor-integration/helpers'; diff --git a/src/webviews/extension-side/dataviewer/dataViewer.ts b/src/webviews/extension-side/dataviewer/dataViewer.ts index 637038cbcf9..4f39a95cee5 100644 --- a/src/webviews/extension-side/dataviewer/dataViewer.ts +++ b/src/webviews/extension-side/dataviewer/dataViewer.ts @@ -20,7 +20,7 @@ import { IJupyterVariableDataProvider } from './types'; import { isValidSliceExpression, preselectedSliceExpression } from '../../webview-side/data-explorer/helpers'; -import { CheckboxState } from '../../../telemetry/constants'; +import { CheckboxState } from '../../../platform/telemetry/constants'; import { IKernel } from '../../../kernels/types'; import { IWebviewPanelProvider, diff --git a/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts b/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts index b71e98cbdc6..ac11b0646ea 100644 --- a/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts +++ b/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts @@ -26,7 +26,7 @@ import { IInterpreterService } from '../../../platform/interpreter/contracts'; import { traceError, traceInfo } from '../../../platform/logging'; import { IShowDataViewerFromVariablePanel } from '../../../platform/messageTypes'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../../platform/telemetry/constants'; import { PythonEnvironment } from '../../../standalone/api/extension'; import { IDataScienceErrorHandler } from '../../../kernels/errors/types'; import { DataViewerChecker } from './dataViewerChecker'; diff --git a/src/webviews/extension-side/dataviewer/types.ts b/src/webviews/extension-side/dataviewer/types.ts index de2b07e4012..4c0501ec928 100644 --- a/src/webviews/extension-side/dataviewer/types.ts +++ b/src/webviews/extension-side/dataviewer/types.ts @@ -8,7 +8,7 @@ import { IJupyterVariable } from '../../../kernels/variables/types'; import { IDisposable } from '../../../platform/common/types'; import { SharedMessages } from '../../../platform/messageTypes'; import { PythonEnvironment } from '../../../platform/pythonEnvironments/info'; -import { SliceOperationSource } from '../../../telemetry/constants'; +import { SliceOperationSource } from '../../../platform/telemetry/constants'; export const CellFetchAllLimit = 100000; export const CellFetchSizeFirst = 100000; diff --git a/src/webviews/webview-side/data-explorer/sliceControl.tsx b/src/webviews/webview-side/data-explorer/sliceControl.tsx index 14459cf0408..984b96236e7 100644 --- a/src/webviews/webview-side/data-explorer/sliceControl.tsx +++ b/src/webviews/webview-side/data-explorer/sliceControl.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Dropdown, IDropdownOption, ResponsiveMode } from '@fluentui/react'; import * as React from 'react'; -import { SliceOperationSource } from '../../../telemetry/constants'; +import { SliceOperationSource } from '../../../platform/telemetry/constants'; import { IGetSliceRequest } from '../../extension-side/dataviewer/types'; import { getLocString } from '../react-common/locReactSide'; import { measureText } from '../react-common/textMeasure'; From 10c3e28abb77254ac92d38284bc67d349dd5d54d Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 22 Jun 2022 11:48:43 -0700 Subject: [PATCH 4/6] Update telemetry generator --- TELEMETRY.md | 9645 +++++++++++++++++ src/platform/tools/telemetryGenerator.node.ts | 4 +- 2 files changed, 9647 insertions(+), 2 deletions(-) diff --git a/TELEMETRY.md b/TELEMETRY.md index a32e6eb1106..2e2874faaa5 100644 --- a/TELEMETRY.md +++ b/TELEMETRY.md @@ -2,3 +2,9648 @@ Expand each section to see more information about that event. +
+ DATASCIENCE.ADD_CELL_BELOW + +## Description + + + + Data Science + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/commands/commandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/commands/commandRegistry.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.AddCellBelow) + private async addCellBelow(): Promise { + await this.getCurrentCodeWatcher()?.addEmptyCellToBottom(); + } +``` + +
+
+ DATASCIENCE.CLICKED_EXPORT_NOTEBOOK_AS_QUICK_PICK + +## Description + + +No description provided + +## Properties + +- format: ExportFormat + +## Locations Used + +[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) +```typescript + if (pickedItem !== undefined) { + pickedItem.handler(); + } else { + sendTelemetryEvent(Telemetry.ClickedExportNotebookAsQuickPick); + } + } + } +``` + + +[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) +```typescript + label: DataScience.exportPythonQuickPickLabel(), + picked: true, + handler: () => { + sendTelemetryEvent(Telemetry.ClickedExportNotebookAsQuickPick, undefined, { + format: ExportFormat.python + }); + this.commandManager +``` + + +[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) +```typescript + label: DataScience.exportHTMLQuickPickLabel(), + picked: false, + handler: () => { + sendTelemetryEvent(Telemetry.ClickedExportNotebookAsQuickPick, undefined, { + format: ExportFormat.html + }); + this.commandManager +``` + + +[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) +```typescript + label: DataScience.exportPDFQuickPickLabel(), + picked: false, + handler: () => { + sendTelemetryEvent(Telemetry.ClickedExportNotebookAsQuickPick, undefined, { + format: ExportFormat.pdf + }); + this.commandManager +``` + +
+
+ DATASCIENCE.COLLAPSE_ALL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.COPY_SOURCE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.CREATE_NEW_INTERACTIVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.CreateNewInteractive, undefined, false) + private async createNewInteractiveWindow(connection?: KernelConnectionMetadata): Promise { + await this.interactiveWindowProvider.getOrCreate(undefined, connection); + } +``` + +
+
+ DATASCIENCE.DATA_VIEWER_DATA_DIMENSIONALITY + +## Description + + + + + Telemetry event sent when a slice is first applied in a + data viewer instance to a sliceable Python variable. + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) +```typescript + + private maybeSendSliceDataDimensionalityTelemetry(numberOfDimensions: number) { + if (!this.sentDataViewerSliceDimensionalityTelemetry) { + sendTelemetryEvent(Telemetry.DataViewerDataDimensionality, undefined, { numberOfDimensions }); + this.sentDataViewerSliceDimensionalityTelemetry = true; + } + } +``` + +
+
+ DATASCIENCE.DATA_VIEWER_SLICE_ENABLEMENT_STATE_CHANGED + +## Description + + + + + Telemetry event sent whenever the user toggles the checkbox + controlling whether a slice is currently being applied to an + n-dimensional variable. + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) +```typescript + break; + + case DataViewerMessages.SliceEnablementStateChanged: + void sendTelemetryEvent(Telemetry.DataViewerSliceEnablementStateChanged, undefined, { + newState: payload.newState ? CheckboxState.Checked : CheckboxState.Unchecked + }); + break; +``` + +
+
+ DATASCIENCE.DATA_VIEWER_SLICE_OPERATION + +## Description + + + + + Telemetry event sent whenever the user applies a valid slice + to a sliceable Python variable in the data viewer. + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) +```typescript + if (payload.shape?.length) { + this.maybeSendSliceDataDimensionalityTelemetry(payload.shape.length); + } + sendTelemetryEvent(Telemetry.DataViewerSliceOperation, undefined, { source: request.source }); + return this.postMessage(DataViewerMessages.InitializeData, payload); + } + }); +``` + +
+
+ DATASCIENCE.DEBUG_CONTINUE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/commands/commandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/commands/commandRegistry.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.DebugContinue) + private async debugContinue(): Promise { + // Make sure that we are in debug mode + if (this.debugService?.activeDebugSession) { +``` + +
+
+ DATASCIENCE.DEBUG_CURRENT_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + return this.codeLenses; + } + + @captureTelemetry(Telemetry.DebugCurrentCell) + public async debugCurrentCell() { + if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { + return; +``` + + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + return this.runMatchingCell(range, advance); + } + + @captureTelemetry(Telemetry.DebugCurrentCell) + public async debugCell(range: Range): Promise { + if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { + return; +``` + +
+
+ DATASCIENCE.DEBUG_FILE_INTERACTIVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + return this.runFileInteractiveInternal(false); + } + + @captureTelemetry(Telemetry.DebugFileInteractive) + public async debugFileInteractive() { + return this.runFileInteractiveInternal(true); + } +``` + +
+
+ DATASCIENCE.DEBUG_STEP_OVER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/commands/commandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/commands/commandRegistry.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.DebugStepOver) + private async debugStepOver(): Promise { + // Make sure that we are in debug mode + if (this.debugService?.activeDebugSession) { +``` + +
+
+ DATASCIENCE.DEBUG_STOP + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/commands/commandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/commands/commandRegistry.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.DebugStop) + private async debugStop(uri: Uri): Promise { + // Make sure that we are in debug mode + if (this.debugService?.activeDebugSession && this.interactiveWindowProvider) { +``` + +
+
+ DATASCIENCE.DEBUGGING.CLICKED_ON_SETUP + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) +```typescript + ); + + if (response === DataScience.setup()) { + sendTelemetryEvent(DebuggingTelemetry.clickedOnSetup); + this.appShell.openUrl( + 'https://github.com/microsoft/vscode-jupyter/wiki/Setting-Up-Run-by-Line-and-Debugging-for-Notebooks' + ); +``` + +
+
+ DATASCIENCE.DEBUGGING.CLICKED_RUN_AND_DEBUG_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/debugger/debuggingManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManager.ts) +```typescript + }), + + this.commandManager.registerCommand(DSCommands.RunAndDebugCell, async (cell: NotebookCell | undefined) => { + sendTelemetryEvent(DebuggingTelemetry.clickedRunAndDebugCell); + const editor = this.vscNotebook.activeNotebookEditor; + if (!cell) { + const range = editor?.selections[0]; +``` + +
+
+ DATASCIENCE.DEBUGGING.CLICKED_RUNBYLINE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/debugger/debuggingManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManager.ts) +```typescript + }), + + this.commandManager.registerCommand(DSCommands.RunByLine, async (cell: NotebookCell | undefined) => { + sendTelemetryEvent(DebuggingTelemetry.clickedRunByLine); + const editor = this.vscNotebook.activeNotebookEditor; + if (!cell) { + const range = editor?.selections[0]; +``` + +
+
+ DATASCIENCE.DEBUGGING.CLOSED_MODAL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) +```typescript + 'https://github.com/microsoft/vscode-jupyter/wiki/Setting-Up-Run-by-Line-and-Debugging-for-Notebooks' + ); + } else { + sendTelemetryEvent(DebuggingTelemetry.closedModal); + } + } +} +``` + +
+
+ DATASCIENCE.DEBUGGING.ENDED_SESSION + +## Description + + +No description provided + +## Properties + +- + reason: 'normally' | 'onKernelDisposed' | 'onAnInterrupt' | 'onARestart' | 'withKeybinding'; + +## Locations Used + +[src/kernels/debugger/kernelDebugAdapterBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/debugger/kernelDebugAdapterBase.ts) +```typescript + this.kernel.onDisposed(() => { + debug.stopDebugging(this.session).then(noop, noop); + this.endSession.fire(this.session); + sendTelemetryEvent(DebuggingTelemetry.endedSession, undefined, { reason: 'onKernelDisposed' }); + }) + ); + } +``` + + +[src/kernels/debugger/kernelDebugAdapterBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/debugger/kernelDebugAdapterBase.ts) +```typescript + cellStateChange.state === NotebookCellExecutionState.Idle && + !this.disconnected + ) { + sendTelemetryEvent(DebuggingTelemetry.endedSession, undefined, { reason: 'normally' }); + this.disconnect().ignoreErrors(); + } + }, +``` + + +[src/notebooks/debugger/debuggingManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManager.ts) +```typescript + if (editor) { + const controller = this.notebookToRunByLineController.get(editor.notebook); + if (controller) { + sendTelemetryEvent(DebuggingTelemetry.endedSession, undefined, { + reason: 'withKeybinding' + }); + controller.stop(); +``` + +
+
+ DATASCIENCE.DEBUGGING.IPYKERNEL6_STATUS + +## Description + + +No description provided + +## Properties + +- + status: 'installed' | 'notInstalled'; + +## Locations Used + +[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) +```typescript + } + + const result = await isUsingIpykernel6OrLater(kernel); + sendTelemetryEvent(DebuggingTelemetry.ipykernel6Status, undefined, { + status: result === IpykernelCheckResult.Ok ? 'installed' : 'notInstalled' + }); + return result; +``` + +
+
+ DATASCIENCE.DEBUGGING.SUCCESSFULLY_STARTED_IW_JUPYTER + +## Description + + + + + Telemetry sent when we have managed to successfully start the Interactive Window debugger using the Jupyter protocol. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.DEBUGGING.SUCCESSFULLY_STARTED_RUN_AND_DEBUG_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/debugger/debugCellControllers.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debugCellControllers.ts) +```typescript + private readonly kernel: IKernel, + private readonly commandManager: ICommandManager + ) { + sendTelemetryEvent(DebuggingTelemetry.successfullyStartedRunAndDebugCell); + } + + public async willSendEvent(_msg: DebugProtocolMessage): Promise { +``` + + +[src/interactive-window/debugger/jupyter/debugCellControllers.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/jupyter/debugCellControllers.ts) +```typescript + public readonly debugCell: NotebookCell, + private readonly kernel: IKernel + ) { + sendTelemetryEvent(DebuggingTelemetry.successfullyStartedRunAndDebugCell); + } + + public async willSendEvent(_msg: DebugProtocolMessage): Promise { +``` + +
+
+ DATASCIENCE.DEBUGGING.SUCCESSFULLY_STARTED_RUNBYLINE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/debugger/runByLineController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/runByLineController.ts) +```typescript + private readonly kernel: IKernel, + private readonly settings: IConfigurationService + ) { + sendTelemetryEvent(DebuggingTelemetry.successfullyStartedRunByLine); + } + + public continue(): void { +``` + +
+
+ DATASCIENCE.DEBUGPY_INSTALL_CANCELLED + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.DEBUGPY_INSTALL_FAILED + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.DEBUGPY_PROMPT_TO_INSTALL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.DEBUGPY_SUCCESSFULLY_INSTALLED + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.DELETE_ALL_CELLS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.DELETE_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.DISABLE_INTERACTIVE_SHIFT_ENTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/shiftEnterBanner.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/shiftEnterBanner.ts) +```typescript + ); + } + + @captureTelemetry(Telemetry.DisableInteractiveShiftEnter) + public async disableInteractiveShiftEnter(): Promise { + await this.configuration.updateSetting( + 'sendSelectionToInteractiveWindow', +``` + + +[src/test/datascience/shiftEnterBanner.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/shiftEnterBanner.unit.test.ts) +```typescript + + expect(Reporter.eventNames).to.deep.equal([ + Telemetry.ShiftEnterBannerShown, + Telemetry.DisableInteractiveShiftEnter + ]); + }); +}); +``` + +
+
+ DATASCIENCE.ENABLE_INTERACTIVE_SHIFT_ENTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/shiftEnterBanner.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/shiftEnterBanner.ts) +```typescript + await this.disableBanner(); + } + + @captureTelemetry(Telemetry.EnableInteractiveShiftEnter) + public async enableInteractiveShiftEnter(): Promise { + await this.configuration.updateSetting( + 'sendSelectionToInteractiveWindow', +``` + + +[src/test/datascience/shiftEnterBanner.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/shiftEnterBanner.unit.test.ts) +```typescript + + expect(Reporter.eventNames).to.deep.equal([ + Telemetry.ShiftEnterBannerShown, + Telemetry.EnableInteractiveShiftEnter + ]); + }); + +``` + +
+
+ DATASCIENCE.ENTER_JUPYTER_URI + +## Description + + + + + Captures the telemetry when the Uri is manually entered by the user as part of the workflow when selecting a Kernel. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + return multiStep.run(this.startSelectingURI.bind(this, allowLocal), {}); + } + + @captureTelemetry(Telemetry.EnterJupyterURI) + @traceDecoratorError('Failed to enter Jupyter Uri') + public async enterJupyterURI(): Promise { + let initialValue = defaultUri; +``` + +
+
+ DATASCIENCE.EXECUTE_CELL + +## Description + + + + Applies to everything (interactive+Notebooks & local+remote) + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript + properties?: P[E] & { waitBeforeSending?: Promise }, + ex?: Error +) { + if (eventName === Telemetry.ExecuteCell) { + setSharedProperty('userExecutedCell', 'true'); + } + +``` + + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript + stopWatch?: StopWatch, + properties?: P[E] & { [waitBeforeSending]?: Promise } +) { + if (eventName === Telemetry.ExecuteCell) { + setSharedProperty('userExecutedCell', 'true'); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any +``` + + +[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) +```typescript + return; + } + initializeInteractiveOrNotebookTelemetryBasedOnUserAction(notebook.uri, this.connection); + sendKernelTelemetryEvent(notebook.uri, Telemetry.ExecuteCell); + // Notebook is trusted. Continue to execute cells + await Promise.all(cells.map((cell) => this.executeCell(notebook, cell))); + } +``` + + +[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) +```typescript + } + public async executeCell(cell: NotebookCell, codeOverride?: string): Promise { + traceCellMessage(cell, `kernel.executeCell, ${getDisplayPath(cell.notebook.uri)}`); + sendKernelTelemetryEvent(this.resourceUri, Telemetry.ExecuteCell); + const stopWatch = new StopWatch(); + const sessionPromise = this.startJupyterSession(); + const promise = this.kernelExecution.executeCell(sessionPromise, cell, codeOverride); +``` + + +[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) +```typescript + }; + + // Right now this is the guaranteed list. Might want to expand this. + assertEvent(Telemetry.ExecuteCell); + assertEvent(Telemetry.OpenNotebookAll); + assertEvent(Telemetry.NotebookStart); + }); +``` + +
+
+ DATASCIENCE.EXECUTE_CELL_TIME + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.EXPAND_ALL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.EXPORT_NOTEBOOK + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.EXPORT_NOTEBOOK_AS + +## Description + + +No description provided + +## Properties + +- format: ExportFormat; +- cancelled?: boolean; +- successful?: boolean; +- opened?: boolean + +## Locations Used + +[src/notebooks/export/exportFileOpener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/export/exportFileOpener.ts) +```typescript + public async openFile(format: ExportFormat, uri: Uri, openDirectly: boolean = false) { + if (format === ExportFormat.python) { + await this.openPythonFile(uri, openDirectly); + sendTelemetryEvent(Telemetry.ExportNotebookAs, undefined, { + format: format, + successful: true, + opened: true +``` + + +[src/notebooks/export/exportFileOpener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/export/exportFileOpener.ts) +```typescript + }); + } else { + const opened = await this.askOpenFile(uri, openDirectly); + sendTelemetryEvent(Telemetry.ExportNotebookAs, undefined, { + format: format, + successful: true, + opened: opened +``` + + +[src/notebooks/export/fileConverter.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/export/fileConverter.ts) +```typescript + } + + if (reporter.token.isCancellationRequested) { + sendTelemetryEvent(Telemetry.ExportNotebookAs, undefined, { format: format, cancelled: true }); + return; + } + } +``` + +
+
+ DATASCIENCE.EXPORT_NOTEBOOK_AS_COMMAND + +## Description + + +No description provided + +## Properties + +- format: ExportFormat + +## Locations Used + +[src/standalone/import-export/exportCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/exportCommands.ts) +```typescript + this.controllers.getSelectedNotebookController(sourceDocument)?.connection.interpreter || + this.controllers.getPreferredNotebookController(sourceDocument)?.connection.interpreter; + if (exportMethod) { + sendTelemetryEvent(Telemetry.ExportNotebookAsCommand, undefined, { format: exportMethod }); + } + } + +``` + +
+
+ DATASCIENCE.EXPORT_NOTEBOOK_AS_FAILED + +## Description + + +No description provided + +## Properties + +- format: ExportFormat + +## Locations Used + +[src/notebooks/export/fileConverter.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/export/fileConverter.ts) +```typescript + await this.performExport(format, sourceDocument, target, token, candidateInterpreter); + } catch (e) { + traceError('Export failed', e); + sendTelemetryEvent(Telemetry.ExportNotebookAsFailed, undefined, { format: format }); + + if (format === ExportFormat.pdf) { + traceError(localize.DataScience.exportToPDFDependencyMessage()); +``` + +
+
+ DATASCIENCE.EXPORT_PYTHON_FILE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) +```typescript + return result; + } + + @captureTelemetry(Telemetry.ExportPythonFileInteractive, undefined, false) + private async exportFile(file: Uri): Promise { + const filePath = getFilePath(file); + if (filePath && filePath.length > 0 && this.jupyterExporter) { +``` + +
+
+ DATASCIENCE.EXPORT_PYTHON_FILE_AND_OUTPUT + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.ExportPythonFileAndOutputInteractive, undefined, false) + private async exportFileAndOutput(file: Uri): Promise { + const filePath = getFilePath(file); + if ( +``` + +
+
+ DATASCIENCE.FAILED_SHOW_DATA_EXPLORER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/variablesView/variableView.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/variablesView/variableView.ts) +```typescript + } + } catch (e) { + traceError(e); + sendTelemetryEvent(Telemetry.FailedShowDataViewer); + this.appShell.showErrorMessage(localize.DataScience.showDataViewerFail()).then(noop, noop); + } + } +``` + +
+
+ DATASCIENCE.FAILED_TO_CREATE_CONTROLLER + +## Description + + + + Telemetry sent when we fail to create a Notebook Controller (an entry for the UI kernel list in Native Notebooks). + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/controllers/notebookControllerManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/notebookControllerManager.ts) +```typescript + } + // We know that this fails when we have xeus kernels installed (untill that's resolved thats one instance when we can have duplicates). + sendTelemetryEvent( + Telemetry.FailedToCreateNotebookController, + undefined, + { kind: kernelConnection.kind }, + // eslint-disable-next-line @typescript-eslint/no-explicit-any +``` + +
+
+ DATASCIENCE.FAILED_TO_FIND_INTERPRETER_KERNEL_CONNECTION_FOR_INTERACTIVE + +## Description + + + + + Telemetry sent when we're unable to find a KernelSpec connection for Interactive window that can be started usig Python interpreter. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.FETCH_CONTROLLERS + +## Description + + + + + Telemetry sent when we have loaded some controllers. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/kernelFinder.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelFinder.base.ts) +```typescript + const key = `${kind}:${useCache}`; + if (this.startTimeForFetching && !this.fetchingTelemetrySent.has(key)) { + this.fetchingTelemetrySent.add(key); + sendTelemetryEvent(Telemetry.FetchControllers, this.startTimeForFetching.elapsedTime, { + cached: useCache === 'useCache', + kind + }); +``` + +
+
+ DATASCIENCE.GET_PASSWORD_ATTEMPT + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) +```typescript + this.serverUriStorage.onDidRemoveUris(this.onDidRemoveUris, this, this.disposables); + } + + @captureTelemetry(Telemetry.GetPasswordAttempt) + public getPasswordConnectionInfo(url: string): Promise { + if (!url || url.length < 1) { + return Promise.resolve(undefined); +``` + +
+
+ DATASCIENCE.GOTO_NEXT_CELL_IN_FILE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + }); + } + + @captureTelemetry(Telemetry.GotoNextCellInFile) + public gotoNextCell() { + const editor = this.documentManager.activeTextEditor; + if (!editor || !editor.selection) { +``` + +
+
+ DATASCIENCE.GOTO_PREV_CELL_IN_FILE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.GotoPrevCellInFile) + public gotoPreviousCell() { + const editor = this.documentManager.activeTextEditor; + if (!editor || !editor.selection) { +``` + +
+
+ DATASCIENCE.GOTO_SOURCE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.IMPORT_NOTEBOOK + +## Description + + +No description provided + +## Properties + +- scope: 'command' | 'file' + +## Locations Used + +[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) +```typescript + return this.statusProvider.waitWithStatus(promise, message, undefined, canceled); + } + + @captureTelemetry(Telemetry.ImportNotebook, { scope: 'command' }, false) + private async importNotebook(): Promise { + const filtersKey = localize.DataScience.importDialogFilter(); + const filtersObject: { [name: string]: string[] } = {}; +``` + + +[src/interactive-window/interactiveWindowCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/interactiveWindowCommandListener.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.ImportNotebook, { scope: 'file' }, false) + private async importNotebookOnFile(file: Uri): Promise { + const filepath = getFilePath(file); + if (filepath && filepath.length > 0) { +``` + +
+
+ DATASCIENCE.INTERACTIVE_WINDOW_DEBUG_SETUP_CODE_FAILURE + +## Description + + +No description provided + +## Properties + +- + ename: string; +- + evalue: string; + +## Locations Used + +[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) +```typescript + executeSilently(kernel.session, this.tracingEnableCode, { + traceErrors: true, + traceErrorsMessage: 'Execute_request failure enabling tracing code for IW', + telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure + }).ignoreErrors(); + } + +``` + + +[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) +```typescript + executeSilently(kernel.session, this.tracingDisableCode, { + traceErrors: true, + traceErrorsMessage: 'Execute_request failure disabling tracing code for IW', + telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure + }).ignoreErrors(); + } + +``` + + +[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) +```typescript + const importResults = await executeSilently(kernel.session, this.waitForDebugClientCode, { + traceErrors: true, + traceErrorsMessage: 'Execute_request failure starting debug session for IW', + telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure + }); + if (importResults.some((item) => item.output_type === 'error')) { + traceWarning(`${this.debuggerPackage} not found in path.`); +``` + + +[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) +```typescript + { + traceErrors: true, + traceErrorsMessage: 'Execute_request failure appending debugger paths for IW', + telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure + } + ) + : []; +``` + + +[src/interactive-window/debugger/interactiveWindowDebugger.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/debugger/interactiveWindowDebugger.node.ts) +```typescript + ? await executeSilently(kernel.session, this.enableDebuggerCode, { + traceErrors: true, + traceErrorsMessage: 'Execute_request failure enabling debugging for IW', + telemetryName: Telemetry.InteractiveWindowDebugSetupCodeFailure + }) + : []; + +``` + +
+
+ DATASCIENCE.INTERRUPT + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) +```typescript + this.documentExecutions.set(document, newCellExecutionQueue); + return newCellExecutionQueue; + } + @captureTelemetry(Telemetry.Interrupt) + @captureTelemetry(Telemetry.InterruptJupyterTime) + private async interruptExecution( + session: IJupyterSession, +``` + +
+
+ DATASCIENCE.JUPYTER_COMMAND_SEARCH + +## Description + + +No description provided + +## Properties + +- + where: 'activeInterpreter' | 'otherInterpreter' | 'path' | 'nowhere'; +- + command: JupyterCommands; + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.JUPYTER_KERNEL_API_ACCESS + +## Description + + +No description provided + +## Properties + +- + extensionId: string; +- + allowed: 'yes' | 'no'; + +## Locations Used + +[src/standalone/api/apiAccessService.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/apiAccessService.ts) +```typescript + const extensionPermissions = this.globalState.get(API_ACCESS_GLOBAL_KEY); + const extensionPermission = extensionPermissions?.find((item) => item.extensionId === info.extensionId); + if (extensionPermission) { + sendTelemetryEvent(Telemetry.JupyterKernelApiAccess, undefined, { + extensionId: info.extensionId, + allowed: extensionPermission.allowed + }); +``` + + +[src/standalone/api/apiAccessService.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/apiAccessService.ts) +```typescript + return this.globalState.update(API_ACCESS_GLOBAL_KEY, extensionPermissions); + }) + .then(noop, noop); + sendTelemetryEvent(Telemetry.JupyterKernelApiAccess, undefined, { + extensionId: info.extensionId, + allowed: allow ? 'yes' : 'no' + }); +``` + +
+
+ DATASCIENCE.JUPYTER_KERNEL_API_USAGE + +## Description + + +No description provided + +## Properties + +- + extensionId: string; +- + pemUsed: keyof IExportedKernelService; + +## Locations Used + +[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) +```typescript + KernelConnectionMetadata + >(); + public get onDidChangeKernelSpecifications(): Event { + sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { + extensionId: this.callingExtensionId, + pemUsed: 'onDidChangeKernelSpecifications' + }); +``` + + +[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) +```typescript + return this._onDidChangeKernelSpecifications.event; + } + public get onDidChangeKernels(): Event { + sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { + extensionId: this.callingExtensionId, + pemUsed: 'onDidChangeKernels' + }); +``` + + +[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) +```typescript + ); + } + async getKernelSpecifications(refresh?: boolean): Promise { + sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { + extensionId: this.callingExtensionId, + pemUsed: 'getKernelSpecifications' + }); +``` + + +[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) +```typescript + return items.map((item) => this.translateKernelConnectionMetadataToExportedType(item)); + } + getActiveKernels(): { metadata: KernelConnectionMetadata; uri: Uri | undefined }[] { + sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { + extensionId: this.callingExtensionId, + pemUsed: 'getActiveKernels' + }); +``` + + +[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) +```typescript + return kernels; + } + getKernel(uri: Uri): { metadata: KernelConnectionMetadata; connection: IKernelConnectionInfo } | undefined { + sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { + extensionId: this.callingExtensionId, + pemUsed: 'getKernel' + }); +``` + + +[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) +```typescript + } + } + async startKernel(spec: KernelConnectionMetadata, uri: Uri): Promise { + sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { + extensionId: this.callingExtensionId, + pemUsed: 'startKernel' + }); +``` + + +[src/standalone/api/kernelApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/api/kernelApi.ts) +```typescript + return this.startOrConnect(spec, uri); + } + async connect(spec: ActiveKernel, uri: Uri): Promise { + sendTelemetryEvent(Telemetry.JupyterKernelApiUsage, undefined, { + extensionId: this.callingExtensionId, + pemUsed: 'connect' + }); +``` + +
+
+ DATASCIENCE.JUPYTER_KERNEL_FILTER_USED + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/controllers/kernelFilter/kernelFilterUI.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/kernelFilter/kernelFilterUI.ts) +```typescript + .map((item) => item.connection) + .filter((item) => !selectedItems.has(item)); + this.kernelFilter.storeHiddenKernels(hiddenConnections.map((item) => item)).then(noop, noop); + sendTelemetryEvent(Telemetry.JupyterKernelFilterUsed); + }, + this, + disposables +``` + +
+
+ DATASCIENCE.JUPYTER_KERNEL_HIDDEN_VIA_FILTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/controllers/kernelFilter/kernelFilterService.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/kernelFilter/kernelFilterService.ts) +```typescript + }); + + if (hidden) { + sendTelemetryEvent(Telemetry.JupyterKernelHiddenViaFilter); + } + return hidden; + } +``` + +
+
+ DATASCIENCE.JUPYTER_NOT_INSTALLED_ERROR_SHOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) +```typescript + moduleName: ProductNames.get(Product.jupyter)!, + pythonEnvType: interpreter.envType + }); + sendTelemetryEvent(Telemetry.JupyterNotInstalledErrorShown); + const selection = await this.applicationShell.showErrorMessage( + message, + { modal: true }, +``` + +
+
+ DATASCIENCE.KERNEL_CRASH + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/kernelCrashMonitor.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelCrashMonitor.ts) +```typescript + } + private async endCellAndDisplayErrorsInCell(kernel: IKernel) { + const lastExecutedCell = this.lastExecutedCellPerKernel.get(kernel); + sendKernelTelemetryEvent(kernel.resourceUri, Telemetry.KernelCrash); + if (!lastExecutedCell) { + return; + } +``` + +
+
+ DATASCIENCE.KERNEL_SPEC_LANGUAGE + +## Description + + +No description provided + +## Properties + +- + /** + * Language of the kernelSpec. + */ + language: string; +- + /** + * Whether this is a local or remote kernel. + */ + kind: 'local' | 'remote'; +- + /** + * Whether shell is used to start the kernel. E.g. `"/bin/sh"` is used in the argv of the kernelSpec. + * OCaml is one such kernel. + */ + usesShell?: boolean; + +## Locations Used + +[src/kernels/raw/finder/helper.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/finder/helper.ts) +```typescript + arg = arg.toLowerCase(); + return shellScripts.some((shell) => arg.includes(shell)); + }); + sendTelemetryEvent(Telemetry.KernelSpecLanguage, undefined, { + language: getTelemetrySafeLanguage(kernelSpec.language), + kind, + usesShell +``` + +
+
+ DATASCIENCE.KERNEL_STARTUP_CODE_FAILURE + +## Description + + +No description provided + +## Properties + +- + ename: string; +- + evalue: string; + +## Locations Used + +[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) +```typescript + await this.executeSilently(session, startupCode, { + traceErrors: true, + traceErrorsMessage: 'Error executing jupyter extension internal startup code', + telemetryName: Telemetry.KernelStartupCodeFailure + }); + + // Run user specified startup commands +``` + +
+
+ DATASCIENCE.NATIVE.CONVERT_NOTEBOOK_TO_PYTHON + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.CREATE_NEW_NOTEBOOK + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/notebookEditorProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/notebookEditorProvider.ts) +```typescript +export class NotebookEditorProvider implements INotebookEditorProvider { + private providers: Set = new Set(); + constructor(@inject(IVSCodeNotebook) private readonly vscodeNotebook: IVSCodeNotebook) {} + @captureTelemetry(Telemetry.CreateNewNotebook, undefined, false) + public async createNew(options?: { contents?: string; defaultCellLanguage: string }): Promise { + // contents will be ignored + const language = options?.defaultCellLanguage ?? PYTHON_LANGUAGE; +``` + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.ARROW_DOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.ARROW_UP + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.CHANGE_TO_CODE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.CHANGE_TO_MARKDOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.DELETE_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.INSERT_ABOVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.INSERT_BELOW + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.REDO + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.RUN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.RUN_AND_ADD + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.RUN_AND_MOVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.SAVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.TOGGLE_LINE_NUMBERS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.TOGGLE_OUTPUT + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.UNDO + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.KEYBOARD.UNFOCUS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.ADD_TO_END + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.CHANGE_TO_CODE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.CHANGE_TO_MARKDOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.DELETE_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.INSERT_BELOW + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.MOVE_CELL_DOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.MOVE_CELL_UP + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.RUN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.RUN_ABOVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.RUN_ALL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.RUN_BELOW + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.SAVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.SELECT_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.SELECT_SERVER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.MOUSE.TOGGLE_VARIABLE_EXPLORER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.OPEN_NOTEBOOK + +## Description + + +No description provided + +## Properties + +- scope: 'command' | 'file' + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.OPEN_NOTEBOOK_ALL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/activation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/activation.node.ts) +```typescript + } + this.notebookOpened = true; + this.PreWarmDaemonPool().ignoreErrors(); + sendTelemetryEvent(Telemetry.OpenNotebookAll); + + if (!this.rawSupported.isSupported && this.extensionChecker.isPythonExtensionInstalled) { + // Warm up our selected interpreter for the extension +``` + + +[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) +```typescript + + // Right now this is the guaranteed list. Might want to expand this. + assertEvent(Telemetry.ExecuteCell); + assertEvent(Telemetry.OpenNotebookAll); + assertEvent(Telemetry.NotebookStart); + }); + test('Run interactive window', async () => { +``` + +
+
+ DATASCIENCE.NATIVE.OPEN_NOTEBOOK_SELECTION + +## Description + + + + + Telemetry sent with details of the selection of the quick pick for when user creates new notebook. + This only applies with other extensions like .NET registers with us. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NATIVE.OPEN_NOTEBOOK_SELECTION_REGISTERED + +## Description + + +No description provided + +## Properties + +- + /** + * The id of the extension registering with us to be displayed the dropdown list for notebook creation. + */ + extensionId: string; + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.NOTEBOOK_INTERRUPT + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function resetData(resource: Resource, eventName: string, properties: any) { + // Once we have successfully interrupted, clear the interrupt counter. + if (eventName === Telemetry.NotebookInterrupt) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookInterrupt] = properties; + // Check result to determine if success. +``` + + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript +function resetData(resource: Resource, eventName: string, properties: any) { + // Once we have successfully interrupted, clear the interrupt counter. + if (eventName === Telemetry.NotebookInterrupt) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookInterrupt] = properties; + // Check result to determine if success. + if (data && 'result' in data && data.result === InterruptResult.Success) { +``` + + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript + // Once we have successfully interrupted, clear the interrupt counter. + if (eventName === Telemetry.NotebookInterrupt) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookInterrupt] = properties; + // Check result to determine if success. + if (data && 'result' in data && data.result === InterruptResult.Success) { + clearInterruptCounter(resource); +``` + + +[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) +```typescript + // Otherwise a real error occurred. + sendKernelTelemetryEvent( + this.kernel.resourceUri, + Telemetry.NotebookInterrupt, + stopWatch.elapsedTime, + undefined, + exc +``` + + +[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) +```typescript + })(); + + return promise.then((result) => { + sendKernelTelemetryEvent(this.kernel.resourceUri, Telemetry.NotebookInterrupt, stopWatch.elapsedTime, { + result + }); + return result; +``` + +
+
+ DATASCIENCE.NOTEBOOK_LANGUAGE + +## Description + + + + + Telemetry event sent to indicate the language used in a notebook + + @type { language: string } + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts) +```typescript +import { getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; + +export function sendNotebookOrKernelLanguageTelemetry( + telemetryEvent: Telemetry.SwitchToExistingKernel | Telemetry.NotebookLanguage, + language?: string +) { + language = getTelemetrySafeLanguage(language); +``` + +
+
+ DATASCIENCE.NOTEBOOK_RESTART + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript + } + } + // Once we have successfully restarted, clear the interrupt counter. + if (eventName === Telemetry.NotebookRestart) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookRestart] = properties; + // For restart to be successful, we should not have `failed` +``` + + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript + } + // Once we have successfully restarted, clear the interrupt counter. + if (eventName === Telemetry.NotebookRestart) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookRestart] = properties; + // For restart to be successful, we should not have `failed` + const failed = data && 'failed' in data ? data.failed : false; +``` + + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript + // Once we have successfully restarted, clear the interrupt counter. + if (eventName === Telemetry.NotebookRestart) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookRestart] = properties; + // For restart to be successful, we should not have `failed` + const failed = data && 'failed' in data ? data.failed : false; + if (!failed) { +``` + + +[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) +```typescript + await (this._jupyterSessionPromise + ? this.kernelExecution.restart(this._jupyterSessionPromise) + : this.start(new DisplayOptions(false))); + sendKernelTelemetryEvent(this.resourceUri, Telemetry.NotebookRestart, stopWatch.elapsedTime); + } catch (ex) { + traceError(`Restart failed ${getDisplayPath(this.uri)}`, ex); + this._ignoreJupyterSessionDisposedErrors = true; +``` + + +[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) +```typescript + this.restarting = undefined; + // If we get a kernel promise failure, then restarting timed out. Just shutdown and restart the entire server. + // Note, this code might not be necessary, as such an error is thrown only when interrupting a kernel times out. + sendKernelTelemetryEvent(this.resourceUri, Telemetry.NotebookRestart, stopWatch.elapsedTime, undefined, ex); + await session?.dispose().catch(noop); + this._ignoreJupyterSessionDisposedErrors = false; + throw ex; +``` + +
+
+ DATASCIENCE.NOTEBOOK_START + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function incrementStartFailureCount(resource: Resource, eventName: any, properties: any) { + if (eventName === Telemetry.NotebookStart) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookStart] = properties; + // Check start failed. +``` + + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function incrementStartFailureCount(resource: Resource, eventName: any, properties: any) { + if (eventName === Telemetry.NotebookStart) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookStart] = properties; + // Check start failed. + if (data && 'failed' in data && data.failed) { +``` + + +[src/kernels/telemetry/sendKernelTelemetryEvent.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/telemetry/sendKernelTelemetryEvent.ts) +```typescript +function incrementStartFailureCount(resource: Resource, eventName: any, properties: any) { + if (eventName === Telemetry.NotebookStart) { + let kv: Pick; + const data: undefined | typeof kv[Telemetry.NotebookStart] = properties; + // Check start failed. + if (data && 'failed' in data && data.failed) { + trackKernelResourceInformation(resource, { startFailed: true }); +``` + + +[src/kernels/jupyter/launcher/notebookProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/notebookProvider.ts) +```typescript + + sendKernelTelemetryWhenDone( + options.resource, + Telemetry.NotebookStart, + promise || Promise.resolve(undefined), + undefined, + { +``` + + +[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) +```typescript + // Right now this is the guaranteed list. Might want to expand this. + assertEvent(Telemetry.ExecuteCell); + assertEvent(Telemetry.OpenNotebookAll); + assertEvent(Telemetry.NotebookStart); + }); + test('Run interactive window', async () => { + const { activeInteractiveWindow } = await runNewPythonFile( +``` + +
+
+ DATASCIENCE.OPEN_PLOT_VIEWER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/plotting/plotViewerProvider.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/plotting/plotViewerProvider.node.ts) +```typescript + this.currentViewer = this.serviceContainer.get(IPlotViewer); + this.currentViewerClosed = this.currentViewer.closed(this.closedViewer); + this.currentViewer.removed(this.removedPlot); + sendTelemetryEvent(Telemetry.OpenPlotViewer); + await this.currentViewer.show(); + } + +``` + +
+
+ DATASCIENCE.OPENED_INTERACTIVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.PYTHON_VARIABLE_FETCHING_CODE_FAILURE + +## Description + + +No description provided + +## Properties + +- + ename: string; +- + evalue: string; + +## Locations Used + +[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) +```typescript + { + traceErrors: true, + traceErrorsMessage: 'Failure in execute_request for getDataFrameInfo', + telemetryName: Telemetry.PythonVariableFetchingCodeFailure + } + ); + +``` + + +[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) +```typescript + { + traceErrors: true, + traceErrorsMessage: 'Failure in execute_request for getDataFrameRows', + telemetryName: Telemetry.PythonVariableFetchingCodeFailure + } + ); + +``` + + +[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) +```typescript + { + traceErrors: true, + traceErrorsMessage: 'Failure in execute_request for getVariableProperties', + telemetryName: Telemetry.PythonVariableFetchingCodeFailure + } + ); + result = { ...result, ...this.deserializeJupyterResult(attributes) }; +``` + + +[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) +```typescript + { + traceErrors: true, + traceErrorsMessage: 'Failure in execute_request for getVariableNamesAndTypesFromKernel', + telemetryName: Telemetry.PythonVariableFetchingCodeFailure + } + ); + +``` + + +[src/kernels/variables/pythonVariableRequester.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/pythonVariableRequester.ts) +```typescript + { + traceErrors: true, + traceErrorsMessage: 'Failure in execute_request for getFullVariable', + telemetryName: Telemetry.PythonVariableFetchingCodeFailure + } + ); + +``` + +
+
+ DATASCIENCE.RECOMMENT_EXTENSION + +## Description + + + + Telemetry sent when we recommend installing an extension. + +## Properties + +- + /** + * Extension we recommended the user to install. + */ + extensionId: string; +- + /** + * `displayed` - If prompt was displayed + * `dismissed` - If prompt was displayed & dismissed by the user + * `ok` - If prompt was displayed & ok clicked by the user + * `cancel` - If prompt was displayed & cancel clicked by the user + * `doNotShowAgain` - If prompt was displayed & doNotShowAgain clicked by the user + */ + action: 'displayed' | 'dismissed' | 'ok' | 'cancel' | 'doNotShowAgain'; + +## Locations Used + +[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) +```typescript + `[${extensionInfo.displayName}](${extensionInfo.extensionLink})`, + language + ); + sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'displayed' }); + const selection = await this.appShell.showInformationMessage( + message, + Common.bannerLabelYes(), +``` + + +[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) +```typescript + ); + switch (selection) { + case Common.bannerLabelYes(): { + sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'ok' }); + this.commandManager.executeCommand('extension.open', extensionId).then(noop, noop); + break; + } +``` + + +[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) +```typescript + break; + } + case Common.bannerLabelNo(): { + sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'cancel' }); + break; + } + case Common.doNotShowAgain(): { +``` + + +[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) +```typescript + break; + } + case Common.doNotShowAgain(): { + sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'doNotShowAgain' }); + const list = this.globalMemento.get(mementoKeyToNeverPromptExtensionAgain, []); + if (!list.includes(extensionId)) { + list.push(extensionId); +``` + + +[src/standalone/recommendation/extensionRecommendation.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/recommendation/extensionRecommendation.node.ts) +```typescript + break; + } + default: + sendTelemetryEvent(Telemetry.RecommendExtension, undefined, { extensionId, action: 'dismissed' }); + } + } +} +``` + +
+
+ DATASCIENCE.REDO + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.REFRESH_DATA_VIEWER + +## Description + + + + + Sent when the jupyter.refreshDataViewer command is invoked + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) +```typescript + + case DataViewerMessages.RefreshDataViewer: + this.refreshData().ignoreErrors(); + void sendTelemetryEvent(Telemetry.RefreshDataViewer); + break; + + case DataViewerMessages.SliceEnablementStateChanged: +``` + +
+
+ DATASCIENCE.RESTART_KERNEL_COMMAND + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/notebookCommandListener.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/notebookCommandListener.ts) +```typescript + return; + } + + sendTelemetryEvent(Telemetry.RestartKernelCommand); + const kernel = this.kernelProvider.get(document.uri); + + if (kernel) { +``` + +
+
+ DATASCIENCE.RUN_ADD_EMPTY_CELL_TO_BOTTOM + +## Description + + + + + Misc + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.RUN_ALL_CELLS + +## Description + + + + + Run Cell Commands in Interactive Python + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + this.closeDocumentDisposable?.dispose(); // NOSONAR + this.updateRequiredDisposable?.dispose(); // NOSONAR + } + @captureTelemetry(Telemetry.RunAllCells) + public async runAllCells() { + const iw = await this.getActiveInteractiveWindow(); + const runCellCommands = this.codeLenses.filter( +``` + +
+
+ DATASCIENCE.RUN_ALL_CELLS_ABOVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + + // Run all cells up to the cell containing this start line and character + @captureTelemetry(Telemetry.RunAllCellsAbove) + public async runAllCellsAbove(stopLine: number, stopCharacter: number) { + const iw = await this.getActiveInteractiveWindow(); + const runCellCommands = this.codeLenses.filter((c) => c.command && c.command.command === Commands.RunCell); +``` + +
+
+ DATASCIENCE.RUN_BY_LINE + +## Description + + + + Run by line events + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.RUN_BY_LINE_STEP + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.RUN_BY_LINE_STOP + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.RUN_BY_LINE_VARIABLE_HOVER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/variables/debuggerVariables.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/debuggerVariables.ts) +```typescript + // Note, full variable results isn't necessary for this call. It only really needs the variable value. + const result = this.lastKnownVariables.find((v) => v.name === name); + if (result && kernel?.resourceUri && uriPath.extname(kernel?.resourceUri).toLowerCase() === '.ipynb') { + sendTelemetryEvent(Telemetry.RunByLineVariableHover); + } + return result; + } +``` + +
+
+ DATASCIENCE.RUN_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.RUN_CELL_AND_ALL_BELOW + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + await finished; + } + + @captureTelemetry(Telemetry.RunCellAndAllBelow) + public async runCellAndAllBelow(startLine: number, startCharacter: number) { + const iw = await this.getActiveInteractiveWindow(); + const runCellCommands = this.codeLenses.filter((c) => c.command && c.command.command === Commands.RunCell); +``` + +
+
+ DATASCIENCE.RUN_CHANGE_CELL_TO_CODE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + }); + } + + @captureTelemetry(Telemetry.ChangeCellToCode) + public changeCellToCode() { + this.applyToCells((editor, cell, _) => { + return this.changeCellTo(editor, cell, 'code'); +``` + +
+
+ DATASCIENCE.RUN_CHANGE_CELL_TO_MARKDOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + await this.moveCellsDirection(false); + } + + @captureTelemetry(Telemetry.ChangeCellToMarkdown) + public changeCellToMarkdown() { + this.applyToCells((editor, cell, _) => { + return this.changeCellTo(editor, cell, 'markdown'); +``` + +
+
+ DATASCIENCE.RUN_CURRENT_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + return this.runMatchingCell(range, false, true); + } + + @captureTelemetry(Telemetry.RunCurrentCell) + public async runCurrentCell(): Promise { + if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { + return; +``` + +
+
+ DATASCIENCE.RUN_CURRENT_CELL_AND_ADD_BELOW + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.RunCurrentCellAndAddBelow) + public async runCurrentCellAndAddBelow(): Promise { + if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { + return; +``` + +
+
+ DATASCIENCE.RUN_CURRENT_CELL_AND_ADVANCE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + return this.runMatchingCell(this.documentManager.activeTextEditor.selection, false); + } + + @captureTelemetry(Telemetry.RunCurrentCellAndAdvance) + public async runCurrentCellAndAdvance() { + if (!this.documentManager.activeTextEditor || !this.documentManager.activeTextEditor.document) { + return; +``` + +
+
+ DATASCIENCE.RUN_DELETE_CELLS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.DeleteCells) + public deleteCells() { + const editor = this.documentManager.activeTextEditor; + if (!editor || !editor.selection) { +``` + +
+
+ DATASCIENCE.RUN_EXTEND_SELECTION_BY_CELL_ABOVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + editor.selections = selections; + } + + @captureTelemetry(Telemetry.ExtendSelectionByCellAbove) + public extendSelectionByCellAbove() { + // This behaves similarly to excel "Extend Selection by One Cell Above". + // The direction of the selection matters (i.e. where the active cursor) +``` + +
+
+ DATASCIENCE.RUN_EXTEND_SELECTION_BY_CELL_BELOW + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.ExtendSelectionByCellBelow) + public extendSelectionByCellBelow() { + // This behaves similarly to excel "Extend Selection by One Cell Above". + // The direction of the selection matters (i.e. where the active cursor) +``` + +
+
+ DATASCIENCE.RUN_FILE_INTERACTIVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.RunFileInteractive) + public async runFileInteractive() { + return this.runFileInteractiveInternal(false); + } +``` + + +[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) +```typescript + }; + + // Right now this is the guaranteed list. Might want to expand this. + assertEvent(Telemetry.RunFileInteractive); + assertEvent(Telemetry.ExecuteCellPerceivedWarm); + assertEvent(Telemetry.SwitchKernel); + }); +``` + +
+
+ DATASCIENCE.RUN_FROM_LINE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.RunFromLine) + public async runFromLine(targetLine: number) { + if (this.document && targetLine < this.document.lineCount) { + const iw = await this.getActiveInteractiveWindow(); +``` + +
+
+ DATASCIENCE.RUN_INSERT_CELL_ABOVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.InsertCellAbove) + public insertCellAbove() { + const editor = this.documentManager.activeTextEditor; + if (editor && editor.selection) { +``` + +
+
+ DATASCIENCE.RUN_INSERT_CELL_BELOW + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.InsertCellBelow) + public insertCellBelow() { + const editor = this.documentManager.activeTextEditor; + if (editor && editor.selection) { +``` + +
+
+ DATASCIENCE.RUN_INSERT_CELL_BELOW_POSITION + +## Description + + + + + Cell Edit Commands in Interactive Python + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + ); + } + + @captureTelemetry(Telemetry.InsertCellBelowPosition) + public insertCellBelowPosition() { + const editor = this.documentManager.activeTextEditor; + if (editor && editor.selection) { +``` + +
+
+ DATASCIENCE.RUN_MOVE_CELLS_DOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + await this.moveCellsDirection(true); + } + + @captureTelemetry(Telemetry.MoveCellsDown) + public async moveCellsDown(): Promise { + await this.moveCellsDirection(false); + } +``` + +
+
+ DATASCIENCE.RUN_MOVE_CELLS_UP + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.MoveCellsUp) + public async moveCellsUp(): Promise { + await this.moveCellsDirection(true); + } +``` + +
+
+ DATASCIENCE.RUN_SELECT_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + .then(noop, noop); + } + + @captureTelemetry(Telemetry.SelectCell) + public selectCell() { + const editor = this.documentManager.activeTextEditor; + if (editor && editor.selection) { +``` + +
+
+ DATASCIENCE.RUN_SELECT_CELL_CONTENTS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.SelectCellContents) + public selectCellContents() { + const editor = this.documentManager.activeTextEditor; + if (!editor || !editor.selection) { +``` + +
+
+ DATASCIENCE.RUN_SELECTION_OR_LINE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + await finished; + } + + @captureTelemetry(Telemetry.RunSelectionOrLine) + public async runSelectionOrLine(activeEditor: TextEditor | undefined, text?: string | Uri) { + if (this.document && activeEditor && urlPath.isEqual(activeEditor.document.uri, this.document.uri)) { + const iw = await this.getActiveInteractiveWindow(); +``` + +
+
+ DATASCIENCE.RUN_TO_LINE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.RunToLine) + public async runToLine(targetLine: number) { + if (this.document && targetLine > 0) { + const iw = await this.getActiveInteractiveWindow(); +``` + +
+
+ DATASCIENCE.SAVE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.SCROLLED_TO_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.SELECT_JUPYTER_INTERPRETER_Command + +## Description + + + + + Telemetry sent when user selects an interpreter to start jupyter server. + + @type {(never | undefined)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/interpreter/jupyterInterpreterSelectionCommand.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterSelectionCommand.node.ts) +```typescript + public async activate(): Promise { + this.disposables.push( + this.cmdManager.registerCommand('jupyter.selectJupyterInterpreter', () => { + sendTelemetryEvent(Telemetry.SelectJupyterInterpreterCommand); + this.service.selectInterpreter().ignoreErrors(); + }) + ); +``` + +
+
+ DATASCIENCE.SELECT_JUPYTER_URI + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + @inject(IsWebExtension) private readonly isWebExtension: boolean + ) {} + + @captureTelemetry(Telemetry.SelectJupyterURI) + @traceDecoratorError('Failed to select Jupyter Uri') + public selectJupyterURI( + allowLocal: boolean, +``` + + +[src/kernels/jupyter/launcher/commandLineSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/commandLineSelector.ts) +```typescript + workspaceService.onDidChangeConfiguration(this.onDidChangeConfiguration.bind(this)); + } + + @captureTelemetry(Telemetry.SelectJupyterURI) + public selectJupyterCommandLine(file: Uri): Promise { + const multiStep = this.multiStepFactory.create<{}>(); + return multiStep.run(this.startSelectingCommandLine.bind(this, file), {}); +``` + +
+
+ DATASCIENCE.SELECT_LOCAL_JUPYTER_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) +```typescript + // Else VSC is just setting a kernel for a notebook after it has opened. + if (existingKernel) { + const telemetryEvent = isLocalConnection(this.kernelConnection) + ? Telemetry.SelectLocalJupyterKernel + : Telemetry.SelectRemoteJupyterKernel; + sendKernelTelemetryEvent(document.uri, telemetryEvent); + this.notebookApi.notebookEditors +``` + +
+
+ DATASCIENCE.SELECT_REMOTE_JUPYTER_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) +```typescript + if (existingKernel) { + const telemetryEvent = isLocalConnection(this.kernelConnection) + ? Telemetry.SelectLocalJupyterKernel + : Telemetry.SelectRemoteJupyterKernel; + sendKernelTelemetryEvent(document.uri, telemetryEvent); + this.notebookApi.notebookEditors + .filter((editor) => editor.notebook === document) +``` + +
+
+ DATASCIENCE.SELFCERTSMESSAGECLOSE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/jupyterUtils.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterUtils.ts) +```typescript + await config.updateSetting('allowUnauthorizedRemoteConnection', true, undefined, ConfigurationTarget.Workspace); + return true; + } else if (value === closeOption) { + sendTelemetryEvent(Telemetry.SelfCertsMessageClose); + } + return false; +} +``` + + +[src/kernels/jupyter/jupyterUtils.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterUtils.ts) +```typescript + await config.updateSetting('allowUnauthorizedRemoteConnection', true, undefined, ConfigurationTarget.Workspace); + return true; + } else if (value === closeOption) { + sendTelemetryEvent(Telemetry.SelfCertsMessageClose); + } + return false; +} +``` + + +[src/kernels/errors/kernelErrorHandler.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/errors/kernelErrorHandler.ts) +```typescript + ) + .catch(noop); + } else if (value === closeOption) { + sendTelemetryEvent(Telemetry.SelfCertsMessageClose); + } + }) + .then(noop, noop); +``` + + +[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) +```typescript + ); + return this.requestCreator.getFetchMethod()(url, this.addAllowUnauthorized(url, true, options)); + } else if (value === closeOption) { + sendTelemetryEvent(Telemetry.SelfCertsMessageClose); + } + } + throw e; +``` + +
+
+ DATASCIENCE.SELFCERTSMESSAGEENABLED + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/jupyterUtils.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterUtils.ts) +```typescript + closeOption + ); + if (value === enableOption) { + sendTelemetryEvent(Telemetry.SelfCertsMessageEnabled); + await config.updateSetting('allowUnauthorizedRemoteConnection', true, undefined, ConfigurationTarget.Workspace); + return true; + } else if (value === closeOption) { +``` + + +[src/kernels/jupyter/jupyterUtils.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterUtils.ts) +```typescript + closeOption + ); + if (value === enableOption) { + sendTelemetryEvent(Telemetry.SelfCertsMessageEnabled); + await config.updateSetting('allowUnauthorizedRemoteConnection', true, undefined, ConfigurationTarget.Workspace); + return true; + } else if (value === closeOption) { +``` + + +[src/kernels/errors/kernelErrorHandler.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/errors/kernelErrorHandler.ts) +```typescript + .showErrorMessage(DataScience.jupyterSelfCertFail().format(err.message), enableOption, closeOption) + .then((value) => { + if (value === enableOption) { + sendTelemetryEvent(Telemetry.SelfCertsMessageEnabled); + this.configuration + .updateSetting( + 'allowUnauthorizedRemoteConnection', +``` + + +[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) +```typescript + closeOption + ); + if (value === enableOption) { + sendTelemetryEvent(Telemetry.SelfCertsMessageEnabled); + await this.configService.updateSetting( + 'allowUnauthorizedRemoteConnection', + true, +``` + +
+
+ DATASCIENCE.SET_JUPYTER_URI_LOCAL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + return computeServerId(uri); + } + } + @captureTelemetry(Telemetry.SetJupyterURIToLocal) + public async setJupyterURIToLocal(): Promise { + await this.serverUriStorage.setUriToLocal(); + } +``` + +
+
+ DATASCIENCE.SET_JUPYTER_URI_UI_DISPLAYED + +## Description + + + + + This telemetry tracks the display of the Picker for Jupyter Remote servers. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + allowLocal: boolean, + commandSource: SelectJupyterUriCommandSource = 'nonUser' + ): Promise { + sendTelemetryEvent(Telemetry.SetJupyterURIUIDisplayed, undefined, { + commandSource + }); + const multiStep = this.multiStepFactory.create<{}>(); +``` + +
+
+ DATASCIENCE.SET_JUPYTER_URI_USER_SPECIFIED + +## Description + + +No description provided + +## Properties + +- + azure: boolean; + +## Locations Used + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + await this.serverUriStorage.setUriToRemote(userURI, connection.displayName); + + // Indicate setting a jupyter URI to a remote setting. Check if an azure remote or not + sendTelemetryEvent(Telemetry.SetJupyterURIToUserSpecified, undefined, { + azure: userURI.toLowerCase().includes('azure') + }); + } +``` + +
+
+ DATASCIENCE.SHOW_DATA_EXPLORER + +## Description + + +No description provided + +## Properties + +- rows: number | undefined; +- columns: number | undefined + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) +```typescript + + // Log telemetry about number of rows + try { + sendTelemetryEvent(Telemetry.ShowDataViewer, 0, { + rows: output.rowCount ? output.rowCount : 0, + columns: output.columns ? output.columns.length : 0 + }); +``` + + +[src/webviews/extension-side/dataviewer/dataViewer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewer.ts) +```typescript + + private sendElapsedTimeTelemetry() { + if (this.rowsTimer && this.pendingRowsCount === 0) { + sendTelemetryEvent(Telemetry.ShowDataViewer, this.rowsTimer.elapsedTime); + } + } + +``` + +
+
+ DATASCIENCE.START_SHOW_DATA_EXPLORER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewerFactory.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerFactory.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.StartShowDataViewer) + public async create(dataProvider: IDataViewerDataProvider, title: string): Promise { + let result: IDataViewer | undefined; + +``` + +
+
+ DATASCIENCE.SUBMITCELLFROMREPL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.UNDO + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.USER_DID_NOT_INSTALL_JUPYTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) +```typescript + } + + case DataScience.selectDifferentJupyterInterpreter(): { + sendTelemetryEvent(Telemetry.UserDidNotInstallJupyter); + return JupyterInterpreterDependencyResponse.selectAnotherInterpreter; + } + +``` + + +[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) +```typescript + + case DataScience.pythonInteractiveHelpLink(): { + this.applicationShell.openUrl(HelpLinks.PythonInteractiveHelpLink); + sendTelemetryEvent(Telemetry.UserDidNotInstallJupyter); + return JupyterInterpreterDependencyResponse.cancel; + } + +``` + + +[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) +```typescript + } + + default: + sendTelemetryEvent(Telemetry.UserDidNotInstallJupyter); + return JupyterInterpreterDependencyResponse.cancel; + } + } finally { +``` + +
+
+ DATASCIENCE.USER_DID_NOT_INSTALL_PANDAS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) +```typescript + sendTelemetryEvent(Telemetry.UserInstalledPandas); + } + } else { + sendTelemetryEvent(Telemetry.UserDidNotInstallPandas); + throw new Error(DataScience.pandasRequiredForViewing()); + } + } +``` + +
+
+ DATASCIENCE.USER_INSTALLED_JUPYTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) +```typescript + return JupyterInterpreterDependencyResponse.cancel; + } + } + sendTelemetryEvent(Telemetry.UserInstalledJupyter); + + // Check if kernelspec module is something that accessible. + return this.checkKernelSpecAvailability(interpreter); +``` + +
+
+ DATASCIENCE.USER_INSTALLED_MODULE + +## Description + + + + + Telemetry event sent when installing a jupyter dependency + + @type {product: string} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.USER_INSTALLED_PANDAS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) +```typescript + cancellationPromise + ]); + if (response === InstallerResponse.Installed) { + sendTelemetryEvent(Telemetry.UserInstalledPandas); + } + } else { + sendTelemetryEvent(Telemetry.UserDidNotInstallPandas); +``` + +
+
+ DATASCIENCE.USER_STARTUP_CODE_FAILURE + +## Description + + +No description provided + +## Properties + +- + ename: string; +- + evalue: string; + +## Locations Used + +[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) +```typescript + await this.executeSilently(session, this.getUserStartupCommands(), { + traceErrors: true, + traceErrorsMessage: 'Error executing user defined startup code', + telemetryName: Telemetry.UserStartupCodeFailure + }); + } + +``` + +
+
+ DATASCIENCE.VARIABLE_EXPLORER_TOGGLE + +## Description + + +No description provided + +## Properties + +- open: boolean; +- runByLine: boolean + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.VSCODE_NATIVE.CHANGE_TO_CODE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.VSCODE_NATIVE.CHANGE_TO_MARKDOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.VSCODE_NATIVE.DELETE_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.VSCODE_NATIVE.INSERT_CELL + +## Description + + + + Native notebooks events + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DATASCIENCE.VSCODE_NATIVE.MOVE_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.ACTIVE_INTERPRETER_LISTING_PERF + +## Description + + +No description provided + +## Properties + +- + /** + * Whether this is the first time in the session. + * (fetching kernels first time in the session is slower, later its cached). + * This is a generic property supported for all telemetry (sent by decorators). + */ + firstTime?: boolean; + +## Locations Used + +[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) +```typescript + } + } + private workspaceCachedActiveInterpreter = new Map>(); + @captureTelemetry(Telemetry.ActiveInterpreterListingPerf) + @traceDecoratorVerbose('Get Active Interpreter', TraceOptions.Arguments | TraceOptions.BeforeCall) + public getActiveInterpreter(resource?: Uri): Promise { + this.hookupOnDidChangeInterpreterEvent(); +``` + +
+
+ DS_INTERNAL.ASK_USER_FOR_NEW_KERNEL_JUPYTER + +## Description + + + + + Sent when a jupyter session fails to start and we ask the user for a new kernel + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.CELL_COUNT + +## Description + + +No description provided + +## Properties + +- count: number + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.CODE_LENS_ACQ_TIME + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/editor-integration/codelensprovider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codelensprovider.ts) +```typescript + // On shutdown send how long on average we spent parsing code lens + if (this.totalGetCodeLensCalls > 0) { + sendTelemetryEvent( + Telemetry.CodeLensAverageAcquisitionTime, + this.totalExecutionTimeInMs / this.totalGetCodeLensCalls + ); + } +``` + +
+
+ DS_INTERNAL.COMMAND_EXECUTED + +## Description + + + + + Telemetry sent when a command is executed. + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/common/application/commandManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/application/commandManager.ts) +```typescript + return commands.registerCommand( + command, + (...args: U) => { + sendTelemetryEvent(Telemetry.CommandExecuted, undefined, { command: command as string }); + if (thisArg) { + return callback.call(thisArg, ...(args as any)); + } else { +``` + + +[src/platform/common/application/commandManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/application/commandManager.ts) +```typescript + return commands.registerTextEditorCommand( + command, + (textEditor: TextEditor, edit: TextEditorEdit, ...args: any[]) => { + sendTelemetryEvent(Telemetry.CommandExecuted, undefined, { command: command as string }); + if (thisArg) { + return callback.call(thisArg, textEditor, edit, ...args); + } else { +``` + + +[src/platform/common/application/commandManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/application/commandManager.ts) +```typescript + U extends ICommandNameArgumentTypeMapping[E] + >(command: E, ...rest: U): Thenable { + if (!commandsToIgnore.has(command)) { + sendTelemetryEvent(Telemetry.CommandExecuted, undefined, { command: command as string }); + } + return commands.executeCommand(command, ...rest); + } +``` + +
+
+ DS_INTERNAL.COMPLETION_TIME_FROM_JUPYTER + +## Description + + + + + Telemetry event sent to capture total time taken for completions list to be provided by Jupyter. + This is used to compare against time taken by LS. + + @type {(undefined | never)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.COMPLETION_TIME_FROM_LS + +## Description + + + + + Telemetry event sent to capture total time taken for completions list to be provided by LS. + This is used to compare against time taken by Jupyter. + + @type {(undefined | never)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.CONNECTFAILEDJUPYTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) +```typescript + throw new RemoteJupyterServerConnectionError(connection.baseUrl, options.serverId, err); + } + } else { + sendTelemetryEvent(Telemetry.ConnectFailedJupyter, undefined, undefined, err, true); + throw new LocalJupyterServerConnectionError(err); + } + } else { +``` + +
+
+ DS_INTERNAL.CONNECTLOCALJUPYTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) +```typescript + traceInfo(`Connection complete server`); + + sendTelemetryEvent( + options.localJupyter ? Telemetry.ConnectLocalJupyter : Telemetry.ConnectRemoteJupyter + ); + return result; + } catch (err) { +``` + +
+
+ DS_INTERNAL.CONNECTREMOTEEXPIREDCERTFAILEDJUPYTER + +## Description + + + + + Jupyter server's certificate has expired. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) +```typescript + sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); + throw new JupyterSelfCertsError(connection.baseUrl); + } else if (JupyterSelfCertsExpiredError.isSelfCertsExpiredError(err)) { + sendTelemetryEvent(Telemetry.ConnectRemoteExpiredCertFailedJupyter); + throw new JupyterSelfCertsExpiredError(connection.baseUrl); + } else { + throw new RemoteJupyterServerConnectionError(connection.baseUrl, options.serverId, err); +``` + +
+
+ DS_INTERNAL.CONNECTREMOTEFAILEDJUPYTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) +```typescript + + // Something else went wrong + if (!options.localJupyter) { + sendTelemetryEvent(Telemetry.ConnectRemoteFailedJupyter, undefined, undefined, err, true); + + // Check for the self signed certs error specifically + if (JupyterSelfCertsError.isSelfCertsError(err)) { +``` + +
+
+ DS_INTERNAL.CONNECTREMOTEJUPYTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) +```typescript + traceInfo(`Connection complete server`); + + sendTelemetryEvent( + options.localJupyter ? Telemetry.ConnectLocalJupyter : Telemetry.ConnectRemoteJupyter + ); + return result; + } catch (err) { +``` + +
+
+ DS_INTERNAL.CONNECTREMOTEJUPYTER_VIA_LOCALHOST + +## Description + + + + + Connecting to an existing Jupyter server, but connecting to localhost. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) +```typescript + connection = await this.startOrConnect(options, cancelToken); + + if (!connection.localLaunch && LocalHosts.includes(connection.hostName.toLowerCase())) { + sendTelemetryEvent(Telemetry.ConnectRemoteJupyterViaLocalHost); + } + // eslint-disable-next-line no-constant-condition + traceInfo(`Connecting to process server`); +``` + +
+
+ DS_INTERNAL.CONNECTREMOTESELFCERTFAILEDJUPYTER + +## Description + + + + + Jupyter server's certificate is not from a trusted authority. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + } + } catch (err) { + if (JupyterSelfCertsError.isSelfCertsError(err)) { + sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); + const handled = await handleSelfCertsError(this.applicationShell, this.configService, err.message); + if (!handled) { + return; +``` + + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + return; + } + } else if (JupyterSelfCertsExpiredError.isSelfCertsExpiredError(err)) { + sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); + const handled = await handleExpiredCertsError(this.applicationShell, this.configService, err.message); + if (!handled) { + return; +``` + + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + } catch (err) { + traceWarning('Uri verification error', err); + if (JupyterSelfCertsError.isSelfCertsError(err)) { + sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); + const handled = await handleSelfCertsError(this.applicationShell, this.configService, err.message); + if (!handled) { + return DataScience.jupyterSelfCertFailErrorMessageOnly(); +``` + + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + return DataScience.jupyterSelfCertFailErrorMessageOnly(); + } + } else if (JupyterSelfCertsExpiredError.isSelfCertsExpiredError(err)) { + sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); + const handled = await handleExpiredCertsError(this.applicationShell, this.configService, err.message); + if (!handled) { + return DataScience.jupyterSelfCertExpiredErrorMessageOnly(); +``` + + +[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) +```typescript + + // Check for the self signed certs error specifically + if (JupyterSelfCertsError.isSelfCertsError(err)) { + sendTelemetryEvent(Telemetry.ConnectRemoteSelfCertFailedJupyter); + throw new JupyterSelfCertsError(connection.baseUrl); + } else if (JupyterSelfCertsExpiredError.isSelfCertsExpiredError(err)) { + sendTelemetryEvent(Telemetry.ConnectRemoteExpiredCertFailedJupyter); +``` + +
+
+ DS_INTERNAL.ERROR_START_RAWKERNEL_WITHOUT_INTERPRETER + +## Description + + + + Whether we've attempted to start a raw Python kernel without any interpreter information. + If we don't detect such telemetry in a few months, then we can remove this along with the temporary code associated with this telemetry. + +## Properties + +- + /** + * Indicates whether the python extension is installed. + * If we send telemetry fro this & this is `true`, then we have a bug. + * If its `false`, then we can ignore this telemetry. + */ + pythonExtensionInstalled: boolean; + +## Locations Used + +[src/kernels/raw/session/hostRawNotebookProvider.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/hostRawNotebookProvider.node.ts) +```typescript + kernelConnection.kind === 'startUsingLocalKernelSpec' + ) { + if (!kernelConnection.interpreter) { + sendTelemetryEvent(Telemetry.AttemptedToLaunchRawKernelWithoutInterpreter, undefined, { + pythonExtensionInstalled: this.extensionChecker.isPythonExtensionInstalled + }); + } +``` + +
+
+ DS_INTERNAL.EXECUTE_CELL_PERCEIVED_COLD + +## Description + + + + + Telemetry sent to capture first time execution of a cell. + If `notebook = true`, this its telemetry for native editor/notebooks. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/execution/cellExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/cellExecution.ts) +```typescript + const props = { notebook: true }; + if (!CellExecution.sentExecuteCellTelemetry) { + CellExecution.sentExecuteCellTelemetry = true; + sendTelemetryEvent(Telemetry.ExecuteCellPerceivedCold, this.stopWatchForTelemetry.elapsedTime, props); + } else { + sendTelemetryEvent(Telemetry.ExecuteCellPerceivedWarm, this.stopWatchForTelemetry.elapsedTime, props); + } +``` + + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + if (runningStopWatch) { + if (!CodeWatcher.sentExecuteCellTelemetry) { + CodeWatcher.sentExecuteCellTelemetry = true; + sendTelemetryEvent(Telemetry.ExecuteCellPerceivedCold, runningStopWatch.elapsedTime); + } else { + sendTelemetryEvent(Telemetry.ExecuteCellPerceivedWarm, runningStopWatch.elapsedTime); + } +``` + +
+
+ DS_INTERNAL.EXECUTE_CELL_PERCEIVED_WARM + +## Description + + + + + Telemetry sent to capture subsequent execution of a cell. + If `notebook = true`, this its telemetry for native editor/notebooks. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/execution/cellExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/cellExecution.ts) +```typescript + CellExecution.sentExecuteCellTelemetry = true; + sendTelemetryEvent(Telemetry.ExecuteCellPerceivedCold, this.stopWatchForTelemetry.elapsedTime, props); + } else { + sendTelemetryEvent(Telemetry.ExecuteCellPerceivedWarm, this.stopWatchForTelemetry.elapsedTime, props); + } + } + private canExecuteCell() { +``` + + +[src/interactive-window/editor-integration/codewatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/codewatcher.ts) +```typescript + CodeWatcher.sentExecuteCellTelemetry = true; + sendTelemetryEvent(Telemetry.ExecuteCellPerceivedCold, runningStopWatch.elapsedTime); + } else { + sendTelemetryEvent(Telemetry.ExecuteCellPerceivedWarm, runningStopWatch.elapsedTime); + } + } + } +``` + + +[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) +```typescript + + // Right now this is the guaranteed list. Might want to expand this. + assertEvent(Telemetry.RunFileInteractive); + assertEvent(Telemetry.ExecuteCellPerceivedWarm); + assertEvent(Telemetry.SwitchKernel); + }); +}); +``` + +
+
+ DS_INTERNAL.FAILED_TO_UPDATE_JUPYTER_KERNEL_SPEC + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/jupyterKernelService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterKernelService.node.ts) +```typescript + await this.fs.writeLocalFile(kernelSpecFilePath.fsPath, JSON.stringify(contents, undefined, 4)); + } catch (ex) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sendTelemetryEvent(Telemetry.FailedToUpdateKernelSpec, undefined, undefined, ex as any, true); + throw ex; + } + if (cancelToken.isCancellationRequested) { +``` + + +[src/kernels/jupyter/jupyterKernelService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterKernelService.node.ts) +```typescript + await this.fs.writeLocalFile(kernelSpecFilePath, JSON.stringify(specModel, undefined, 2)); + } catch (ex) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sendTelemetryEvent(Telemetry.FailedToUpdateKernelSpec, undefined, undefined, ex as any, true); + throw ex; + } + } +``` + +
+
+ DS_INTERNAL.FIND_JUPYTER_COMMAND + +## Description + + +No description provided + +## Properties + +- command: string + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.FIND_JUPYTER_KERNEL_SPEC + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.FIND_KERNEL_FOR_LOCAL_CONNECTION + +## Description + + + + + Telemetry event sent once done searching for kernel spec and interpreter for a local connection. + + @type {{ + kernelSpecFound: boolean; + interpreterFound: boolean; + }} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.GET_ACTIVATED_ENV_VARIABLES + +## Description + + + + + Used to capture time taken to get enviornment variables for a python environment. + Also lets us know whether it worked or not. + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) +```typescript + ]); + + const envType = interpreter.envType; + sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { + envType, + pythonEnvType: envType, + source: 'python', +``` + + +[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) +```typescript + interpreter?.uri + )}, shell cannot be determined.` + ); + sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, 0, { + envType, + pythonEnvType: envType, + source: 'jupyter', +``` + + +[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) +```typescript + const stopWatch = new StopWatch(); + try { + const env = await this.getCondaEnvVariables(resource, interpreter); + sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { + envType, + pythonEnvType: envType, + source: 'jupyter', +``` + + +[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) +```typescript + }); + return env; + } catch (ex) { + sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { + envType, + pythonEnvType: envType, + source: 'jupyter', +``` + + +[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) +```typescript + const processService = await processServicePromise; + const hasCustomEnvVars = Object.keys(customEnvVars).length; + if (!activationCommands || activationCommands.length === 0) { + sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { + envType, + pythonEnvType: envType, + source: 'jupyter', +``` + + +[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) +```typescript + } else if (returnedEnv) { + delete returnedEnv[PYTHON_WARNINGS]; + } + sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { + envType, + pythonEnvType: envType, + source: 'jupyter', +``` + + +[src/platform/common/process/environmentActivationService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/environmentActivationService.node.ts) +```typescript + + return returnedEnv; + } catch (e) { + sendTelemetryEvent(Telemetry.GetActivatedEnvironmentVariables, stopWatch.elapsedTime, { + envType, + pythonEnvType: envType, + source: 'jupyter', +``` + +
+
+ DS_INTERNAL.GET_PASSWORD_FAILURE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) +```typescript + const requestHeaders = { Cookie: cookieString, 'X-XSRFToken': xsrfCookie }; + return { requestHeaders }; + } else { + sendTelemetryEvent(Telemetry.GetPasswordFailure); + return undefined; + } + } +``` + +
+
+ DS_INTERNAL.GET_PASSWORD_SUCCESS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterPasswordConnect.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterPasswordConnect.ts) +```typescript + + // If we found everything return it all back if not, undefined as partial is useless + if (xsrfCookie && sessionCookieName && sessionCookieValue) { + sendTelemetryEvent(Telemetry.GetPasswordSuccess); + const cookieString = this.getSessionCookieString(xsrfCookie, sessionCookieName, sessionCookieValue); + const requestHeaders = { Cookie: cookieString, 'X-XSRFToken': xsrfCookie }; + return { requestHeaders }; +``` + +
+
+ DS_INTERNAL.GET_PREFERRED_KERNEL_PERF + +## Description + + + + + Total time taken to get the preferred kernel for notebook. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.HASHED_NOTEBOOK_OUTPUT_MIME_TYPE_PERF + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.HASHED_OUTPUT_MIME_TYPE + +## Description + + +No description provided + +## Properties + +- + /** + * Hash of the cell output mimetype + * + * @type {string} + */ + hashedName: string; +- + hasText: boolean; +- + hasLatex: boolean; +- + hasHtml: boolean; +- + hasSvg: boolean; +- + hasXml: boolean; +- + hasJson: boolean; +- + hasImage: boolean; +- + hasGeo: boolean; +- + hasPlotly: boolean; +- + hasVega: boolean; +- + hasWidget: boolean; +- + hasJupyter: boolean; +- + hasVnd: boolean; + +## Locations Used + +[src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts) +```typescript + hasJupyter: lowerMimeType.includes('jupyter'), + hasVnd: lowerMimeType.includes('vnd') + }; + sendTelemetryEvent(Telemetry.HashedCellOutputMimeType, undefined, props); + } +} + +``` + +
+
+ DS_INTERNAL.HASHED_OUTPUT_MIME_TYPE_PERF + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts) +```typescript + this.pendingChecks.set(id, setTimeout(check, 5000)); + } + + @captureTelemetry(Telemetry.HashedCellOutputMimeTypePerf) + private checkCell(cell: NotebookCell) { + this.pendingChecks.delete(cell.document.uri.toString()); + this.getCellOutputMimeTypes(cell).forEach(this.sendTelemetry.bind(this)); +``` + +
+
+ DS_INTERNAL.HIDDEN_EXECUTION_TIME + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.INTERACTIVE_FILE_TOOLTIPS_PERF + +## Description + + + + Capture telemetry re: how long returning a tooltip takes + +## Properties + +- + // Result is null if user signalled cancellation or if we timed out + isResultNull: boolean; + +## Locations Used + +[src/interactive-window/editor-integration/hoverProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/editor-integration/hoverProvider.ts) +```typescript + const timeoutHandler = sleep(300).then(() => undefined); + this.stopWatch.reset(); + const result = await Promise.race([timeoutHandler, this.getVariableHover(document, position, token)]); + sendTelemetryEvent(Telemetry.InteractiveFileTooltipsPerf, this.stopWatch.elapsedTime, { + isResultNull: !!result + }); + return result; +``` + +
+
+ DS_INTERNAL.INTERPRETER_LISTING_PERF + +## Description + + + + + Time taken to list the Python interpreters. + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) +```typescript + return this.didChangeInterpreters.event; + } + + @captureTelemetry(Telemetry.InterpreterListingPerf) + @traceDecoratorVerbose('Get Interpreters', TraceOptions.Arguments | TraceOptions.BeforeCall) + public getInterpreters(resource?: Uri): Promise { + this.hookupOnDidChangeInterpreterEvent(); +``` + +
+
+ DS_INTERNAL.INTERRUPT_JUPYTER_TIME + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) +```typescript + return newCellExecutionQueue; + } + @captureTelemetry(Telemetry.Interrupt) + @captureTelemetry(Telemetry.InterruptJupyterTime) + private async interruptExecution( + session: IJupyterSession, + pendingCells: Promise +``` + +
+
+ DS_INTERNAL.INVALID_KERNEL_USED + +## Description + + + + + Telemetry event sent when a kernel picked crashes on startup + @type {(undefined | never)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/errors/jupyterInvalidKernelError.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/errors/jupyterInvalidKernelError.ts) +```typescript + DataScience.kernelInvalid().format(getDisplayNameOrNameOfKernelConnection(kernelConnectionMetadata)), + kernelConnectionMetadata + ); + sendTelemetryEvent(Telemetry.KernelInvalid); + } +} + +``` + +
+
+ DS_INTERNAL.IPYWIDGET_DISCOVER_WIDGETS_NB_EXTENSIONS + +## Description + + + + + Total time taken to discover all IPyWidgets. + This is how long it takes to discover all widgets on disc (from python environment). + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) +```typescript + delete config['@jupyter-widgets/controls']; + delete config['@jupyter-widgets/output']; + } + sendTelemetryEvent(Telemetry.DiscoverIPyWidgetNamesPerf, stopWatch.elapsedTime, { + type: isLocalConnection(this.kernel.kernelConnectionMetadata) ? 'local' : 'remote' + }); + return config && Object.keys(config).length ? config : undefined; +``` + +
+
+ DS_INTERNAL.IPYWIDGET_DISCOVERED + +## Description + + + + + Telemetry event sent with name of a Widget found. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.IPYWIDGET_DISCOVERY_ERRORED + +## Description + + + + + Something went wrong in looking for a widget. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/ipyWidgetScriptSource.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetScriptSource.ts) +```typescript + } + } catch (ex) { + traceError('Failed to get widget source due to an error', ex); + sendTelemetryEvent(Telemetry.HashedIPyWidgetScriptDiscoveryError); + } finally { + traceInfo( + `${ConsoleForegroundColors.Green}Script for ${moduleName}, is ${widgetSource.scriptUri} from ${widgetSource.source}` +``` + +
+
+ DS_INTERNAL.IPYWIDGET_EXTENSIONJS_INFO + +## Description + + + + + Telemetry event sent once we've successfully or unsuccessfully parsed the extension.js file in the widget folder. + E.g. if we have a widget named ipyvolume, we attempt to parse the nbextensions/ipyvolume/extension.js file to get some info out of it. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) +```typescript + } + + if (indexOfRequireConfig < 0) { + sendTelemetryEvent(Telemetry.IPyWidgetExtensionJsInfo, undefined, { + widgetFolderNameHash, + failed: true, + patternUsedToRegisterRequireConfig, +``` + + +[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) +```typescript + // Find the end bracket for the require config call. + const endBracket = contents.indexOf(')', indexOfRequireConfig); + if (endBracket <= 0 || !patternUsedToRegisterRequireConfig) { + sendTelemetryEvent(Telemetry.IPyWidgetExtensionJsInfo, undefined, { + widgetFolderNameHash, + failed: true, + patternUsedToRegisterRequireConfig, +``` + + +[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) +```typescript + }); + + if (!requireConfig || !Object.keys(requireConfig).length) { + sendTelemetryEvent(Telemetry.IPyWidgetExtensionJsInfo, undefined, { + widgetFolderNameHash, + failed: true, + patternUsedToRegisterRequireConfig, +``` + + +[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts) +```typescript + }); + return; + } + sendTelemetryEvent(Telemetry.IPyWidgetExtensionJsInfo, undefined, { + widgetFolderNameHash, + patternUsedToRegisterRequireConfig, + requireEntryPointCount: Object.keys(requireConfig).length +``` + +
+
+ DS_INTERNAL.IPYWIDGET_LOAD_DISABLED + +## Description + + + + + Telemetry event sent when an loading of 3rd party ipywidget JS scripts from 3rd party source has been disabled. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.IPYWIDGET_LOAD_FAILURE + +## Description + + + + + Telemetry event sent when an ipywidget module fails to load. Module name is hashed. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) +```typescript + } + traceError(`Widget load failure ${errorMessage}`, payload); + + sendTelemetryEvent(Telemetry.IPyWidgetLoadFailure, 0, { + isOnline: payload.isOnline, + moduleHash: getTelemetrySafeHashedString(payload.moduleName), + moduleVersion: payload.moduleVersion, +``` + +
+
+ DS_INTERNAL.IPYWIDGET_LOAD_SUCCESS + +## Description + + + + + Telemetry event sent when an ipywidget module loads. Module name is hashed. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) +```typescript + + private sendLoadSucceededTelemetry(payload: LoadIPyWidgetClassLoadAction) { + try { + sendTelemetryEvent(Telemetry.IPyWidgetLoadSuccess, 0, { + moduleHash: getTelemetrySafeHashedString(payload.moduleName), + moduleVersion: payload.moduleVersion + }); +``` + +
+
+ DS_INTERNAL.IPYWIDGET_OVERHEAD + +## Description + + + + + Telemetry event sent to indicate the overhead of syncing the kernel with the UI. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/ipyWidgetMessageDispatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetMessageDispatcher.ts) +```typescript + } + + private sendOverheadTelemetry() { + sendTelemetryEvent(Telemetry.IPyWidgetOverhead, 0, { + totalOverheadInMs: this.totalWaitTime, + numberOfMessagesWaitedOn: this.totalWaitedMessages, + averageWaitTime: this.totalWaitTime / this.totalWaitedMessages, +``` + +
+
+ DS_INTERNAL.IPYWIDGET_PROMPT_TO_USE_CDN + +## Description + + + + + Telemetry sent when we prompt user to use a CDN for IPyWidget scripts. + This is always sent when we display a prompt. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts) +```typescript + return this.configurationPromise.promise; + } + this.configurationPromise = createDeferred(); + sendTelemetryEvent(Telemetry.IPyWidgetPromptToUseCDN); + const selection = await this.appShell.showInformationMessage( + DataScience.useCDNForWidgetsNoInformation(), + { modal: true }, +``` + +
+
+ DS_INTERNAL.IPYWIDGET_PROMPT_TO_USE_CDN_SELECTION + +## Description + + + + + Telemetry sent when user does something with the prompt displayed to user about using CDN for IPyWidget scripts. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts) +```typescript + break; + } + + sendTelemetryEvent(Telemetry.IPyWidgetPromptToUseCDNSelection, undefined, { selection: selectionForTelemetry }); + this.configurationPromise.resolve(); + } + private async updateScriptSources(scriptSources: WidgetCDNs[]) { +``` + +
+
+ DS_INTERNAL.IPYWIDGET_RENDER_FAILURE + +## Description + + + + + Telemetry event sent when the widget render function fails (note, this may not be sufficient to capture all failures). + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) +```typescript + private sendRenderFailureTelemetry(payload: Error) { + try { + traceError('Error rendering a widget: ', payload); + sendTelemetryEvent(Telemetry.IPyWidgetRenderFailure); + } catch { + // Do nothing on a failure + } +``` + +
+
+ DS_INTERNAL.IPYWIDGET_TEST_AVAILABILITY_ON_CDN + +## Description + + + + + Total time taken to discover a widget script on CDN. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.IPYWIDGET_TIME_TO_COPY_NBEXTENSIONS_DIR + +## Description + + + + + Total time take to copy the nb extensions folder. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts) +```typescript + LocalIPyWidgetScriptManager.nbExtensionsCopiedKernelConnectionList.add( + this.kernel.kernelConnectionMetadata.id + ); + sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, stopWatch.elapsedTime); + return baseUrl; + } catch (ex) { + sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, undefined, undefined, ex); +``` + + +[src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts) +```typescript + sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, stopWatch.elapsedTime); + return baseUrl; + } catch (ex) { + sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, undefined, undefined, ex); + throw ex; + } + } +``` + +
+
+ DS_INTERNAL.IPYWIDGET_UNHANDLED_MESSAGE + +## Description + + + + + Telemetry event sent when the widget tries to send a kernel message but nothing was listening + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) +```typescript + this.jupyterOutput.appendLine( + DataScience.unhandledMessage().format(msg.header.msg_type, JSON.stringify(msg.content)) + ); + sendTelemetryEvent(Telemetry.IPyWidgetUnhandledMessage, undefined, { msg_type: msg.header.msg_type }); + } catch { + // Don't care if this doesn't get logged + } +``` + +
+
+ DS_INTERNAL.IPYWIDGET_USED_BY_USER + +## Description + + + + + Telemetry event sent with name of a Widget that is used. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts) +```typescript + } + } + + sendTelemetryEvent(Telemetry.HashedIPyWidgetNameUsed, undefined, { + hashedName: getTelemetrySafeHashedString(found.moduleName), + source: found.source, + cdnSearched: this.configuredScriptSources.length > 0 +``` + +
+
+ DS_INTERNAL.IPYWIDGET_WIDGET_VERSION_NOT_SUPPORTED_LOAD_FAILURE + +## Description + + + + + Telemetry event sent when an ipywidget version that is not supported is used & we have trapped this and warned the user abou it. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts) +```typescript + } + private sendUnsupportedWidgetVersionFailureTelemetry(payload: NotifyIPyWidgetWidgetVersionNotSupportedAction) { + try { + sendTelemetryEvent(Telemetry.IPyWidgetWidgetVersionNotSupportedLoadFailure, 0, { + moduleHash: getTelemetrySafeHashedString(payload.moduleName), + moduleVersion: payload.moduleVersion + }); +``` + +
+
+ DS_INTERNAL.JUPYTER_CREATING_NOTEBOOK + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/liveshare/hostJupyterServer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/liveshare/hostJupyterServer.ts) +```typescript + this.throwIfDisposedOrCancelled(cancelToken); + const baseUrl = this.connection?.baseUrl || ''; + this.logRemoteOutput(DataScience.createdNewNotebook().format(baseUrl)); + sendKernelTelemetryEvent(resource, Telemetry.JupyterCreatingNotebook, stopWatch.elapsedTime); + return session; + } catch (ex) { + sendKernelTelemetryEvent( +``` + + +[src/kernels/jupyter/launcher/liveshare/hostJupyterServer.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/liveshare/hostJupyterServer.ts) +```typescript + } catch (ex) { + sendKernelTelemetryEvent( + resource, + Telemetry.JupyterCreatingNotebook, + stopWatch.elapsedTime, + undefined, + // eslint-disable-next-line @typescript-eslint/no-explicit-any +``` + +
+
+ DS_INTERNAL.JUPYTER_CUSTOM_COMMAND_LINE + +## Description + + + + + Telemetry event sent to when user customizes the jupyter command line + @type {(undefined | never)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/commandLineSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/commandLineSelector.ts) +```typescript + + private async setJupyterCommandLine(val: string): Promise { + if (val) { + sendTelemetryEvent(Telemetry.JupyterCommandLineNonDefault); + } + const split = parseArgsStringToArgv(val); + await this.configuration.updateSetting( +``` + +
+
+ DS_INTERNAL.JUPYTER_IDLE_TIMEOUT + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/errors/jupyterWaitForIdleError.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/errors/jupyterWaitForIdleError.ts) +```typescript +export class JupyterWaitForIdleError extends BaseKernelError { + constructor(kernelConnectionMetadata: KernelConnectionMetadata) { + super('timeout', DataScience.jupyterLaunchTimedOut(), kernelConnectionMetadata); + sendTelemetryEvent(Telemetry.SessionIdleTimeout); + } +} + +``` + +
+
+ DS_INTERNAL.JUPYTER_INSTALL_FAILED + +## Description + + + + + Telemetry event sent if there's an error installing a jupyter required dependency + + @type { product: string } + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.JUPYTER_INTALLED_BUT_NO_KERNELSPEC_MODULE + +## Description + + + + + Telemetry event sent when jupyter has been found in interpreter but we cannot find kernelspec. + + @type {(never | undefined)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) +```typescript + return JupyterInterpreterDependencyResponse.ok; + } + // Indicate no kernel spec module. + sendTelemetryEvent(Telemetry.JupyterInstalledButNotKernelSpecModule); + if (Cancellation.isCanceled(token)) { + return JupyterInterpreterDependencyResponse.cancel; + } +``` + +
+
+ DS_INTERNAL.JUPYTER_REGISTER_INTERPRETER_AS_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/jupyterKernelService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterKernelService.node.ts) +```typescript + */ + // eslint-disable-next-line + // eslint-disable-next-line complexity + @captureTelemetry(Telemetry.RegisterInterpreterAsKernel, undefined, true) + @traceDecoratorError('Failed to register an interpreter as a kernel') + // eslint-disable-next-line + private async registerKernel( +``` + +
+
+ DS_INTERNAL.JUPYTER_START_TIMEOUT + +## Description + + +No description provided + +## Properties + +- + /** + * Total time spent in attempting to start and connect to jupyter before giving up. + * + * @type {number} + */ + timeout: number; + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.JUPYTERSTARTUPCOST + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/jupyterExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/jupyterExecution.ts) +```typescript + } + + // eslint-disable-next-line + @captureTelemetry(Telemetry.StartJupyter) + private async startNotebookServer( + resource: Resource, + useDefaultConfig: boolean, +``` + +
+
+ DS_INTERNAL.KERNEL_COUNT + +## Description + + + + Misc + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/telemetry/kernelTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/telemetry/kernelTelemetry.ts) +```typescript + }); + trackKernelResourceInformation(resource, counters); + if (stopWatch) { + sendKernelTelemetryEvent(resource, Telemetry.KernelCount, stopWatch.elapsedTime, counters); + } +} + +``` + +
+
+ DS_INTERNAL.KERNEL_ENUMERATION + +## Description + + + + + Telemetry event sent to every time a kernel enumeration is done + + @type {...} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.KERNEL_LAUNCHER_PERF + +## Description + + + + + Total time taken to Launch a raw kernel. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/launcher/kernelLauncher.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/launcher/kernelLauncher.node.ts) +```typescript + // Should be available now, wait with a timeout + return await this.launchProcess(kernelConnectionMetadata, resource, workingDirectory, timeout, cancelToken); + })(); + sendKernelTelemetryWhenDone(resource, Telemetry.KernelLauncherPerf, promise); + return promise; + } + +``` + +
+
+ DS_INTERNAL.KERNEL_LISTING_PERF + +## Description + + +No description provided + +## Properties + +- + /** + * Whether this is the first time in the session. + * (fetching kernels first time in the session is slower, later its cached). + * This is a generic property supported for all telemetry (sent by decorators). + */ + firstTime?: boolean; +- + /** + * Whether this telemetry is for listing of all kernels or just python or just non-python. + * (fetching kernels first time in the session is slower, later its cached). + */ + kind: 'remote' | 'local' | 'localKernelSpec' | 'localPython'; + +## Locations Used + +[src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts) +```typescript + /** + * @param {boolean} includePythonKernels Include/exclude Python kernels in the result. + */ + @captureTelemetry(Telemetry.KernelListingPerf, { kind: 'localKernelSpec' }) + public async listKernelSpecs( + includePythonKernels: boolean, + cancelToken?: CancellationToken +``` + + +[src/kernels/raw/finder/localPythonAndRelatedNonPythonKernelSpecFinder.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/finder/localPythonAndRelatedNonPythonKernelSpecFinder.node.ts) +```typescript + ) { + super(fs, workspaceService, extensionChecker, globalState); + } + @captureTelemetry(Telemetry.KernelListingPerf, { kind: 'localPython' }) + public async listKernelSpecs(resource: Resource, ignoreCache?: boolean, cancelToken?: CancellationToken) { + // Get an id for the workspace folder, if we don't have one, use the fsPath of the resource + const workspaceFolderId = +``` + + +[src/kernels/raw/finder/localKernelFinder.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/finder/localKernelFinder.node.ts) +```typescript + * Search all our local file system locations for installed kernel specs and return them + */ + @traceDecoratorError('List kernels failed') + @captureTelemetry(Telemetry.KernelListingPerf, { kind: 'local' }) + public async listKernels( + resource: Resource, + @ignoreLogging() cancelToken?: CancellationToken +``` + + +[src/kernels/jupyter/remoteKernelFinder.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/remoteKernelFinder.ts) +```typescript + ) {} + + // Talk to the remote server to determine sessions + @captureTelemetry(Telemetry.KernelListingPerf, { kind: 'remote' }) + public async listKernels( + _resource: Resource, + connInfo: INotebookProviderConnection, +``` + +
+
+ DS_INTERNAL.KERNEL_NOT_INSTALLED + +## Description + + +No description provided + +## Properties + +- + action: 'displayed'; +- // Message displayed. + /** + * Language found in the notebook if a known language. Otherwise 'unknown' + */ + language: string; + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.KERNEL_PROVIDER_PERF + +## Description + + + + + Total time taken to list kernels for VS Code. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.KERNEL_REGISTER_FAILED + +## Description + + + + + Telemetry event sent to indicate registering a kernel with jupyter failed. + + @type {(undefined | never)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.KERNEL_SPEC_NOT_FOUND + +## Description + + + + + Telemetry event sent to indicate 'jupyter kernelspec' is not possible. + + @type {(undefined | never)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) +```typescript + .then(() => true) + .catch((e) => { + traceError(`Kernel spec not found: `, e); + sendTelemetryEvent(Telemetry.KernelSpecNotFound); + return false; + }); + } +``` + +
+
+ DS_INTERNAL.LOCAL_KERNEL_SPEC_COUNT + +## Description + + +No description provided + +## Properties + +- + /** + * Number of kernel specs. + */ + count: number; + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.NATIVE_VARIABLE_VIEW_LOADED + +## Description + + + + Native variable view events + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/variablesView/variableView.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/variablesView/variableView.ts) +```typescript + this.dataViewerChecker = new DataViewerChecker(configuration, appShell); + } + + @captureTelemetry(Telemetry.NativeVariableViewLoaded) + public async load(codeWebview: vscodeWebviewView) { + await super.loadWebview(Uri.file(process.cwd()), codeWebview).catch(traceError); + +``` + +
+
+ DS_INTERNAL.NATIVE_VARIABLE_VIEW_MADE_VISIBLE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/variablesView/variableView.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/variablesView/variableView.ts) +```typescript + + // I've we've been made visible, make sure that we are updated + if (visible) { + sendTelemetryEvent(Telemetry.NativeVariableViewMadeVisible); + // If there is an active execution count, update the view with that info + // Keep the variables up to date if document has run cells while the view was not visible + if (this.notebookWatcher.activeNotebookExecutionCount !== undefined) { +``` + +
+
+ DS_INTERNAL.NATIVE.NOTEBOOK_OPEN_COUNT + +## Description + + +No description provided + +## Properties + +- count: number + +## Locations Used + +[src/notebooks/notebookUsageTracker.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/notebookUsageTracker.ts) +```typescript + public dispose() { + // Send a bunch of telemetry + if (this.openedNotebookCount) { + sendTelemetryEvent(Telemetry.NotebookOpenCount, undefined, { count: this.openedNotebookCount }); + } + if (this.executedNotebooksIndexedByUri.size) { + sendTelemetryEvent(Telemetry.NotebookRunCount, undefined, { +``` + +
+
+ DS_INTERNAL.NATIVE.NOTEBOOK_OPEN_TIME + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.NATIVE.NOTEBOOK_RUN_COUNT + +## Description + + +No description provided + +## Properties + +- count: number + +## Locations Used + +[src/notebooks/notebookUsageTracker.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/notebookUsageTracker.ts) +```typescript + sendTelemetryEvent(Telemetry.NotebookOpenCount, undefined, { count: this.openedNotebookCount }); + } + if (this.executedNotebooksIndexedByUri.size) { + sendTelemetryEvent(Telemetry.NotebookRunCount, undefined, { + count: this.executedNotebooksIndexedByUri.size + }); + } +``` + +
+
+ DS_INTERNAL.NATIVE.OPEN_NOTEBOOK_FAILURE + +## Description + + + + + Telemetry event fired if a failure occurs loading a notebook + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.NEW_FILE_USED_IN_INTERACTIVE + +## Description + + + + + Telemetry event sent when a user runs the interactive window with a new file + @type {(undefined | never)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.NUMBER_OF_REMOTE_KERNEL_IDS_SAVED + +## Description + + + + When users connect to a remote kernel, we store the kernel id so we can re-connect to that + when user opens the same notebook. We only store the last 100. + Count is the number of entries saved in the list. + +## Properties + +- count: number + +## Locations Used + +[src/kernels/jupyter/preferredRemoteKernelIdProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/preferredRemoteKernelIdProvider.ts) +```typescript + } + + // Prune list if too big + sendTelemetryEvent(Telemetry.NumberOfSavedRemoteKernelIds, undefined, { count: list.length }); + while (list.length > MaximumKernelIdListSize) { + requiresUpdate = true; + list.shift(); +``` + +
+
+ DS_INTERNAL.PERCEIVED_JUPYTER_STARTUP_NOTEBOOK + +## Description + + + + + Time take for jupyter server to start and be ready to run first user cell. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) +```typescript + // Setup telemetry + if (!this.perceivedJupyterStartupTelemetryCaptured) { + this.perceivedJupyterStartupTelemetryCaptured = true; + sendTelemetryEvent(Telemetry.PerceivedJupyterStartupNotebook, stopWatch.elapsedTime); + executionPromise + .finally(() => + sendTelemetryEvent(Telemetry.StartExecuteNotebookCellPerceivedCold, stopWatch.elapsedTime) +``` + + +[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) +```typescript + + sendKernelTelemetryEvent( + this.resourceUri, + Telemetry.PerceivedJupyterStartupNotebook, + stopWatch.elapsedTime + ); + this._session = session; +``` + +
+
+ DS_INTERNAL.PREFERRED_KERNEL + +## Description + + + + + Telemetry sent when we have attempted to find the preferred kernel. + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/controllers/notebookControllerManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/notebookControllerManager.ts) +```typescript + ? PYTHON_LANGUAGE + : getTelemetrySafeLanguage(getLanguageInNotebookMetadata(notebookMetadata) || ''); + + sendTelemetryEvent(Telemetry.PreferredKernel, undefined, { + result: preferredConnection ? 'found' : 'notfound', + resourceType, + language: telemetrySafeLanguage, +``` + +
+
+ DS_INTERNAL.PREFERRED_KERNEL_EXACT_MATCH + +## Description + + +No description provided + +## Properties + +- + matchedReason: PreferredKernelExactMatchReason; + +## Locations Used + +[src/notebooks/controllers/notebookControllerManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/notebookControllerManager.ts) +```typescript + onlyConnection && (matchReason |= PreferredKernelExactMatchReason.OnlyKernel); + topMatchIsPreferredInterpreter && (matchReason |= PreferredKernelExactMatchReason.WasPreferredInterpreter); + isExactMatch && (matchReason |= PreferredKernelExactMatchReason.IsExactMatch); + sendTelemetryEvent(Telemetry.PreferredKernelExactMatch, undefined, { + matchedReason: matchReason + }); + } +``` + +
+
+ DS_INTERNAL.PYTHON_EXTENSION_INSTALLED_VIA_KERNEL_PICKER + +## Description + + +No description provided + +## Properties + +- + action: + | 'success' // Correctly installed and hooked the API + | 'failed'; + +## Locations Used + +[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) +```typescript + + if (this.extensionChecker.isPythonExtensionInstalled) { + traceInfo('Python Extension installed via Kernel Picker command'); + sendTelemetryEvent(Telemetry.PythonExtensionInstalledViaKernelPicker, undefined, { + action: 'success' + }); + +``` + + +[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) +```typescript + await this.controllerManager.loadNotebookControllers(true); + } else { + traceError('Failed to install Python Extension via Kernel Picker command'); + sendTelemetryEvent(Telemetry.PythonExtensionInstalledViaKernelPicker, undefined, { + action: 'failed' + }); + throw new Error('Failed to install Python Extension via Kernel Picker command'); +``` + +
+
+ DS_INTERNAL.PYTHON_EXTENSION_NOT_INSTALLED + +## Description + + +No description provided + +## Properties + +- + action: + | 'displayed' // Message displayed. + | 'dismissed' // user dismissed the message. + | 'download'; + +## Locations Used + +[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) +```typescript + // Ask user if they want to install and then wait for them to actually install it. + const yes = localize.Common.bannerLabelYes(); + const no = localize.Common.bannerLabelNo(); + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'displayed' }); + const answer = await this.appShell.showInformationMessage( + localize.DataScience.pythonExtensionRequired(), + { modal: true }, +``` + + +[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) +```typescript + no + ); + if (answer === yes) { + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'download' }); + await this.installPythonExtension(); + } else { + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'dismissed' }); +``` + + +[src/platform/api/pythonApi.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/api/pythonApi.ts) +```typescript + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'download' }); + await this.installPythonExtension(); + } else { + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'dismissed' }); + } + } + private async installPythonExtension() { +``` + + +[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) +```typescript + // click run again + private async installPythonExtensionViaKernelPicker(): Promise { + if (!this.extensionChecker.isPythonExtensionInstalled) { + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'displayed' }); + + // First present a simple modal dialog to indicate what we are about to do + const selection = await this.appShell.showInformationMessage( +``` + + +[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) +```typescript + Common.install() + ); + if (selection === Common.install()) { + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'download' }); + } else { + // If they don't want to install, just bail out at this point + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'dismissed' }); +``` + + +[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) +```typescript + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'download' }); + } else { + // If they don't want to install, just bail out at this point + sendTelemetryEvent(Telemetry.PythonExtensionNotInstalled, undefined, { action: 'dismissed' }); + return; + } + +``` + +
+
+ DS_INTERNAL.PYTHON_KERNEL_EXECUTABLE_MATCHES + +## Description + + + + + Telemetry sent for local Python Kernels. + Tracking whether we have managed to launch the kernel that matches the interpreter. + If match=false, then this means we have failed to launch the right kernel. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/helpers.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/helpers.node.ts) +```typescript + } + const sysExecutable = concatMultilineString(output.text).trim().toLowerCase(); + const match = areInterpreterPathsSame(kernelConnection.interpreter.uri, Uri.file(sysExecutable)); + sendTelemetryEvent(Telemetry.PythonKerneExecutableMatches, undefined, { + match: match ? 'true' : 'false', + kernelConnectionType: kernelConnection.kind + }); +``` + + +[src/kernels/helpers.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/helpers.node.ts) +```typescript + Uri.file(execOutput.stdout.trim().toLowerCase()), + Uri.file(sysExecutable) + ); + sendTelemetryEvent(Telemetry.PythonKerneExecutableMatches, undefined, { + match: match ? 'true' : 'false', + kernelConnectionType: kernelConnection.kind + }); +``` + +
+
+ DS_INTERNAL.PYTHON_MODULE_INSTALL + +## Description + + +No description provided + +## Properties + +- + moduleName: string; +- + /** + * Whether the module was already (once before) installed into the python environment or + * whether this already exists (detected via `pip list`) + */ + isModulePresent?: 'true' | undefined; +- + action: + | 'cancelled' // User cancelled the installation or closed the notebook or the like. + | 'displayed' // Install prompt may have been displayed. + | 'prompted' // Install prompt was displayed. + | 'installed' // Installation disabled (this is what python extension returns). + | 'ignored' // Installation disabled (this is what python extension returns). + | 'disabled' // Installation disabled (this is what python extension returns). + | 'failed' // Installation disabled (this is what python extension returns). + | 'install' // User chose install from prompt. + | 'donotinstall' // User chose not to install from prompt. + | 'differentKernel' // User chose to select a different kernel. + | 'error' // Some other error. + | 'installedInJupyter' // The package was successfully installed in Jupyter whilst failed to install in Python ext. + | 'failedToInstallInJupyter' // Failed to install the package in Jupyter as well as Python ext. + | 'dismissed'; +- // User chose to dismiss the prompt. + resourceType?: 'notebook' | 'interactive'; +- + /** + * Hash of the resource (notebook.uri or pythonfile.uri associated with this). + * If we run the same notebook tomorrow, the hash will be the same. + */ + resourceHash?: string; +- + pythonEnvType?: EnvironmentType; + +## Locations Used + +[src/kernels/installer/productInstaller.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/installer/productInstaller.node.ts) +```typescript + action = 'failed'; + throw ex; + } finally { + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action, + moduleName: ProductNames.get(product)! + }); +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + const productNameForTelemetry = products.map((product) => ProductNames.get(product)!).join(', '); + const resourceType = resource ? getResourceType(resource) : undefined; + const resourceHash = resource ? getTelemetrySafeHashedString(resource.toString()) : undefined; + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'displayed', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + : [Common.install()]; + try { + if (!this.isCodeSpace) { + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'prompted', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + promptCancellationPromise + ]); + if (cancelTokenSource.token.isCancellationRequested) { + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'dismissed', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + return KernelInterpreterDependencyResponse.cancel; + } + if (selection === selectKernel) { + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'differentKernel', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + }); + return KernelInterpreterDependencyResponse.selectDifferentKernel; + } else if (selection === Common.install()) { + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'install', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + cancellationPromise + ]); + if (response === InstallerResponse.Installed) { + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'installed', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + }); + return KernelInterpreterDependencyResponse.ok; + } else if (response === InstallerResponse.Ignore) { + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'failed', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + } + } + + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'dismissed', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/kernelDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelDependencyService.node.ts) +```typescript + return KernelInterpreterDependencyResponse.cancel; + } catch (ex) { + traceError(`Failed to install ${productNameForTelemetry}`, ex); + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'error', + moduleName: productNameForTelemetry, + resourceType, +``` + + +[src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterDependencyService.node.ts) +```typescript + pipInstalledInNonCondaEnv === false ? [Product.pip].concat(missingProducts) : missingProducts, + interpreter.displayName + ); + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'displayed', + moduleName: ProductNames.get(Product.jupyter)!, + pythonEnvType: interpreter.envType +``` + + +[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) +```typescript + interpreter: PythonEnvironment, + tokenSource: CancellationTokenSource + ): Promise { + sendTelemetryEvent(Telemetry.PythonModuleInstall, undefined, { + action: 'displayed', + moduleName: ProductNames.get(Product.pandas)!, + pythonEnvType: interpreter?.envType +``` + +
+
+ DS_INTERNAL.PYTHON_NOT_INSTALLED + +## Description + + +No description provided + +## Properties + +- + action: + | 'displayed' // Message displayed. + | 'dismissed' // user dismissed the message. + | 'download'; + +## Locations Used + +[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) +```typescript + // Unlike installing the python extension we don't expect in progress executions to be handled + // when this command is installed, user will have to manually install python and rerun the cell + private async installPythonViaKernelPicker(): Promise { + sendTelemetryEvent(Telemetry.PythonNotInstalled, undefined, { action: 'displayed' }); + const selection = await this.appShell.showErrorMessage( + DataScience.pythonNotInstalledNonMarkdown(), + { modal: true }, +``` + + +[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) +```typescript + ); + + if (selection === Common.install()) { + sendTelemetryEvent(Telemetry.PythonNotInstalled, undefined, { action: 'download' }); + // Direct the user to download from python.org + this.appShell.openUrl('https://www.python.org/downloads'); + } else { +``` + + +[src/notebooks/controllers/installPythonControllerCommands.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/installPythonControllerCommands.ts) +```typescript + // Direct the user to download from python.org + this.appShell.openUrl('https://www.python.org/downloads'); + } else { + sendTelemetryEvent(Telemetry.PythonNotInstalled, undefined, { action: 'dismissed' }); + } + } + +``` + +
+
+ DS_INTERNAL.RANK_KERNELS_PERF + +## Description + + + + + Total time taken to find a kernel on disc or on a remote machine. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/kernelFinder.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernelFinder.base.ts) +```typescript + ) {} + + @traceDecoratorVerbose('Rank Kernels', TraceOptions.BeforeCall | TraceOptions.Arguments) + @captureTelemetry(Telemetry.RankKernelsPerf) + public async rankKernels( + resource: Resource, + notebookMetadata?: nbformat.INotebookMetadata, +``` + +
+
+ DS_INTERNAL.RAWKERNEL_CREATING_NOTEBOOK + +## Description + + + + Telemetry send when we create a notebook for a raw kernel or jupyter + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/hostRawNotebookProvider.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/hostRawNotebookProvider.node.ts) +```typescript + return this.rawNotebookSupportedService.isSupported; + } + + @captureTelemetry(Telemetry.RawKernelCreatingNotebook, undefined, true) + public async createNotebook( + resource: Resource, + kernelConnection: KernelConnectionMetadata, +``` + +
+
+ DS_INTERNAL.RAWKERNEL_INFO_RESPONSE + +## Description + + + + + After starting a kernel we send a request to get the kernel info. + This tracks the total time taken to get the response back (or wether we timedout). + If we timeout and later we find successful comms for this session, then timeout is too low + or we need more attempts. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + } else { + traceWarning(`Didn't get response for requestKernelInfo after ${stopWatch.elapsedTime}ms.`); + } + sendTelemetryEvent(Telemetry.RawKernelInfoResonse, stopWatch.elapsedTime, { + attempts, + timedout: !gotIoPubMessage.completed + }); +``` + +
+
+ DS_INTERNAL.RAWKERNEL_PROCESS_LAUNCH + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/launcher/kernelProcess.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/launcher/kernelProcess.node.ts) +```typescript + } + } + + @captureTelemetry(Telemetry.RawKernelProcessLaunch, undefined, true) + public async launch(workingDirectory: string, timeout: number, cancelToken: CancellationToken): Promise { + if (this.launchedOnce) { + throw new Error('Kernel has already been launched.'); +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_CONNECT + +## Description + + + + Raw kernel timing events + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + throw error; + } + } finally { + sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionConnect, stopWatch.elapsedTime); + } + + this.connected = true; +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_DISPOSED + +## Description + + + + + This event is sent when a RawSession's `dispose` method is called. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawSession.node.ts) +```typescript + public async dispose() { + // We want to know who called dispose on us + const stacktrace = new Error().stack; + sendTelemetryEvent(Telemetry.RawKernelSessionDisposed, undefined, { stacktrace }); + + // Now actually dispose ourselves + this.isDisposing = true; +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_KERNEL_PROCESS_EXITED + +## Description + + + + + This event is sent when the underlying kernelProcess for a + RawJupyterSession exits. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/launcher/kernelLauncher.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/launcher/kernelLauncher.node.ts) +```typescript + + const disposable = kernelProcess.exited( + ({ exitCode, reason }) => { + sendTelemetryEvent(Telemetry.RawKernelSessionKernelProcessExited, undefined, { + exitCode, + exitReason: getTelemetrySafeErrorMessageFromPythonTraceback(reason) + }); +``` + + +[src/kernels/raw/session/rawSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawSession.node.ts) +```typescript + traceError(`Disposing session as kernel process died ExitCode: ${e.exitCode}, Reason: ${e.reason}`); + // Send telemetry so we know why the kernel process exited, + // as this affects our kernel startup success + sendTelemetryEvent(Telemetry.RawKernelSessionKernelProcessExited, undefined, { + exitCode: e.exitCode, + exitReason: getTelemetrySafeErrorMessageFromPythonTraceback(e.reason) + }); +``` + + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + if (session !== this.session) { + return; + } + sendTelemetryEvent(Telemetry.RawKernelSessionKernelProcessExited, undefined, { + exitCode, + exitReason: getTelemetrySafeErrorMessageFromPythonTraceback(reason) + }); +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_NO_IPYKERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/controllers/kernelConnector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/kernelConnector.ts) +```typescript + const rawNotebookProvider = serviceContainer.tryGet(IRawNotebookProvider); + const rawLocalKernel = rawNotebookProvider?.isSupported && isLocal; + if (rawLocalKernel && errorContext === 'start') { + sendKernelTelemetryEvent(resource, Telemetry.RawKernelSessionStartNoIpykernel, { + reason: handleResult + }); + } +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_SHUTDOWN + +## Description + + + + + This event is sent when a RawJupyterSession's `shutdownSession` + method is called. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + // We want to know why we got shut down + const stacktrace = new Error().stack; + return super.shutdownSession(session, statusHandler, isRequestToShutdownRestartSession).then(() => { + sendTelemetryEvent(Telemetry.RawKernelSessionShutdown, undefined, { + isRequestToShutdownRestartSession, + stacktrace + }); +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_START + +## Description + + + + Raw kernel single events + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + Cancellation.throwIfCanceled(options.token); + // Only connect our session if we didn't cancel or timeout + sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStartSuccess); + sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStart, stopWatch.elapsedTime); + traceInfo( + `${DataScience.kernelStarted().format( + getDisplayNameOrNameOfKernelConnection(this.kernelConnectionMetadata) +``` + + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + if (isCancellationError(error) || options.token.isCancellationRequested) { + sendKernelTelemetryEvent( + this.resource, + Telemetry.RawKernelSessionStart, + stopWatch.elapsedTime, + undefined, + error +``` + + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + } else if (error instanceof TimedOutError) { + sendKernelTelemetryEvent( + this.resource, + Telemetry.RawKernelSessionStart, + stopWatch.elapsedTime, + undefined, + error +``` + + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + // Send our telemetry event with the error included + sendKernelTelemetryEvent( + this.resource, + Telemetry.RawKernelSessionStart, + stopWatch.elapsedTime, + undefined, + // eslint-disable-next-line @typescript-eslint/no-explicit-any +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_START_EXCEPTION + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + ); + sendKernelTelemetryEvent( + this.resource, + Telemetry.RawKernelSessionStartException, + undefined, + undefined, + // eslint-disable-next-line @typescript-eslint/no-explicit-any +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_START_SUCCESS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + newSession = await this.startRawSession(options); + Cancellation.throwIfCanceled(options.token); + // Only connect our session if we didn't cancel or timeout + sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStartSuccess); + sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStart, stopWatch.elapsedTime); + traceInfo( + `${DataScience.kernelStarted().format( +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_START_TIMEOUT + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + undefined, + error + ); + sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStartTimeout); + traceError('Raw session failed to start in given timeout'); + throw error; + } else { +``` + +
+
+ DS_INTERNAL.RAWKERNEL_SESSION_START_USER_CANCEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + undefined, + error + ); + sendKernelTelemetryEvent(this.resource, Telemetry.RawKernelSessionStartUserCancel); + traceVerbose('Starting of raw session cancelled by user'); + throw error; + } else if (error instanceof TimedOutError) { +``` + +
+
+ DS_INTERNAL.RAWKERNEL_START_RAW_SESSION + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawJupyterSession.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawJupyterSession.node.ts) +```typescript + return this.startRawSession({ token: cancelToken, ui: new DisplayOptions(disableUI) }); + } + + @captureTelemetry(Telemetry.RawKernelStartRawSession, undefined, true) + private async startRawSession(options: { token: CancellationToken; ui: IDisplayOptions }): Promise { + if ( + this.kernelConnectionMetadata.kind !== 'startUsingLocalKernelSpec' && +``` + +
+
+ DS_INTERNAL.REGISTER_AND_USE_INTERPRETER_AS_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/jupyterKernelService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterKernelService.node.ts) +```typescript + ); + } + + sendTelemetryEvent(Telemetry.RegisterAndUseInterpreterAsKernel); + return kernelSpecFilePath.fsPath; + } + private async updateKernelEnvironment( +``` + +
+
+ DS_INTERNAL.REMOTE_KERNEL_SPEC_COUNT + +## Description + + +No description provided + +## Properties + +- + /** + * Number of kernel specs. + */ + count: number; + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.RESTART_JUPYTER_TIME + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) +```typescript + } + + @captureTelemetry(Telemetry.RestartKernel) + @captureTelemetry(Telemetry.RestartJupyterTime) + private async restartExecution(session: IJupyterSession): Promise { + // Just use the internal session. Pending cells should have been canceled by the caller + await session.restart(); +``` + +
+
+ DS_INTERNAL.RESTART_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts) +```typescript + }); + } + + @captureTelemetry(Telemetry.RestartKernel) + @captureTelemetry(Telemetry.RestartJupyterTime) + private async restartExecution(session: IJupyterSession): Promise { + // Just use the internal session. Pending cells should have been canceled by the caller +``` + +
+
+ DS_INTERNAL.RUNTEST + +## Description + + +No description provided + +## Properties + +- + testName: string; +- + testResult: string; +- + perfWarmup?: 'true'; +- + commitHash?: string; +- + timedCheckpoints?: string; + +## Locations Used + +[src/test/testHooks.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/testHooks.node.ts) +```typescript + dimensions = { ...dimensions, commitHash: process.env.GIT_SHA }; + } + + traceInfoIfCI(`Sending telemetry event ${Telemetry.RunTest} with dimensions ${dimensions}`); + telemetryReporter.sendDangerousTelemetryEvent(Telemetry.RunTest, dimensions, measures); + }, + afterAll: async () => { +``` + + +[src/test/testHooks.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/testHooks.node.ts) +```typescript + } + + traceInfoIfCI(`Sending telemetry event ${Telemetry.RunTest} with dimensions ${dimensions}`); + telemetryReporter.sendDangerousTelemetryEvent(Telemetry.RunTest, dimensions, measures); + }, + afterAll: async () => { + if (!IS_CI_SERVER) { +``` + +
+
+ DS_INTERNAL.SELECT_JUPYTER_INTERPRETER + +## Description + + +No description provided + +## Properties + +- + /** + * The result of the selection. + * notSelected - No interpreter was selected. + * selected - An interpreter was selected (and configured to have jupyter and notebook). + * installationCancelled - Installation of jupyter and/or notebook was cancelled for an interpreter. + * + * @type {('notSelected' | 'selected' | 'installationCancelled')} + */ + result?: 'notSelected' | 'selected' | 'installationCancelled'; + +## Locations Used + +[src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts) +```typescript + public async selectInterpreter(): Promise { + const interpreter = await this.jupyterInterpreterSelector.selectInterpreter(); + if (!interpreter) { + sendTelemetryEvent(Telemetry.SelectJupyterInterpreter, undefined, { result: 'notSelected' }); + return; + } + +``` + + +[src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts) +```typescript + return interpreter; + } + case JupyterInterpreterDependencyResponse.cancel: + sendTelemetryEvent(Telemetry.SelectJupyterInterpreter, undefined, { result: 'installationCancelled' }); + return; + default: + return this.selectInterpreter(); +``` + + +[src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterService.node.ts) +```typescript + this._selectedInterpreter = interpreter; + this._onDidChangeInterpreter.fire(interpreter); + this.interpreterSelectionState.updateSelectedPythonPath(interpreter.uri); + sendTelemetryEvent(Telemetry.SelectJupyterInterpreter, undefined, { result: 'selected' }); + } + + // For a given python path check if it can run jupyter for us +``` + +
+
+ DS_INTERNAL.SELECT_JUPYTER_INTERPRETER_MESSAGE_DISPLAYED + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.node.ts) +```typescript + if (!interpreter) { + // Unlikely scenario, user hasn't selected python, python extension will fall over. + // Get user to select something. + sendTelemetryEvent(Telemetry.SelectJupyterInterpreterMessageDisplayed); + return DataScience.selectJupyterInterpreter(); + } + } +``` + +
+
+ DS_INTERNAL.SETTINGS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/standalone/activation/globalActivation.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/activation/globalActivation.ts) +```typescript + resultSettings[k] = currentValue; + } + } + sendTelemetryEvent(Telemetry.DataScienceSettings, 0, resultSettings); + } + } +} +``` + +
+
+ DS_INTERNAL.SHIFTENTER_BANNER_SHOWN + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/interactive-window/shiftEnterBanner.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/interactive-window/shiftEnterBanner.ts) +```typescript + return; + } + + sendTelemetryEvent(Telemetry.ShiftEnterBannerShown); + const response = await this.appShell.showInformationMessage(this.bannerMessage, ...this.bannerLabels); + switch (response) { + case this.bannerLabels[InteractiveShiftEnterLabelIndex.Yes]: { +``` + + +[src/test/datascience/shiftEnterBanner.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/shiftEnterBanner.unit.test.ts) +```typescript + config.verifyAll(); + + expect(Reporter.eventNames).to.deep.equal([ + Telemetry.ShiftEnterBannerShown, + Telemetry.EnableInteractiveShiftEnter + ]); + }); +``` + + +[src/test/datascience/shiftEnterBanner.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/shiftEnterBanner.unit.test.ts) +```typescript + config.verifyAll(); + + expect(Reporter.eventNames).to.deep.equal([ + Telemetry.ShiftEnterBannerShown, + Telemetry.DisableInteractiveShiftEnter + ]); + }); +``` + +
+
+ DS_INTERNAL.SHOW_DATA_NO_PANDAS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) +```typescript + throw new Error(DataScience.pandasTooOldForViewingFormat().format(versionStr)); + } + + sendTelemetryEvent(Telemetry.PandasNotInstalled); + await this.installMissingDependencies(interpreter, tokenSource); + } finally { + tokenSource.dispose(); +``` + +
+
+ DS_INTERNAL.SHOW_DATA_PANDAS_TOO_OLD + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerDependencyService.node.ts) +```typescript + if (isVersionOfPandasSupported(pandasVersion)) { + return; + } + sendTelemetryEvent(Telemetry.PandasTooOld); + // Warn user that we cannot start because pandas is too old. + const versionStr = `${pandasVersion.major}.${pandasVersion.minor}.${pandasVersion.build}`; + throw new Error(DataScience.pandasTooOldForViewingFormat().format(versionStr)); +``` + +
+
+ DS_INTERNAL.START_EXECUTE_NOTEBOOK_CELL_PERCEIVED_COLD + +## Description + + + + + Time take for jupyter server to be busy from the time user first hit `run` cell until jupyter reports it is busy running a cell. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/kernel.base.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.base.ts) +```typescript + sendTelemetryEvent(Telemetry.PerceivedJupyterStartupNotebook, stopWatch.elapsedTime); + executionPromise + .finally(() => + sendTelemetryEvent(Telemetry.StartExecuteNotebookCellPerceivedCold, stopWatch.elapsedTime) + ) + .catch(noop); + } +``` + +
+
+ DS_INTERNAL.START_JUPYTER_PROCESS + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/launcher/notebookStarter.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/launcher/notebookStarter.node.ts) +```typescript + } + + // Fire off telemetry for the process being talkable + sendTelemetryEvent(Telemetry.StartJupyterProcess, stopWatch.elapsedTime); + + try { + const port = parseInt(url.parse(connection.baseUrl).port || '0', 10); +``` + +
+
+ DS_INTERNAL.START_RAW_FAILED_UI_DISABLED + +## Description + + + + Telemetry sent when starting auto starting Native Notebook kernel fails silently. + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.START_SESSION_FAILED_JUPYTER + +## Description + + + + + Telemetry event sent when starting a session for a local connection failed. + + @type {(undefined | never)} + @memberof IEventNamePropertyMapping + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/common/baseJupyterSession.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/common/baseJupyterSession.ts) +```typescript +export class JupyterSessionStartError extends WrappedError { + constructor(originalException: Error) { + super(originalException.message, originalException); + sendTelemetryEvent(Telemetry.StartSessionFailedJupyter, undefined, undefined, originalException, true); + } +} + +``` + +
+
+ DS_INTERNAL.SWITCH_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) +```typescript + default: + // We don't know as its the default kernel on Jupyter server. + } + sendKernelTelemetryEvent(document.uri, Telemetry.SwitchKernel); + // If we have an existing kernel, then we know for a fact the user is changing the kernel. + // Else VSC is just setting a kernel for a notebook after it has opened. + if (existingKernel) { +``` + + +[src/test/datascience/telemetry.vscode.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/datascience/telemetry.vscode.test.ts) +```typescript + // Right now this is the guaranteed list. Might want to expand this. + assertEvent(Telemetry.RunFileInteractive); + assertEvent(Telemetry.ExecuteCellPerceivedWarm); + assertEvent(Telemetry.SwitchKernel); + }); +}); + +``` + +
+
+ DS_INTERNAL.SWITCH_TO_EXISTING_KERNEL + +## Description + + +No description provided + +## Properties + +- language: string + +## Locations Used + +[src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts) +```typescript +import { getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; + +export function sendNotebookOrKernelLanguageTelemetry( + telemetryEvent: Telemetry.SwitchToExistingKernel | Telemetry.NotebookLanguage, + language?: string +) { + language = getTelemetrySafeLanguage(language); +``` + + +[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) +```typescript + } + switch (this.connection.kind) { + case 'startUsingPythonInterpreter': + sendNotebookOrKernelLanguageTelemetry(Telemetry.SwitchToExistingKernel, PYTHON_LANGUAGE); + break; + case 'connectToLiveRemoteKernel': + sendNotebookOrKernelLanguageTelemetry( +``` + + +[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) +```typescript + break; + case 'connectToLiveRemoteKernel': + sendNotebookOrKernelLanguageTelemetry( + Telemetry.SwitchToExistingKernel, + this.connection.kernelModel.language + ); + break; +``` + + +[src/notebooks/controllers/vscodeNotebookController.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/vscodeNotebookController.ts) +```typescript + case 'startUsingLocalKernelSpec': + case 'startUsingRemoteKernelSpec': + sendNotebookOrKernelLanguageTelemetry( + Telemetry.SwitchToExistingKernel, + this.connection.kernelSpec.language + ); + break; +``` + +
+
+ DS_INTERNAL.SWITCH_TO_INTERPRETER_AS_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.SYNC_ALL_CELLS + +## Description + + + + Sync events + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.SYNC_SINGLE_CELL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.USE_EXISTING_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.USE_INTERPRETER_AS_KERNEL + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.VARIABLE_EXPLORER_FETCH_TIME + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/variables/jupyterVariables.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/variables/jupyterVariables.ts) +```typescript + } + + // IJupyterVariables implementation + @captureTelemetry(Telemetry.VariableExplorerFetchTime, undefined, true) + public async getVariables(request: IJupyterVariablesRequest, kernel?: IKernel): Promise { + return this.variableHandler.getVariables(request, kernel); + } +``` + +
+
+ DS_INTERNAL.VARIABLE_EXPLORER_VARIABLE_COUNT + +## Description + + +No description provided + +## Properties + +- variableCount: number + +## Locations Used + +[src/webviews/extension-side/variablesView/variableView.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/variablesView/variableView.ts) +```typescript + const response = await this.variables.getVariables(args, activeNotebook); + + this.postMessage(InteractiveWindowMessages.GetVariablesResponse, response).ignoreErrors(); + sendTelemetryEvent(Telemetry.VariableExplorerVariableCount, undefined, { + variableCount: response.totalCount + }); + } else { +``` + +
+
+ DS_INTERNAL.VSCNOTEBOOK_CELL_TRANSLATION_FAILED + +## Description + + +No description provided + +## Properties + +- + isErrorOutput: boolean; + +## Locations Used + +[src/kernels/execution/helpers.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/helpers.ts) +```typescript + // Unless we already know its an unknown output type. + const outputType: nbformat.OutputType = + customMetadata?.outputType || (isStream ? 'stream' : 'display_data'); + sendTelemetryEvent(Telemetry.VSCNotebookCellTranslationFailed, undefined, { + isErrorOutput: outputType === 'error' + }); + +``` + +
+
+ DS_INTERNAL.WAIT_FOR_IDLE_JUPYTER + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/session/jupyterSession.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/session/jupyterSession.ts) +```typescript + return true; + } + + @captureTelemetry(Telemetry.WaitForIdleJupyter, undefined, true) + public waitForIdle(timeout: number): Promise { + // Wait for idle on this session + return this.waitForIdleOnSession(this.session, timeout); +``` + +
+
+ DS_INTERNAL.WEB_FETCH_ERROR + +## Description + + + + + Event sent when trying to talk to a remote server and the browser gives us a generic fetch error + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/serverSelector.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/serverSelector.ts) +```typescript + } + } else { + if (err.message.includes('Failed to fetch') && this.isWebExtension) { + sendTelemetryEvent(Telemetry.FetchError, undefined, { currentTask: 'connecting' }); + } + await this.errorHandler.handleError( + new RemoteJupyterServerConnectionError(userURI, computeServerId(userURI), err) +``` + +
+
+ DS_INTERNAL.WEBVIEW_STARTUP + +## Description + + +No description provided + +## Properties + +- type: string + +## Locations Used + +[src/platform/webviews/webviewHost.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/webviews/webviewHost.ts) +```typescript + protected webViewRendered() { + if (this.webviewInit && !this.webviewInit.resolved) { + // Send telemetry for startup + sendTelemetryEvent(Telemetry.WebviewStartup, this.startupStopwatch.elapsedTime, { type: this.title }); + + // Resolve our started promise. This means the webpanel is ready to go. + this.webviewInit.resolve(); +``` + +
+
+ DS_INTERNAL.WEBVIEW_STYLE_UPDATE + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +Event can be removed. Not referenced anywhere + +
+
+ DS_INTERNAL.ZMQ_NATIVE_BINARIES_LOADING + +## Description + + + + + Telemetry event sent when the ZMQ native binaries do work. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawNotebookSupportedService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawNotebookSupportedService.node.ts) +```typescript + try { + require('zeromq'); + traceInfo(`ZMQ install verified.`); + sendTelemetryEvent(Telemetry.ZMQSupported); + this._isSupported = true; + } catch (e) { + traceError(`Exception while attempting zmq :`, e); +``` + +
+
+ DS_INTERNAL.ZMQ_NATIVE_BINARIES_NOT_LOADING + +## Description + + + + + Telemetry event sent when the ZMQ native binaries do not work. + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/raw/session/rawNotebookSupportedService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/raw/session/rawNotebookSupportedService.node.ts) +```typescript + this._isSupported = true; + } catch (e) { + traceError(`Exception while attempting zmq :`, e); + sendTelemetryEvent(Telemetry.ZMQNotSupported); + this._isSupported = false; + } + +``` + +
+
+ ENVFILE_VARIABLE_SUBSTITUTION + +## Description + + + + + Telemetry event sent when substituting Environment variables to calculate value of variables + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/common/variables/environment.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/variables/environment.node.ts) +```typescript + }); + if (!invalid && replacement !== value) { + value = replacement; + sendTelemetryEvent(EventName.ENVFILE_VARIABLE_SUBSTITUTION); + } + + return value.replace(/\\\$/g, '$'); +``` + +
+
+ ENVFILE_WORKSPACE + +## Description + + + + + Telemetry event sent when an environment file is detected in the workspace. + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/telemetry/envFileTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/telemetry/envFileTelemetry.node.ts) +```typescript +} + +function sendTelemetry(hasCustomEnvPath: boolean = false) { + sendTelemetryEvent(EventName.ENVFILE_WORKSPACE, undefined, { hasCustomEnvPath }); + + envFileTelemetrySent = true; +} +``` + +
+
+ EXTENSION.LOAD + +## Description + + + + + Telemetry event sent with details just after editor loads + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/telemetry/startupTelemetry.ts) +```typescript + await activatedPromise; + durations.totalActivateTime = stopWatch.elapsedTime; + const props = await getActivationTelemetryProps(serviceContainer); + sendTelemetryEvent(EventName.EXTENSION_LOAD, durations, props); + } catch (ex) { + traceError('sendStartupTelemetry() failed.', ex); + } +``` + + +[src/platform/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/telemetry/startupTelemetry.ts) +```typescript + traceError('getActivationTelemetryProps() failed.', ex); + } + } + sendTelemetryEvent(EventName.EXTENSION_LOAD, durations, props, ex); + } catch (exc2) { + traceError('sendErrorTelemetry() failed.', exc2); + } +``` + + +[src/platform/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/telemetry/startupTelemetry.ts) +```typescript + +async function getActivationTelemetryProps( + serviceContainer: IServiceContainer +): Promise { + // eslint-disable-next-line + // TODO: Not all of this data is showing up in the database... + // eslint-disable-next-line +``` + +
+
+ HASHED_PACKAGE_NAME + +## Description + + + + + Telemetry event sent with details when tracking imports + +## Properties + + +No properties for event + + +## Locations Used + +[src/standalone/import-export/importTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/importTracker.node.ts) +```typescript + // Hash the package name so that we will never accidentally see a + // user's private package name. + const hash = getTelemetrySafeHashedString(packageName); + sendTelemetryEvent(EventName.HASHED_PACKAGE_NAME, undefined, { hashedNamev2: hash }); + } + + private lookForImports(lines: (string | undefined)[]) { +``` + + +[src/test/telemetry/importTracker.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/telemetry/importTracker.unit.test.ts) +```typescript + public static expectHashes(...hashes: string[]) { + expect(Reporter.eventNames).to.contain(EventName.HASHED_PACKAGE_PERF); + if (hashes.length > 0) { + expect(Reporter.eventNames).to.contain(EventName.HASHED_PACKAGE_NAME); + } + + Reporter.properties.pop(); // HASHED_PACKAGE_PERF +``` + +
+
+ HASHED_PACKAGE_PERF + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/standalone/import-export/importTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/importTracker.node.ts) +```typescript + } + } + + @captureTelemetry(EventName.HASHED_PACKAGE_PERF) + private checkNotebookDocument(e: NotebookDocument) { + this.pendingChecks.delete(e.uri.fsPath); + const lines = this.getNotebookDocumentLines(e); +``` + + +[src/standalone/import-export/importTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/importTracker.node.ts) +```typescript + this.lookForImports(lines); + } + + @captureTelemetry(EventName.HASHED_PACKAGE_PERF) + private checkNotebookCell(e: NotebookCellExecutionStateChangeEvent) { + if (!isJupyterNotebook(e.cell.notebook)) { + return; +``` + + +[src/standalone/import-export/importTracker.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/standalone/import-export/importTracker.node.ts) +```typescript + this.lookForImports(result); + } + + @captureTelemetry(EventName.HASHED_PACKAGE_PERF) + private checkDocument(document: TextDocument) { + this.pendingChecks.delete(document.fileName); + const lines = this.getDocumentLines(document); +``` + + +[src/test/telemetry/importTracker.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/telemetry/importTracker.unit.test.ts) +```typescript + public static measures: {}[] = []; + + public static expectHashes(...hashes: string[]) { + expect(Reporter.eventNames).to.contain(EventName.HASHED_PACKAGE_PERF); + if (hashes.length > 0) { + expect(Reporter.eventNames).to.contain(EventName.HASHED_PACKAGE_NAME); + } +``` + +
+
+ JUPYTER_EXPERIMENTS_OPT_IN_OUT + +## Description + + + + + Telemetry event sent with details when a user has requested to opt it or out of an experiment group + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/common/experiments/service.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/experiments/service.ts) +```typescript + // so we need to perform these checks and send the corresponding telemetry manually. + switch (this.getOptInOptOutStatus(experiment)) { + case 'optOut': { + sendTelemetryEvent(EventName.JUPYTER_EXPERIMENTS_OPT_IN_OUT, undefined, { + expNameOptedOutOf: experiment + }); + +``` + + +[src/platform/common/experiments/service.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/experiments/service.ts) +```typescript + } + case 'optIn': { + await this.experimentationService.isCachedFlightEnabled(experiment); + sendTelemetryEvent(EventName.JUPYTER_EXPERIMENTS_OPT_IN_OUT, undefined, { + expNameOptedInto: experiment + }); + +``` + + +[src/test/common/experiments/service.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/common/experiments/service.unit.test.ts) +```typescript + assert.isTrue(result); + assert.equal(telemetryEvents.length, 1); + assert.deepEqual(telemetryEvents[0], { + eventName: EventName.JUPYTER_EXPERIMENTS_OPT_IN_OUT, + properties: { expNameOptedInto: experiment } + }); + sinon.assert.calledOnce(isCachedFlightEnabledStub); +``` + + +[src/test/common/experiments/service.unit.test.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/test/common/experiments/service.unit.test.ts) +```typescript + assert.isFalse(result); + assert.equal(telemetryEvents.length, 1); + assert.deepEqual(telemetryEvents[0], { + eventName: EventName.JUPYTER_EXPERIMENTS_OPT_IN_OUT, + properties: { expNameOptedOutOf: experiment } + }); + sinon.assert.notCalled(isCachedFlightEnabledStub); +``` + +
+
+ JUPYTER_IS_INSTALLED + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/kernels/jupyter/jupyterDetectionTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterDetectionTelemetry.node.ts) +```typescript + const minor = parseInt(versionMatch[2], 10); + const frontEndVersion = parseFloat(`${major}.${minor}`); + if (shell) { + sendTelemetryEvent(Telemetry.JupyterInstalled, undefined, { + frontEnd, + frontEndVersion, + detection: 'shell', +``` + + +[src/kernels/jupyter/jupyterDetectionTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterDetectionTelemetry.node.ts) +```typescript + shellType: shell + }); + } else { + sendTelemetryEvent(Telemetry.JupyterInstalled, undefined, { + frontEnd, + frontEndVersion, + detection: 'process' +``` + + +[src/kernels/jupyter/jupyterDetectionTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterDetectionTelemetry.node.ts) +```typescript + }); + } + } else { + sendTelemetryEvent(Telemetry.JupyterInstalled, undefined, { + failed: true, + reason: 'notInstalled', + frontEnd +``` + + +[src/kernels/jupyter/jupyterDetectionTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/jupyter/jupyterDetectionTelemetry.node.ts) +```typescript + }); + } + } catch (ex) { + sendTelemetryEvent(Telemetry.JupyterInstalled, undefined, { + failed: true, + reason: 'notInstalled', + frontEnd +``` + +
+
+ OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_ERROR_EX + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts) +```typescript + sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_SUCCESS); + } + } catch (e) { + sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_ERROR, undefined, undefined, e); + traceError(e); + this.errorHandler.handleError(e).then(noop, noop); + } +``` + +
+
+ OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_REQUEST_EX + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts) +```typescript + this.disposables.push(disposable); + } + private async onVariablePanelShowDataViewerRequest(request: IShowDataViewerFromVariablePanel) { + sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_REQUEST); + if ( + this.debugService?.activeDebugSession && + this.variableProvider && +``` + +
+
+ OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_SUCCESS_EX + +## Description + + +No description provided + +## Properties + + +No properties for event + + +## Locations Used + +[src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts) +```typescript + if (columnSize && (await this.dataViewerChecker.isRequestedColumnSizeAllowed(columnSize))) { + const title: string = `${DataScience.dataExplorerTitle()} - ${jupyterVariable.name}`; + await this.dataViewerFactory.create(jupyterVariableDataProvider, title); + sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_SUCCESS); + } + } catch (e) { + sendTelemetryEvent(EventName.OPEN_DATAVIEWER_FROM_VARIABLE_WINDOW_ERROR, undefined, undefined, e); +``` + +
+
+ PLATFORM.INFO + +## Description + + + + + Telemetry event sent after fetching the OS version + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/common/platform/platformService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/platform/platformService.node.ts) +```typescript + public version?: SemVer; + constructor() { + if (this.osType === OSType.Unknown) { + sendTelemetryEvent(EventName.PLATFORM_INFO, undefined, { + failureType: PlatformErrors.FailedToDetermineOS + }); + } +``` + + +[src/platform/common/platform/platformService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/platform/platformService.node.ts) +```typescript + try { + const ver = coerce(os.release()); + if (ver) { + sendTelemetryEvent(EventName.PLATFORM_INFO, undefined, { + osVersion: `${ver.major}.${ver.minor}.${ver.patch}` + }); + return (this.version = ver); +``` + + +[src/platform/common/platform/platformService.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/platform/platformService.node.ts) +```typescript + } + throw new Error('Unable to parse version'); + } catch (ex) { + sendTelemetryEvent(EventName.PLATFORM_INFO, undefined, { + failureType: PlatformErrors.FailedToParseVersion + }); + return parseVersion(os.release()); +``` + +
+
+ PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES + +## Description + + +No description provided + +## Properties + +- + /** + * Carries `true` if environment variables are present, `false` otherwise + * + * @type {boolean} + */ + hasEnvVars?: boolean; +- + /** + * Carries `true` if fetching environment variables failed, `false` otherwise + * + * @type {boolean} + */ + failed?: boolean; +- + /** + * Whether the environment was activated within a terminal or not. + * + * @type {boolean} + */ + activatedInTerminal?: boolean; +- + /** + * Whether the environment was activated by the wrapper class. + * If `true`, this telemetry is sent by the class that wraps the two activation providers . + * + * @type {boolean} + */ + activatedByWrapper?: boolean; + +## Locations Used + +[src/platform/common/process/pythonExecutionFactory.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/common/process/pythonExecutionFactory.node.ts) +```typescript + options.allowEnvironmentFetchExceptions + ); + const hasEnvVars = envVars && Object.keys(envVars).length > 0; + sendTelemetryEvent(EventName.PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES, undefined, { hasEnvVars }); + if (!hasEnvVars) { + return this.create({ + resource: options.resource, +``` + +
+
+ TERMINAL_ENV_VAR_EXTRACTION + +## Description + + + + + Telemetry sent only when we fail to extract the env variables for a shell. + +## Properties + + +No properties for event + + +## Locations Used + +[src/platform/terminals/helper.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/terminals/helper.node.ts) +```typescript + terminal?: Terminal + ): Promise<{ env?: NodeJS.ProcessEnv; shell: TerminalShellType }> { + if (this.platform.osType === OSType.Unknown) { + sendTelemetryEvent(Telemetry.TerminalEnvVariableExtraction, undefined, { + failed: true, + reason: 'unknownOs', + shellType: undefined +``` + + +[src/platform/terminals/helper.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/terminals/helper.node.ts) +```typescript + return { env, shell }; + } catch (ex) { + traceError('Failed to extract environment variables', ex); + sendTelemetryEvent(Telemetry.TerminalEnvVariableExtraction, undefined, { + failed: true, + reason: failureReason, + shellType: shell +``` + +
+
+ TERMINAL_SHELL_IDENTIFICATION + +## Description + + + + Telemetry event sent to provide information on whether we have successfully identify the type of shell used. + This information is useful in determining how well we identify shells on users machines. + This impacts extraction of env variables from current shell. + So, the better this works, the better it is for the user. + failed - If true, indicates we have failed to identify the shell. Note this impacts impacts ability to activate environments in the terminal & code. + shellIdentificationSource - How was the shell identified. One of 'terminalName' | 'settings' | 'environment' | 'default' + If terminalName, then this means we identified the type of the shell based on the name of the terminal. + If settings, then this means we identified the type of the shell based on user settings in VS Code. + If environment, then this means we identified the type of the shell based on their environment (env variables, etc). + I.e. their default OS Shell. + If default, then we reverted to OS defaults (cmd on windows, and bash on the rest). + This is the worst case scenario. + I.e. we could not identify the shell at all. + hasCustomShell - If undefined (not set), we didn't check. + If true, user has customzied their shell in VSC Settings. + hasShellInEnv - If undefined (not set), we didn't check. + If true, user has a shell in their environment. + If false, user does not have a shell in their environment. + +## Properties + +- + failed: boolean; +- + reason: 'unknownShell' | undefined; +- + terminalProvided: boolean; +- + shellIdentificationSource: 'terminalName' | 'settings' | 'environment' | 'default' | 'vscode'; +- + hasCustomShell: undefined | boolean; +- + hasShellInEnv: undefined | boolean; + +## Locations Used + +[src/platform/terminals/shellDetector.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/terminals/shellDetector.node.ts) +```typescript + // This information is useful in determining how well we identify shells on users machines. + // This impacts executing code in terminals and activation of environments in terminal. + // So, the better this works, the better it is for the user. + sendTelemetryEvent(Telemetry.TerminalShellIdentification, undefined, telemetryProperties); + traceVerbose(`Shell identified as '${shell}'`); + + // If we could not identify the shell, use the defaults. +``` + +
diff --git a/src/platform/tools/telemetryGenerator.node.ts b/src/platform/tools/telemetryGenerator.node.ts index e1b0b243054..9aaee89386a 100644 --- a/src/platform/tools/telemetryGenerator.node.ts +++ b/src/platform/tools/telemetryGenerator.node.ts @@ -332,8 +332,8 @@ function generateDocumentation(fileNames: string[], options: ts.CompilerOptions) const refSourceFile = program?.getSourceFile(r.fileName); if (refSourceFile) { const refNode = findNode(refSourceFile, r.textSpan.start); - // See if this is the special 'types.ts' file that forces telemetry to be type safe - if (refNode && r.fileName.endsWith('src/telemetry/types.ts')) { + // See if this is the special 'telemetry.ts' file that forces telemetry to be type safe + if (refNode && r.fileName.endsWith('src/telemetry.ts')) { entries.push( generateTelemetryEntry( program!, From 873bc2e45e5979b0a1219f5333acb921884553d6 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 22 Jun 2022 13:53:23 -0700 Subject: [PATCH 5/6] Re export is not working with tests. --- src/test/common/experiments/service.unit.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/common/experiments/service.unit.test.ts b/src/test/common/experiments/service.unit.test.ts index 5e11d34097d..8ecee21a7b9 100644 --- a/src/test/common/experiments/service.unit.test.ts +++ b/src/test/common/experiments/service.unit.test.ts @@ -13,7 +13,7 @@ import { WorkspaceService } from '../../../platform/common/application/workspace import { ConfigurationService } from '../../../platform/common/configuration/service.node'; import { ExperimentService } from '../../../platform/common/experiments/service'; import { IConfigurationService } from '../../../platform/common/types'; -import * as Telemetry from '../../../telemetry'; +import * as Telemetry from '../../../platform/telemetry/index'; import { EventName } from '../../../platform/telemetry/constants'; import { JVSC_EXTENSION_ID_FOR_TESTS } from '../../constants.node'; import { MockOutputChannel } from '../../mockClasses'; From ea87a1455e034e0021604c708ed924482324d6d8 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 22 Jun 2022 14:34:53 -0700 Subject: [PATCH 6/6] fix experiment tests --- src/test/common/experiments/telemetry.unit.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/common/experiments/telemetry.unit.test.ts b/src/test/common/experiments/telemetry.unit.test.ts index 09fd241a851..05e878d8ec8 100644 --- a/src/test/common/experiments/telemetry.unit.test.ts +++ b/src/test/common/experiments/telemetry.unit.test.ts @@ -6,7 +6,7 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import { ExperimentationTelemetry } from '../../../platform/common/experiments/telemetry.node'; -import * as Telemetry from '../../../telemetry'; +import * as Telemetry from '../../../platform/telemetry/index'; suite('Experimentation telemetry', () => { const event = 'SomeEventName';