Skip to content

Ensure telemetry is not sent when telemetry is disabled #1116

Closed

Description

@immanuelfodor

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.

Activity

  1. immanuelfodor commented on Oct 26, 2019

    @immanuelfodor
    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
    
  2. sr229 commented on Oct 26, 2019

    @sr229
    Contributor

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

  3. added
    bugSomething isn't working
    and removed on Oct 26, 2019
  4. code-asher commented on Nov 7, 2019

    @code-asher
    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.

  5. immanuelfodor commented on Nov 7, 2019

    @immanuelfodor
    Author

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

  6. code-asher commented on Nov 7, 2019

    @code-asher
    Member
  7. immanuelfodor commented on Nov 8, 2019

    @immanuelfodor
    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
  8. immanuelfodor commented on Nov 8, 2019

    @immanuelfodor
    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

  9. code-asher commented on Nov 14, 2019

    @code-asher
    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).

  10. immanuelfodor commented on Nov 15, 2019

    @immanuelfodor
    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.

  11. code-asher commented on Nov 18, 2019

    @code-asher
    Member

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

  12. changed the title [-][v2] Multiple requests to tracker when telemetry disabled?[/-] [+]Ensure telemetry is not sent when telemetry is disabled[/+] on Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions