Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Presumably so someone installing for the first time can install an older version where they can set the toggle before upgrading to when the toggle is removed?


Maybe there's a misunderstanding. The old toggle is deprecated, but the plan is that you will always be able to use it. The new toggle is just a different setting and can still be used there on newer versions ("telemetry.telemetryLevel": "off").


And how do both toggles combine? Is this the implemented truth table?

  telemetryLevel  newTelemetryLevel  result
  off             off                no telemetry sent
  on              off                telemetry sent
  off             on                 telemetry sent
  on              on                 telemetry sent


It used the most restrictive setting. [1]

> @john-aws It does respect your prior settings. If you disabled telemetry before it will still be disabled even though telemetryLevel is set to "on" by default. We always take the most restrictive of the two settings. You can confirm this by setting Log level to trace and seeing no telemetry is flowing in the output channel. The old setting will never be completely removed to prevent enablement of people who previously disabled telemetry but it is deprecated so we recommend setting this new setting to "off" and removing the older settings from your settings.json

So the truth table would look like this :

  telemetryLevel  newTelemetryLevel  result
  off             off                no telemetry sent
  on              off                no telemetry sent
  off             on                 no telemetry sent
  on              on                 telemetry sent
The new telemetry level can be set to Off, Error, On.

The actual code is on github[2] and looks like this :

   const newConfig = configurationService.getValue<TelemetryConfiguration>(TELEMETRY_SETTING_ID);
   const oldConfig = configurationService.getValue(TELEMETRY_OLD_SETTING_ID);
  
   // Check old config for disablement
   if (oldConfig !== undefined && oldConfig === false) {
    return TelemetryLevel.NONE;
   }
  
   switch (newConfig ?? TelemetryConfiguration.ON) {
    case TelemetryConfiguration.ON:
     return TelemetryLevel.USAGE;
    case TelemetryConfiguration.ERROR:
     return TelemetryLevel.ERROR;
    case TelemetryConfiguration.OFF:
     return TelemetryLevel.NONE;
   }
[1] https://github.com/microsoft/vscode/issues/134660#issuecomme...

[2] https://github.com/microsoft/vscode/blob/be75065e817ebd7b625...


https://github.com/microsoft/vscode/blob/be75065e817ebd7b625...

If either are 'off', it's sending no data. The new one also allows you to only send error logs, so the truth table would be more complex.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: