Skip to content

Commit

Permalink
[ws-manager-bridge] Fix counting of stale prebuild events
Browse files Browse the repository at this point in the history
  • Loading branch information
easyCZ authored and roboquat committed Apr 5, 2022
1 parent 81a79af commit 98526f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/ws-manager-bridge/ee/src/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export class WorkspaceManagerBridgeEE extends WorkspaceManagerBridge {
span.setTag("updatePrebuiltWorkspace.workspaceInstance.statusVersion", status.statusVersion);

if (prebuild.statusVersion <= status.statusVersion) {
this.prometheusExporter.recordStalePrebuildEvent()
// prebuild.statusVersion = 0 is the default value in the DB, these shouldn't be counted as stale in our metrics
if (prebuild.statusVersion > 0) {
this.prometheusExporter.recordStalePrebuildEvent();
}
}
prebuild.statusVersion = status.statusVersion

Expand Down

0 comments on commit 98526f4

Please sign in to comment.