patch

Faster Storage Stats

Storage stats and cleanup previews estimate span counts instead of counting every span

server · dashboard · storage

Faster storage stats

The storage page and the cleanup preview no longer count the spans table row by row. On a large instance that count read 37M rows and took over a minute.

  • Spans under transactions are estimated from a random sample of 1,000 transactions per project, then scaled to the project's transaction count. On a 21M-span production cleanup the estimate came within 1% and took about a second
  • The count is exact when a project has 1,000 transactions or fewer, and spans that belong to no transaction are always counted exactly
  • The dashboard marks estimated span counts with ≈

Open source under AGPL-3.0. No per-event pricing, no sampling you did not ask for.