Skip to content

Ensure telemetry is not sent when telemetry is disabled #1116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
immanuelfodor opened this issue Oct 26, 2019 · 10 comments
Closed

Ensure telemetry is not sent when telemetry is disabled #1116

immanuelfodor opened this issue Oct 26, 2019 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@immanuelfodor
Copy link

Description

Why is code-server (v2 latest Docker) trying to access dc.services.visualstudio.com when telemetry is being disabled? I've found this question online that tells it's application insights. It might not be true anymore but do you know what it's used for? Shouldn't it be disabled by the telemetry disabler flag if it's analytics? As far as I can tell from the DNS logs, it seems to be requested around docker-compose up -d.

@immanuelfodor
Copy link
Author

Well, after further thought, it seems it's included in some extensions. Shouldn't these be affected by the "global" telemetry disable flag?

❯ grep -o -R 'dc.services.visualstudio.com' .
./settings/extensions/ms-python.python-2019.9.34911/out/client/extension.js.map.disabled:dc.services.visualstudio.com                                         
./settings/extensions/ms-python.python-2019.9.34911/out/client/extension.js:dc.services.visualstudio.com                                                      
./settings/extensions/ms-python.python-2019.9.34911/out/client/debugger/debugAdapter/main.js.map.disabled:dc.services.visualstudio.com                        
./settings/extensions/ms-python.python-2019.9.34911/out/client/debugger/debugAdapter/main.js:dc.services.visualstudio.com                                     
./settings/extensions/peterjausovec.vscode-docker-0.6.2/dist/extension.bundle.js:dc.services.visualstudio.com                                                 
./settings/extensions/bmewburn.vscode-intelephense-client-1.2.3/node_modules/intelephense/lib/intelephense.js:dc.services.visualstudio.com

@sr229
Copy link
Contributor

sr229 commented Oct 26, 2019

@immanuelfodor we'll investigate. But I think we were already passing that since we just proxy VSCode flags.

@sr229 sr229 added bug Something isn't working and removed question labels Oct 26, 2019
@code-asher
Copy link
Member

I'm not entirely certain if the --disable-telemetry flag is supposed to affect extensions. It seems to only affect the main VS Code process by design but I might be wrong about that.

We were missing the telemetry option in the settings though so I added it. Extensions appear to read that setting so disabling it should stop extensions from sending telemetry. Should have a new release out some time today with that change.

@immanuelfodor
Copy link
Author

Thanks for the update, sounds good! I think we can close this issue if you no longer need it open for workflow purposes.

@code-asher
Copy link
Member

code-asher commented Nov 7, 2019 via email

@immanuelfodor
Copy link
Author

Well, it seems the issue still exists but in a weirder way. After upgrading to the latest version, the global telemetry option is checked even though the app is started with disable telemetry option. I'm pretty sure this was unchecked before the upgrade.
My compose file is below, and I removed then reinstalled the "PHP Intelephense" plugin after the docker update, this is what I got in the VSCode settings and in the DNS logs:

image

image

Since I blocked the telemetry domain on the DNS level, it couldn't phone home but still annoying that it doesn't do what it should.

version: "3"

services:
  code-server:
    container_name: code-server
    image: codercom/code-server:v2
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - "./settings:/home/coder/.local/share/code-server"
      - "./project:/home/coder/project"
    environment:
      - PASSWORD=hello
    command: --allow-http --disable-telemetry --auth=password
    dns:
      - 192.168.1.2
      - 192.168.1.3

@immanuelfodor
Copy link
Author

For another test, I've just unchecked the main telemetry option, did a simple local docker compose down and up, then removed and reinstalled the PHP plugin. The unchecked main telemetry option after the container recreation it's still unchecked (as it should be, it might read the persisted settings JSON), but there is another telemetry DNS log entry as the latest call probably from the plugin. It says its setting is inherited but somehow it's still leaking. And adding the main telemetry option becoming enabled on upgrade in the previous comment is weird.

image

image

@code-asher
Copy link
Member

Thank you for testing this!

I think we might want to modify --disable-telemetry to force that main setting and any sub-settings to off. It seems like VS Code just doesn't do that by default for some reason even though to me that's confusing.

Does it only make the one request? I think when telemetry is disabled it might still send
one request saying that telemetry is disabled (which is pretty lame IMO).

@immanuelfodor
Copy link
Author

Well, I can't be sure as I don't know the internals on this depth but I've just opened it in a new tab with a PHP file and there is another blocked entry in the DNS log.

@code-asher
Copy link
Member

OK, thanks for the report. 👍 I'll check it out and see if I can figure out what's going on.

@nhooyr nhooyr changed the title [v2] Multiple requests to tracker when telemetry disabled? Ensure telemetry is not sent when telemetry is disabled Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants