mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 23:16:56 +00:00
Record baseUrl for OpenTerminal success/failure telemetry (#335)
This is useful to know which terminal is opening.
This commit is contained in:
parent
0532ed26a2
commit
e133df18dd
@ -59,9 +59,8 @@ const main = async (): Promise<void> => {
|
|||||||
|
|
||||||
const serverSettings = createServerSettings(urlVars);
|
const serverSettings = createServerSettings(urlVars);
|
||||||
|
|
||||||
const startTime = TelemetryProcessor.traceStart(Action.OpenTerminal, {
|
const data = { baseUrl: serverSettings.baseUrl };
|
||||||
baseUrl: serverSettings.baseUrl
|
const startTime = TelemetryProcessor.traceStart(Action.OpenTerminal, data);
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (urlVars.hasOwnProperty(TerminalQueryParams.Terminal)) {
|
if (urlVars.hasOwnProperty(TerminalQueryParams.Terminal)) {
|
||||||
@ -70,9 +69,9 @@ const main = async (): Promise<void> => {
|
|||||||
throw new Error("Only terminal is supported");
|
throw new Error("Only terminal is supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
TelemetryProcessor.traceSuccess(Action.OpenTerminal, startTime);
|
TelemetryProcessor.traceSuccess(Action.OpenTerminal, data, startTime);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
TelemetryProcessor.traceFailure(Action.OpenTerminal, startTime);
|
TelemetryProcessor.traceFailure(Action.OpenTerminal, data, startTime);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user