From e133df18dde0f17e717ce9ad058bcecc3f82ea7b Mon Sep 17 00:00:00 2001 From: Tanuj Mittal Date: Thu, 10 Dec 2020 11:54:21 -0800 Subject: [PATCH] Record baseUrl for OpenTerminal success/failure telemetry (#335) This is useful to know which terminal is opening. --- src/Terminal/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Terminal/index.ts b/src/Terminal/index.ts index 79c8a8809..7b49dde8b 100644 --- a/src/Terminal/index.ts +++ b/src/Terminal/index.ts @@ -59,9 +59,8 @@ const main = async (): Promise => { 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 => { 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); } };