Record baseUrl for OpenTerminal success/failure telemetry (#335)

This is useful to know which terminal is opening.
This commit is contained in:
Tanuj Mittal 2020-12-10 11:54:21 -08:00 committed by GitHub
parent 0532ed26a2
commit e133df18dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -59,9 +59,8 @@ const main = async (): Promise<void> => {
const serverSettings = createServerSettings(urlVars);
const startTime = TelemetryProcessor.traceStart(Action.OpenTerminal, {
baseUrl: serverSettings.baseUrl
});
const data = { baseUrl: serverSettings.baseUrl };
const startTime = TelemetryProcessor.traceStart(Action.OpenTerminal, data);
try {
if (urlVars.hasOwnProperty(TerminalQueryParams.Terminal)) {
@ -70,9 +69,9 @@ const main = async (): Promise<void> => {
throw new Error("Only terminal is supported");
}
TelemetryProcessor.traceSuccess(Action.OpenTerminal, startTime);
TelemetryProcessor.traceSuccess(Action.OpenTerminal, data, startTime);
} catch (error) {
TelemetryProcessor.traceFailure(Action.OpenTerminal, startTime);
TelemetryProcessor.traceFailure(Action.OpenTerminal, data, startTime);
}
};