Skip to content

Add UnhandledError telemetry error report #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 23, 2022
Merged

Conversation

mustard-mh
Copy link

@mustard-mh mustard-mh commented Sep 20, 2022

Add UnhandledError telemetry error report

How to Test

Use latest code and open workspace in preview env https://hw-vserror-report.preview.gitpod-dev.com/workspaces

Browser Error Catch

  • Toggle browser DevTool Console, exec code below
async function willThrow(str) {
    throw new Error(str);
}
willThrow('<anything_you_want>')
  • Go to GCP error report search with what you has throwed. It should be here with service named vscode-web. Access log detail,userId workspaceId instanceId should exists
  • GCP error report should have only one message that you just sent, without service vscode-server since we filter them

Server Error Catch

TODO...

Need to add debug commit for it, but we can manually get an error by changing browser resources code, to make fromBrowser always false to make browser telemetry duplicate in server

@@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@gitpod/gitpod-protocol": "main",
"@gitpod/ide-metrics-api-grpcweb": "ak-ext-metrics",
"@gitpod/ide-metrics-api-grpcweb": "^0.0.1-main.4783",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Global search with "@gitpod/ide-metrics-api-grpcweb": "ak-ext-metrics" and found it. Why we need this dependency in the remote and remote/web folders?

cc @akosyakov

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to distribute them for web (remote/web) and backend (remote) during the build, in the root only dev time deps

@mustard-mh mustard-mh force-pushed the hw/tele-error branch 2 times, most recently from 1e7f627 to 6f5fd45 Compare September 21, 2022 18:20
@jeanp413 jeanp413 force-pushed the gp-code/main branch 2 times, most recently from 7364fa1 to a923830 Compare September 22, 2022 14:49
@mustard-mh mustard-mh marked this pull request as ready for review September 23, 2022 07:31
@mustard-mh
Copy link
Author

This error stack is omitted, since vscode thought it's private data

{ label: 'Email', regex: /@[a-zA-Z0-9-.]+/ } // Regex which matches @*.site

image

@akosyakov

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skimmed through the code, it looks like it would do what we want. Clean up history and bring it in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants