@@ -75,7 +75,7 @@ export interface WorkspaceInstance {
7575// WorkspaceInstanceStatus describes the current state of a workspace instance
7676export interface WorkspaceInstanceStatus {
7777 // version is the current version of the workspace instance status
78- // Note: consider this value opague . The only guarantee given is that it imposes
78+ // Note: consider this value opaque . The only guarantee given is that it imposes
7979 // a partial order on status updates, i.e. a.version > b.version -> a newer than b.
8080 version ?: number ;
8181
@@ -105,6 +105,9 @@ export interface WorkspaceInstanceStatus {
105105
106106 // ownerToken is the token one needs to access the workspace. Its presence is checked by ws-proxy.
107107 ownerToken ?: string ;
108+
109+ // metrics contains metrics about the workspace instance
110+ metrics ?: WorkspaceInstanceMetrics ;
108111}
109112
110113// WorkspaceInstancePhase describes a high-level state of a workspace instance
@@ -122,11 +125,11 @@ export type WorkspaceInstancePhase =
122125 | "building"
123126
124127 // Pending means the workspace does not yet consume resources in the cluster, but rather is looking for
125- // some space within the cluster. If for example the cluster needs to scale up to accomodate the
128+ // some space within the cluster. If for example the cluster needs to scale up to accommodate the
126129 // workspace, the workspace will be in Pending state until that happened.
127130 | "pending"
128131
129- // Creating means the workspace is currently being created. Thati includes downloading the images required
132+ // Creating means the workspace is currently being created. That includes downloading the images required
130133 // to run the workspace over the network. The time spent in this phase varies widely and depends on the current
131134 // network speed, image size and cache states.
132135 | "creating"
@@ -193,7 +196,7 @@ export interface WorkspaceInstancePort {
193196 // The outward-facing port number
194197 port : number ;
195198
196- // The visiblity of this port. Optional for backwards compatibility.
199+ // The visibility of this port. Optional for backwards compatibility.
197200 visibility ?: PortVisibility ;
198201
199202 // Public, outward-facing URL where the port can be accessed on.
@@ -280,7 +283,7 @@ export interface IdeSetup {
280283// WorkspaceInstanceConfiguration contains all per-instance configuration
281284export interface WorkspaceInstanceConfiguration {
282285 // theiaVersion is the version of Theia this workspace instance uses
283- // @deprected : replaced with the ideImage field
286+ // @deprecated : replaced with the ideImage field
284287 theiaVersion ?: string ;
285288
286289 // feature flags are the lowercase feature-flag names as passed to ws-manager
@@ -324,3 +327,19 @@ export interface ImageBuildLogInfo {
324327 url : string ;
325328 headers : { [ key : string ] : string } ;
326329}
330+
331+ /**
332+ * Holds metrics about the workspace instance
333+ */
334+ export interface WorkspaceInstanceMetrics {
335+ image ?: Partial < {
336+ /**
337+ * the total size of the image in bytes (includes Gitpod-specific layers like IDE)
338+ */
339+ totalSize : number ;
340+ /**
341+ * the size of the workspace image in bytes
342+ */
343+ workspaceImageSize : number ;
344+ } > ;
345+ }
0 commit comments