Skip to content

[gp-code] measure all sessions vs errored sessions #428

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 1 commit into from
Sep 16, 2022

Conversation

filiptronicek
Copy link
Member

See gitpod-io/gitpod#12702 for details

@filiptronicek filiptronicek force-pushed the ft/measure-errored-percent-sessions branch 3 times, most recently from 84afe45 to f0949e3 Compare September 12, 2022 21:35
Comment on lines 62 to 65
if (resourceSource.match(new RegExp(/\/build\/ide\/code:.+\/__files__\//g))) {
// TODO(ak) reconsider how to hide knowledge of VS Code from supervisor frontend, i.e instrument amd loader instead
labels['resource'] = 'vscode-web-workbench';
}
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder if this check is relevant here, because we are checking for errors in the whole window and there may be resources like in <iframe>s which may trigger this, so the check is perhaps justified here.

@filiptronicek filiptronicek force-pushed the ft/measure-errored-percent-sessions branch from f0949e3 to 6fc5d45 Compare September 13, 2022 10:30
@akosyakov akosyakov force-pushed the ft/measure-errored-percent-sessions branch from 6fc5d45 to 815cfe0 Compare September 14, 2022 12:39
@mustard-mh mustard-mh force-pushed the ft/measure-errored-percent-sessions branch from 357e46d to c2e7e9c Compare September 14, 2022 17:40
const headers: http.OutgoingHttpHeaders = {
'Content-Type': 'text/html',
'Content-Security-Policy': cspDirectives
'Content-Security-Policy': this._environmentService.isBuilt ? cspDirectives : allowAllCSP
Copy link

@mustard-mh mustard-mh Sep 14, 2022

Choose a reason for hiding this comment

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

Add this to make workbench.html onerror works in dev mode. allowAllCSP value comes from stackoverflow

Copy link

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

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

@mustard-mh mustard-mh force-pushed the ft/measure-errored-percent-sessions branch from c2e7e9c to e2c44a2 Compare September 15, 2022 15:17
Copy link

@iQQBot iQQBot left a comment

Choose a reason for hiding this comment

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

@mustard-mh mustard-mh merged commit 8ccf7ff into gp-code/main Sep 16, 2022
@mustard-mh mustard-mh deleted the ft/measure-errored-percent-sessions branch September 16, 2022 06:18
}
url.pathname = '/metrics-api';
return url.toString();
let workspaceId = null;
Copy link
Member

Choose a reason for hiding this comment

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

@mustard-mh we should be careful with creating global variables, we had gitpodMetricsAddCounter on purpose to avoid polluting global scope


// TODO collect errors, we can capture resourceSource, error if possible with stack, message, name, and window URL
Copy link
Member

Choose a reason for hiding this comment

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

@mustard-mh it is done?

Copy link

@mustard-mh mustard-mh Sep 16, 2022

Choose a reason for hiding this comment

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

I'll clean some comments up by push commit to gp-code/main, and improve this #428 (comment)

<script type="text/javascript" src="/_supervisor/frontend/main.js" onerror="onVsCodeWorkbenchError(event)" charset="utf-8"></script>
<script src="./static/out/vs/loader.js" onerror="onVsCodeWorkbenchError(event)" ></script>
<script src="./static/out/vs/webPackagePaths.js" onerror="onVsCodeWorkbenchError(event)" ></script>
<script type="text/javascript" src="/_supervisor/frontend/main.js" onerror="onVsCodeWorkbenchError(event)" charset="utf-8" crossorigin="anonymous"></script>
Copy link
Member

@akosyakov akosyakov Sep 16, 2022

Choose a reason for hiding this comment

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

@mustard-mh crossorigin="anonymous" it does not seem you are making use of it, i.e. idea was to add it if we want to collect information about script errors, onVsCodeWorkbenchError should report them too then

Choose a reason for hiding this comment

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

If we add this, supervisor frontend can use it too

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.

4 participants