@@ -939,6 +939,48 @@ message WorkspaceSession {
939939
940940 // total_image_size is the total size of the image in bytes (includes Gitpod-specific layers like IDE)
941941 int64 total_image_size = 2 ;
942+
943+ // initializer_metrics are all metrics exported from the content initializer on workspace start
944+ InitializerMetrics initializer_metrics = 3 ;
945+ }
946+
947+ // Add these new message definitions
948+ message InitializerMetric {
949+ // duration in seconds
950+ google.protobuf.Duration duration = 1 ;
951+
952+ // size in bytes
953+ uint64 size = 2 ;
954+ }
955+
956+ message InitializerMetrics {
957+ // git contains metrics for the git initializer step
958+ // This is set whenever a `git clone` is issued (mostly on first workspace start)
959+ InitializerMetric git = 1 ;
960+
961+ // file_download contains metrics for the file download initializer step
962+ // This is set for injecting "additionalFiles" into the workspace.
963+ InitializerMetric file_download = 2 ;
964+
965+ // snapshot contains metrics for the snapshot initializer step
966+ // This used for workspaces started from snapshots.
967+ InitializerMetric snapshot = 3 ;
968+
969+ // backup contains metrics for the backup initializer step
970+ // This is set on subsequent workspace starts, when the file system is restored from backup.
971+ InitializerMetric backup = 4 ;
972+
973+ // prebuild contains metrics for the prebuild initializer step
974+ // This is set if the workspace is based on a prebuild.
975+ InitializerMetric prebuild = 5 ;
976+
977+ // composite contains metrics for the composite initializer step
978+ // This reports the total if multiple steps are run to initialize the workspace content.
979+ // Examples are:
980+ // - "additionalFiles" injected into the workspace
981+ // - "additionalRepositories" configured
982+ // - incremental Prebuilds
983+ InitializerMetric composite = 6 ;
942984 }
943985
944986 string id = 1 ;
0 commit comments