-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add WS image metrics to workspace instances #20426
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
Conversation
| @@ -1,4 +1,4 @@ | |||
| // Copyright (c) 2023 Gitpod GmbH. All rights reserved. | |||
| // Copyright (c) 2024 Gitpod GmbH. All rights reserved. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@filiptronicek let's revert copyright changes (I thought it means copyright since? But I'm not sure why generated files need copyright)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to keep the year changes, since otherwise we'll have to keep reverting them every time. I don't see it being too harmful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| */ | ||
| export interface WorkspaceInstanceMetrics { | ||
| image?: Partial<{ | ||
| totalSize: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments would be 🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in b8de461 (#20426) 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, tested and works! ✔️

Description
Adds workspace instance metrics to track image sizes. This includes storing metrics in the database, exposing them through the workspace instance status, and making them available via the API's
WorkspaceService.ListWorkspaceSessionsendpoint.Related Issue(s)
Fixes CLC-1016
How to test
https://ft-add-ws-3faf28c13f.preview.gitpod-dev.com/workspaces
Try this in your browser console after starting a workspace (fill in your org ID or join mine so you don't have to):
Under a workspace session in the response, you should see a
metricsfield.