Sidecar topology card shows absolute memory when no cgroup limit¶
Motivation¶
On the dashboard, the sidecar topology card rendered mem — for every
sidecar. Container Apps sidecars run without a cgroup memory.max limit, so the
cgroup_reporter cannot compute a percentage and leaves mem_pct null. The
reporter still always writes the absolute mem_bytes, but the topology footer
only rendered mem_pct, so the memory telemetry looked missing.
User-facing change¶
- The sidecar topology footer now shows the absolute memory (e.g.
mem 128M) when a percentage is unavailable, instead ofmem —. - When a percentage is available it is still shown as
mem 55%. - A stale snapshot still renders
mem —(bothmem_pctandmem_bytesare cleared), so a frozen tile is not mistaken for live data.
API / IaC diff summary¶
No API or IaC change. Frontend-only:
web/src/components/cards/SidecarsCard/helpers.ts— newmemLabel()+formatMemBytesCompact()helpers;staleSnapshot()now also clearsmem_bytes.web/src/components/cards/SidecarsCard/TopoNode.tsx— footer usesmemLabel().web/src/components/cards/SidecarsCard/helpers.test.ts— new unit tests.
Validation evidence¶
cd web && npm run build— passes.npx vitest run src/components/cards/SidecarsCard/helpers.test.ts— 6 passed.npx vitest run src/components— 252 passed.npx eslinton the touched files — clean.