Skip to content

feat: Introduce instrumentation tooling in the Web IDE

Implements basic infrastructure to track events happening in the VSCode fork and the Web IDE extension.

Implementation details

Tracking sources

Tracking events have two sources: The VSCode fork and the Web IDE VSCode extension. These packages send tracking messages that contain one or more tracking events.

Web IDE VSCode extension

The Web IDE sends tracking events using the trackEvent mediator command.

sequenceDiagram
    participant A as web-ide-vscode-extension
    participant B as vscode-mediator-commands
    participant C as @gitlab/web-ide
    participant D as GitLab application
    A->>+B: trackEvent(event)
    B->>-C: postMessage('web-ide-tracking', event)
    Note right of A: iframe
    Note right of C: container window
    activate C
    C->>+D: handleTracking(event)
    deactivate C

VSCode fork

The Web IDE re-routes logs produced by the VSCode fork TelemetryService to the GitLab application. The Web IDE translates the event names used by VSCode into TrackingEvent instances. If a VSCode’s tracking event doesn’t have an equivalent TrackingEvent type, the Web IDE will ignore it.

sequenceDiagram
    participant A as vscode-fork
    participant B as @gitlab/web-ide
    participant C as GitLab application
    activate B
    A->>B: postMessage('vscode-tracking', event)
    Note right of A: iframe
    Note right of B: container window
    B->>+C: handleTracking · mapToTrackingEvent(event)
    deactivate B

Related work

This merge request is related to gitlab-web-ide-vscode-fork!34 (merged) which replaces VSCode’s telemetry service with an alternative that re-routes telemetry events to the Web IDE iframe container.

Edited by Enrique Alcántara

Merge request reports

Loading