Skip to content

Commit 98526f4

Browse files
easyCZroboquat
authored andcommittedApr 5, 2022
[ws-manager-bridge] Fix counting of stale prebuild events
1 parent 81a79af commit 98526f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎components/ws-manager-bridge/ee/src/bridge.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export class WorkspaceManagerBridgeEE extends WorkspaceManagerBridge {
5959
span.setTag("updatePrebuiltWorkspace.workspaceInstance.statusVersion", status.statusVersion);
6060

6161
if (prebuild.statusVersion <= status.statusVersion) {
62-
this.prometheusExporter.recordStalePrebuildEvent()
62+
// prebuild.statusVersion = 0 is the default value in the DB, these shouldn't be counted as stale in our metrics
63+
if (prebuild.statusVersion > 0) {
64+
this.prometheusExporter.recordStalePrebuildEvent();
65+
}
6366
}
6467
prebuild.statusVersion = status.statusVersion
6568

0 commit comments

Comments
 (0)
Please sign in to comment.