microsoft/vscode-extension-telemetry

common.remotename shows "other" for wsl

swatDong opened this issue · 1 comments

I'm trying to distinguish WSL telemetries, but property common.remotename shows other when testing on WSL.

README says that "other indicates a remote connection not from the 3 main extensions (ssh, docker, wsl)."

I tried following code to send telemetry (I'm using "vscode-extension-telemetry": "^0.4.3"):

const telemetryClient = new TelemetryReporter(extensionId, extensionVersion, key);
telemetryClient.sendTelemetryEvent(
    "test-event",
    {
        "process.env.TESTER": process.env.TESTER as string,
        "vscode.env.remoteName": vscode.env.remoteName as string,
    }
);

And the event in my AppInsights has following properties:

{
    "common.extversion":"0.0.1",
    "common.platformversion":"5.10.60",
    "common.product":"desktop",
    "common.os":"linux",
    "common.remotename":"other",
    "common.uikind":"desktop",
    "common.vscodeversion":"1.63.2",
    ...
    "process.env.TESTER":"tester-from-wsl",
    "vscode.env.remoteName":"wsl",
    ...
}

So vscode.env.remoteName is wsl but the telemetry property common.remotename shows other.

Here's a code pointer.

Looks like it should be doing the right thing

private cleanRemoteName(remoteName?: string): string {
if (!remoteName) {
return "none";
}
let ret = "other";
// Allowed remote authorities
["ssh-remote", "dev-container", "attached-container", "wsl", "codespaces"].forEach((res: string) => {
if (remoteName!.indexOf(`${res}+`) === 0) {
ret = res;
}
});
return ret;
}