layer1: add live namespace counts

This commit is contained in:
Naeel
2026-04-26 10:59:39 +03:00
parent b93e720e12
commit 073f2c1504
4 changed files with 28 additions and 0 deletions
+2
View File
@@ -123,6 +123,7 @@ func LogNamespaceManagerSummary(logger *zap.Logger, message string, summary Name
}
logger.Info(message,
zap.Int("total_namespaces", summary.TotalNamespaces),
zap.Int("live_namespaces", summary.LiveNamespaces),
zap.Any("phase_counts", summary.PhaseCounts),
zap.Any("source_counts", summary.SourceCounts),
zap.Strings("subscribers", summary.Subscribers),
@@ -258,6 +259,7 @@ func (m *inMemoryNamespaceManager) Summary() NamespaceManagerSummary {
records := m.SnapshotRecords()
summary := NamespaceManagerSummary{
TotalNamespaces: len(records),
LiveNamespaces: len(m.Snapshot()),
PhaseCounts: make(map[NamespacePhase]int),
SourceCounts: make(map[NamespaceSource]int),
Subscribers: m.SnapshotSubscribers(),