RecordBuildEnqueued records a workspace build enqueue attempt. It determines the status based on whether an error occurred and increments the counter.
(provisionerType, buildReason, transition string, err error)
| 34 | // RecordBuildEnqueued records a workspace build enqueue attempt. It determines |
| 35 | // the status based on whether an error occurred and increments the counter. |
| 36 | func (m *Metrics) RecordBuildEnqueued(provisionerType, buildReason, transition string, err error) { |
| 37 | status := BuildStatusSuccess |
| 38 | if err != nil { |
| 39 | status = BuildStatusFailed |
| 40 | } |
| 41 | m.workspaceBuildsEnqueued.WithLabelValues(provisionerType, buildReason, transition, status).Inc() |
| 42 | } |
no test coverage detected