Fix sparkline service name mapping

- Pass service names (not slugs) to DockerStatsCollector
- Create slug->name mapping for sparkline lookups
- Stats are stored by service name, looked up by slug
- Add debug logging when no containers found
This commit is contained in:
GitHub Copilot
2026-01-24 11:57:16 +00:00
parent 901a2e4cfa
commit 02d941af6a
2 changed files with 18 additions and 5 deletions
+6 -1
View File
@@ -201,7 +201,7 @@ class DockerStatsCollector:
refresh_counter = 0
while self._running:
# Refresh container mapping every 30 iterations (~60 seconds)
# Refresh container mapping every 30 iterations (~5 minutes at 10s interval)
if refresh_counter % 30 == 0:
service_to_container = await self._discover_containers(service_names)
if service_to_container:
@@ -209,6 +209,11 @@ class DockerStatsCollector:
"Discovered containers: %s",
", ".join(f"{k}={v}" for k, v in service_to_container.items()),
)
else:
log.debug(
"No containers found for services: %s",
", ".join(service_names),
)
refresh_counter += 1