detached 6a6fcae

fix(container): unify ManagedContainers metric attributes

commit
6a6fcaec639d77f2d84648cf7b33a6637898dfcc
author
bnema · · 2026-02-11 20:36 UTC
parent
e7393e2
signature
unsigned
1 file · +2 -6
M internal/usecase/container/service.go +2 -6
@@ -464,9 +464,7 @@ func (s *Service) activateDeployedContainer(ctx context.Context, domainName stri
464464
465465 // Track managed container count (only increment for new domains, not replacements)
466466 if !wasTracked && s.metrics != nil {
467- s.metrics.ManagedContainers.Add(ctx, 1, metric.WithAttributes(
468- attribute.String("domain", domainName),
469- ))
467+ s.metrics.ManagedContainers.Add(ctx, 1)
470468 }
471469
472470 s.publishContainerDeployed(ctx, domainName, container.ID)
@@ -695,9 +693,7 @@ func (s *Service) Remove(ctx context.Context, containerID string, force bool) er
695693
696694 // Decrement managed container count
697695 if removedDomain != "" && s.metrics != nil {
698- s.metrics.ManagedContainers.Add(ctx, -1, metric.WithAttributes(
699- attribute.String("domain", removedDomain),
700- ))
696+ s.metrics.ManagedContainers.Add(ctx, -1)
701697 }
702698
703699 // Note: We intentionally do NOT clean up deployMu entries to avoid a race condition:
@@ -464,9 +464,7 @@ func (s *Service) activateDeployedContainer(ctx context.Context, domainName stri
464 464
465 // Track managed container count (only increment for new domains, not replacements)465 // Track managed container count (only increment for new domains, not replacements)
466 if !wasTracked && s.metrics != nil {466 if !wasTracked && s.metrics != nil {
467- s.metrics.ManagedContainers.Add(ctx, 1, metric.WithAttributes(467+ s.metrics.ManagedContainers.Add(ctx, 1)
468- attribute.String("domain", domainName),
469- ))
470 }468 }
471 469
472 s.publishContainerDeployed(ctx, domainName, container.ID)470 s.publishContainerDeployed(ctx, domainName, container.ID)
@@ -695,9 +693,7 @@ func (s *Service) Remove(ctx context.Context, containerID string, force bool) er
695 693
696 // Decrement managed container count694 // Decrement managed container count
697 if removedDomain != "" && s.metrics != nil {695 if removedDomain != "" && s.metrics != nil {
698- s.metrics.ManagedContainers.Add(ctx, -1, metric.WithAttributes(696+ s.metrics.ManagedContainers.Add(ctx, -1)
699- attribute.String("domain", removedDomain),
700- ))
701 }697 }
702 698
703 // Note: We intentionally do NOT clean up deployMu entries to avoid a race condition:699 // Note: We intentionally do NOT clean up deployMu entries to avoid a race condition:

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close