Merge branch 'master' of github.com:Microsoft/vscode-iot-workbench into fix-configure-device-settings
This commit is contained in:
Коммит
0b7d551091
|
@ -6,9 +6,9 @@ import * as path from 'path';
|
|||
import * as vscode from 'vscode';
|
||||
|
||||
import {CancelOperationError} from '../CancelOperationError';
|
||||
import {ConfigKey, DevelopEnvironment, EventNames, FileNames, GlobalConstants, ScaffoldType} from '../constants';
|
||||
import {ConfigKey, EventNames, FileNames, GlobalConstants, ScaffoldType} from '../constants';
|
||||
import {FileUtility} from '../FileUtility';
|
||||
import {TelemetryContext, TelemetryProperties, TelemetryWorker} from '../telemetry';
|
||||
import {TelemetryContext, TelemetryWorker} from '../telemetry';
|
||||
import {channelShowAndAppendLine} from '../utils';
|
||||
|
||||
import {ProjectHostType} from './Interfaces/ProjectHostType';
|
||||
|
@ -51,26 +51,7 @@ export class IoTContainerizedProject extends IoTWorkbenchProjectBase {
|
|||
|
||||
// only send telemetry when the IoT project is load when VS Code opens
|
||||
if (initLoad) {
|
||||
const properties: TelemetryProperties = {
|
||||
result: 'Succeeded',
|
||||
error: '',
|
||||
errorMessage: ''
|
||||
};
|
||||
properties.developEnvironment =
|
||||
RemoteExtension.isRemote(this.extensionContext) ?
|
||||
DevelopEnvironment.Container :
|
||||
DevelopEnvironment.LocalEnv;
|
||||
properties.projectHostType = ProjectHostType[this.projectHostType];
|
||||
|
||||
const telemetryContext:
|
||||
TelemetryContext = {properties, measurements: {duration: 0}};
|
||||
|
||||
try {
|
||||
TelemetryWorker.sendEvent(
|
||||
EventNames.projectLoadEvent, telemetryContext);
|
||||
} catch {
|
||||
// If sending telemetry failed, skip the error to avoid blocking user.
|
||||
}
|
||||
this.sendTelemetryIfLoadProjectWithVSCodeOpens();
|
||||
}
|
||||
|
||||
if (this.projectRootPath !== undefined) {
|
||||
|
|
|
@ -5,9 +5,9 @@ import * as path from 'path';
|
|||
import * as vscode from 'vscode';
|
||||
|
||||
import {CancelOperationError} from '../CancelOperationError';
|
||||
import {ConfigKey, FileNames, GlobalConstants, ScaffoldType} from '../constants';
|
||||
import {ConfigKey, DevelopEnvironment, EventNames, FileNames, GlobalConstants, ScaffoldType} from '../constants';
|
||||
import {FileUtility} from '../FileUtility';
|
||||
import {TelemetryContext} from '../telemetry';
|
||||
import {TelemetryContext, TelemetryProperties, TelemetryWorker} from '../telemetry';
|
||||
import * as utils from '../utils';
|
||||
|
||||
import {checkAzureLogin} from './Apis';
|
||||
|
@ -19,6 +19,7 @@ import {ProjectHostType} from './Interfaces/ProjectHostType';
|
|||
import {ProjectTemplateType, TemplateFileInfo} from './Interfaces/ProjectTemplate';
|
||||
import {Provisionable} from './Interfaces/Provisionable';
|
||||
import {Uploadable} from './Interfaces/Uploadable';
|
||||
import {RemoteExtension} from './RemoteExtension';
|
||||
|
||||
const impor = require('impor')(__dirname);
|
||||
const azureUtilityModule =
|
||||
|
@ -349,4 +350,28 @@ export abstract class IoTWorkbenchProjectBase {
|
|||
error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send telemetry when the IoT project is load when VS Code opens
|
||||
*/
|
||||
sendTelemetryIfLoadProjectWithVSCodeOpens() {
|
||||
const properties: TelemetryProperties = {
|
||||
result: 'Succeeded',
|
||||
error: '',
|
||||
errorMessage: ''
|
||||
};
|
||||
properties.developEnvironment =
|
||||
RemoteExtension.isRemote(this.extensionContext) ?
|
||||
DevelopEnvironment.Container :
|
||||
DevelopEnvironment.LocalEnv;
|
||||
properties.projectHostType = ProjectHostType[this.projectHostType];
|
||||
const telemetryContext:
|
||||
TelemetryContext = {properties, measurements: {duration: 0}};
|
||||
|
||||
try {
|
||||
TelemetryWorker.sendEvent(EventNames.projectLoadEvent, telemetryContext);
|
||||
} catch {
|
||||
// If sending telemetry failed, skip the error to avoid blocking user.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ import * as path from 'path';
|
|||
import * as vscode from 'vscode';
|
||||
|
||||
import {ConfigHandler} from '../configHandler';
|
||||
import {ConfigKey, DevelopEnvironment, EventNames, FileNames, GlobalConstants, ScaffoldType} from '../constants';
|
||||
import {ConfigKey, EventNames, FileNames, GlobalConstants, ScaffoldType} from '../constants';
|
||||
import {FileUtility} from '../FileUtility';
|
||||
import {TelemetryContext, TelemetryProperties, TelemetryWorker} from '../telemetry';
|
||||
import {TelemetryContext, TelemetryWorker} from '../telemetry';
|
||||
import {channelShowAndAppendLine} from '../utils';
|
||||
|
||||
import {Dependency} from './AzureComponentConfig';
|
||||
|
@ -17,7 +17,6 @@ import {ProjectHostType} from './Interfaces/ProjectHostType';
|
|||
import {ProjectTemplateType, TemplateFileInfo} from './Interfaces/ProjectTemplate';
|
||||
import {Workspace} from './Interfaces/Workspace';
|
||||
import {IoTWorkbenchProjectBase} from './IoTWorkbenchProjectBase';
|
||||
import {RemoteExtension} from './RemoteExtension';
|
||||
|
||||
const impor = require('impor')(__dirname);
|
||||
const az3166DeviceModule =
|
||||
|
@ -71,25 +70,7 @@ export class IoTWorkspaceProject extends IoTWorkbenchProjectBase {
|
|||
|
||||
// only send telemetry when the IoT project is load when VS Code opens
|
||||
if (initLoad) {
|
||||
const properties: TelemetryProperties = {
|
||||
result: 'Succeeded',
|
||||
error: '',
|
||||
errorMessage: ''
|
||||
};
|
||||
properties.developEnvironment =
|
||||
RemoteExtension.isRemote(this.extensionContext) ?
|
||||
DevelopEnvironment.Container :
|
||||
DevelopEnvironment.LocalEnv;
|
||||
properties.projectHostType = ProjectHostType[this.projectHostType];
|
||||
const telemetryContext:
|
||||
TelemetryContext = {properties, measurements: {duration: 0}};
|
||||
|
||||
try {
|
||||
TelemetryWorker.sendEvent(
|
||||
EventNames.projectLoadEvent, telemetryContext);
|
||||
} catch {
|
||||
// If sending telemetry failed, skip the error to avoid blocking user.
|
||||
}
|
||||
this.sendTelemetryIfLoadProjectWithVSCodeOpens();
|
||||
}
|
||||
|
||||
const azureConfigFileHandler =
|
||||
|
|
Загрузка…
Ссылка в новой задаче