Skip to content

Add GitLab Telemetry service

Enrique Alcántara requested to merge 387056-instrument-remote-connection into main

It implements a GitLabTelemetryService class that re-routes telemetry events captured by the VSCode’s TelemetryService module to GitLab Snowplow service via iframe's postMessage API. This class replaces VSCode’s TelemetryService implementation.

Why are we doing this?

This is part of the effort to instrument two events that happen in the VSCode fork:

  • When a remote development connection is successful.
  • When a remote development connection fails.

VSCode already instruments these events in https://gitlab.com/gitlab-org/gitlab-web-ide-vscode-fork/-/blob/main/src/vs/workbench/contrib/remote/common/remote.contribution.ts#L204. Replacing the underlying telemetry service allows us to rely on the existing instrumented code to capture usage data.

Telemetry user preferences

The GitLabTelemetryService respects the user’s telemetry settings. It won’t send usage data if the user disables this telemetry level.

Screenshot_2023-02-03_at_12.11.21_PM

See for more information gitlab#387056 (closed)

Edited by Enrique Alcántara

Merge request reports