Skip to content

Commit a1a4f2a

Browse files
fix: report metric only for active template version
1 parent 6fb6800 commit a1a4f2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

enterprise/coderd/prebuilds/reconcile.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ func (c *StoreReconciler) ReconcilePreset(ctx context.Context, ps prebuilds.Pres
361361
slog.F("preset_name", ps.Preset.Name),
362362
)
363363

364-
c.metrics.trackHardLimitedStatus(ps.Preset.OrganizationName, ps.Preset.TemplateName, ps.Preset.Name, ps.IsHardLimited)
364+
if !ps.Preset.Deleted && ps.Preset.UsingActiveVersion {
365+
c.metrics.trackHardLimitedStatus(ps.Preset.OrganizationName, ps.Preset.TemplateName, ps.Preset.Name, ps.IsHardLimited)
366+
}
365367

366368
// If the preset was previously hard-limited, log it and exit early.
367369
if ps.Preset.PrebuildStatus == database.PrebuildStatusHardLimited {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy