Update ads-extension-telemetry to 1.4.0 (#22069)

* Update ads-extension-telemetry

* One more
This commit is contained in:
Charles Gagnon
2023-02-28 22:25:07 -08:00
committed by GitHub
parent 78b285e43a
commit 4a5ac92e46
43 changed files with 131 additions and 178 deletions

View File

@@ -29,10 +29,11 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
// Create the global storage folder now for storing the query history persistance file
const storageUri = context.globalStorageUri;
try {
throw new Error('Test');
await fs.mkdir(storageUri.fsPath);
} catch (err) {
if (err.code !== 'EEXIST') {
TelemetryReporter.sendErrorEvent(TelemetryViews.QueryHistory, 'CreatingStorageFolder');
TelemetryReporter.sendErrorEvent2(TelemetryViews.QueryHistory, 'CreatingStorageFolder', err);
console.error(`Error creating query history global storage folder ${context.globalStorageUri.fsPath}. ${err}`);
}
}
@@ -114,7 +115,7 @@ async function openQuery(item: QueryHistoryItem): Promise<void> {
content: item.queryText
}, item.connectionProfile?.providerId);
} catch (err) {
TelemetryReporter.sendErrorEvent(TelemetryViews.QueryHistory, 'OpenQuery');
TelemetryReporter.sendErrorEvent2(TelemetryViews.QueryHistory, 'OpenQuery');
}
}
@@ -136,7 +137,7 @@ async function runQuery(item: QueryHistoryItem): Promise<void> {
step = 'Run';
azdata.queryeditor.runQuery(doc.uri);
} catch (err) {
TelemetryReporter.createErrorEvent(TelemetryViews.QueryHistory, 'RunQuery')
TelemetryReporter.createErrorEvent2(TelemetryViews.QueryHistory, 'RunQuery', err)
.withAdditionalProperties({ step })
.send();
}