-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/goInstallTools,goTelemetry: add TelemetryReporter
TelemetryReporter buffers counter updates and periodically invokes a go program (vscgo) that writes the counter to the disk. installVCSGO in goInstallTools.ts installs vscgo. If vscgo installation fails, TelemetryReporter will keep holding the counter in memory. The buffer is a set keyed by the counter and we expect there is a finite set of counters. That installs the vscgo binary in the extension path. The location was chosen so that when users update the extension, a new version can be installed. VS Code will manage the extension path and delete the directory when the extension is uninstalled or the version is no longer used. The extension operates in four different modes and we need to choose how to build the vscgo. The extension includes the vscgo main package source file in it. 1) golang.go, stable/rc releases: PRODUCTION mode. try to install from the remote source (proxy) so its checksum is verified and build version and telemetry counter file matches the extension version. The source repo needs to be tagged. In case of failure, we attempt to fallback to the build with the source code included in the extension. 2) golang.go-nightly, preview release: PRODUCTION mode. Nightly is released daily automatically. Tagging the repo everyday is not practical. Moreover, the nightly extension does not use semver but encodes the release timestamp, so it is not compatible with go commands. Installing from @master or @latest isn't ideal either since vscgo functionality is tied with the extension version. The telemetry data will be labeled with `devel` version. 3) golang.go, preview release: PRODUCTION mode. Used for local testing during development (e.g. npm run package & code --install-extension). The version will include `-dev`. We want to build from the local source included in the extension since there is no usable tag in the remote origin. The telemetry data will be labeled with `devel` version. 4) golang.go, preview release: DEVELOPMENT mode. Used for local testing using the launch.json configuration. VS Code will use the project source code as the extension path. Build vscgo from the project repo on disk. The telemetry data will be labeled with `devel` version. 5) golang.go, preview release: TEST mode. Currently same as 4. No telemetry data is materialized. Tests that are designed for telemetry testing write test data in temporary text file for inspection during tests. For #3023 Change-Id: Ic408e7b296fdcb9ed33b68293ea82f5e29a81515 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/549244 Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Suzy Mueller <suzmue@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com>
- Loading branch information
Showing
9 changed files
with
337 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
bin/ | ||
out/ | ||
dist/ | ||
node_modules/ | ||
.vscode-test/ | ||
.DS_Store | ||
.user-data-dir-test/ | ||
.user-data-dir-test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.