Skip to content

Commit feb7a1f

Browse files
authored
[wsman-mk2] Log workspace startup time (#17486)
1 parent 0d85286 commit feb7a1f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/ws-manager-mk2/controllers/metrics.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ func (m *controllerMetrics) recordWorkspaceStartupTime(log *logr.Logger, ws *wor
131131
log.Error(err, "could not record workspace startup time", "type", tpe, "class", class)
132132
}
133133

134-
hist.Observe(float64(time.Since(ws.CreationTimestamp.Time).Seconds()))
134+
duration := time.Since(ws.CreationTimestamp.Time)
135+
log.Info("workspace startup time", "ws", ws.Name, "duration", duration)
136+
hist.Observe(float64(duration.Seconds()))
135137
}
136138

137139
func (m *controllerMetrics) countWorkspaceStartFailures(log *logr.Logger, ws *workspacev1.Workspace) {

0 commit comments

Comments
 (0)