Skip to content

Commit

Permalink
[code] Track vsc_opened when IDE is open
Browse files Browse the repository at this point in the history
  • Loading branch information
csweichel authored and roboquat committed Jul 26, 2021
1 parent 143d8d9 commit 89db73e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/server/src/workspace/workspace-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ export class WorkspaceStarter {
"function:getEnvVars",
"function:setEnvVar",
"function:deleteEnvVar",
"function:trackEvent",

"resource:"+ScopedResourceGuard.marshalResourceScope({kind: "workspace", subjectID: workspace.id, operations: ["get", "update"]}),
"resource:"+ScopedResourceGuard.marshalResourceScope({kind: "workspaceInstance", subjectID: instance.id, operations: ["get", "update", "delete"]}),
Expand Down
9 changes: 9 additions & 0 deletions components/supervisor/frontend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ const loadingIDE = new Promise(resolve => window.addEventListener('DOMContentLoa
ideService.onDidChange(() => {
updateLoadingState();
updateCurrentFrame();

window.gitpod.service.server.trackEvent({
event: "status_rendered",
properties: {
workspaceId: gitpodServiceClient.info.latestInstance?.workspaceId,
phase: `ide-${ideService.state}`,
error: ideService.failureCause?.message,
},
});
});
//#endregion

Expand Down

0 comments on commit 89db73e

Please sign in to comment.