@@ -75,7 +75,7 @@ export interface WorkspaceInstance {
75
75
// WorkspaceInstanceStatus describes the current state of a workspace instance
76
76
export interface WorkspaceInstanceStatus {
77
77
// 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
79
79
// a partial order on status updates, i.e. a.version > b.version -> a newer than b.
80
80
version ?: number ;
81
81
@@ -105,6 +105,9 @@ export interface WorkspaceInstanceStatus {
105
105
106
106
// ownerToken is the token one needs to access the workspace. Its presence is checked by ws-proxy.
107
107
ownerToken ?: string ;
108
+
109
+ // metrics contains metrics about the workspace instance
110
+ metrics ?: WorkspaceInstanceMetrics ;
108
111
}
109
112
110
113
// WorkspaceInstancePhase describes a high-level state of a workspace instance
@@ -122,11 +125,11 @@ export type WorkspaceInstancePhase =
122
125
| "building"
123
126
124
127
// 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
126
129
// workspace, the workspace will be in Pending state until that happened.
127
130
| "pending"
128
131
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
130
133
// to run the workspace over the network. The time spent in this phase varies widely and depends on the current
131
134
// network speed, image size and cache states.
132
135
| "creating"
@@ -193,7 +196,7 @@ export interface WorkspaceInstancePort {
193
196
// The outward-facing port number
194
197
port : number ;
195
198
196
- // The visiblity of this port. Optional for backwards compatibility.
199
+ // The visibility of this port. Optional for backwards compatibility.
197
200
visibility ?: PortVisibility ;
198
201
199
202
// Public, outward-facing URL where the port can be accessed on.
@@ -280,7 +283,7 @@ export interface IdeSetup {
280
283
// WorkspaceInstanceConfiguration contains all per-instance configuration
281
284
export interface WorkspaceInstanceConfiguration {
282
285
// theiaVersion is the version of Theia this workspace instance uses
283
- // @deprected : replaced with the ideImage field
286
+ // @deprecated : replaced with the ideImage field
284
287
theiaVersion ?: string ;
285
288
286
289
// feature flags are the lowercase feature-flag names as passed to ws-manager
@@ -324,3 +327,19 @@ export interface ImageBuildLogInfo {
324
327
url : string ;
325
328
headers : { [ key : string ] : string } ;
326
329
}
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