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 golang/vscode-go#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>
2023-12-12 18:56:32 +03:00
|
|
|
bin/
|
2020-07-08 05:24:04 +03:00
|
|
|
out/
|
|
|
|
dist/
|
|
|
|
node_modules/
|
|
|
|
.vscode-test/
|
2020-05-21 00:35:03 +03:00
|
|
|
.DS_Store
|
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 golang/vscode-go#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>
2023-12-12 18:56:32 +03:00
|
|
|
.user-data-dir-test/
|