N+1 groups
When the same query repeats many times (an N+1), the timeline collapses the repetitions into a single representative span and moves the details to the right panel—so a trace with hundreds of duplicate queries stays readable.
Design principles
- Keep the existing timeline structure; use the right panel to provide an N+1 summary.
- Include slowest, average, and fastest span values so the context reads at a glance.
- Use hover states to highlight related spans so their relationships are easy to see.
Representative span & count badge
- The first occurrence is shown as the representative span, with a count badge (e.g. x99).
- Click the badge to expand the group and reveal the repeated spans inline in the timeline.
- Hover the badge to highlight every span in the group (in blue), so you can see where they fall on the timeline.
Count badge (shipped example): today's x8 badge is the same pattern at small scale; the N+1 experience scales it up with expand, hover, and a summary panel.
N+1 Summary panel
Clicking the representative span opens the N+1 Summary tab: how many queries, their total duration, and what percentage of the trace they account for. A Spans card lists the slowest, mean, and fastest occurrences — clicking Slowest or Fastest jumps to that span in the timeline and highlights it.
Nested N+1
When repetitions are nested, each level shows its own count badge, and the summary adds a Nesting panel: the chain of repeated spans, the cumulative multiplication, and a per-level breakdown. Clicking the representative span surfaces the nesting info — span name × repetition count, and the number of nesting levels.
Working inside an expanded group
After expanding, clicking an individual span shows its attributes just like any other span. A “Part of an N+1 group” message stays sticky at the bottom of the panel with a link back to the summary, so the return path is always available.