Skip to content

Flame graph

Where the time went in one run.

Definition · Updated Nov 2, 2026

A flame graph shows one run as stacked bars: the whole run on top, each step below it and each step's sub-steps below that, all on one time axis. Wide bars are where time went. Use it for agent traces, request traces and profiling.

Pay once. Every update included.

Live preview

Agent traceOne agent run of 8.4 s in 13 spans over 5 levels; web.search takes 3.1 s.agent.runresearchanswerweb.searchdraftfetch ×60 s2 s4 s6 s8.4 sMODELTOOLRETRIEVALWAIT
Agent trace
SpanDepthStartEndDurationKind
agent.run00.0 s8.4 s8.4 sModel
plan10.0 s1.1 s1.1 sModel
research11.1 s5.6 s4.5 sTool
answer15.6 s8.4 s2.8 sModel
web.search21.2 s4.3 s3.1 sTool
docs.query24.3 s5.5 s1.2 sRetrieval
draft25.7 s7.6 s1.9 sModel
check27.6 s8.3 s0.7 sModel
fetch ×631.3 s3.4 s2.1 sTool
queue33.4 s4.2 s0.8 sWait
rerank34.6 s5.4 s0.8 sRetrieval
cite36.5 s7.5 s1.0 sRetrieval
parse41.4 s2.6 s1.2 sTool

Sample data: one agent run of 8.4 s, plan, research and answer, coloured by model, tool, retrieval and wait

Size
Legend
Data shape
Nested spans with start and length
Good for
Agent traces, request traces, profiling
Avoid when
There is no nesting
Sizes
XS, S, M and L, re-laid out from the data

Anatomy

Inspect it like the Figma file.

The same layers, names and tokens as the component. Select one to read its size, fill and style.

Layers

074 / Flame graph

chart/074-flame-agent-trace
plot · flame graph
Layer
span · research
Type
Rectangle
Size
405 × 24
Fill
data/cat-2
Radius
3
Group
Marks · 13

Layers

074 / Flame graph

chart/074-flame-agent-trace
plot · flame graph
Layer
span · research
Type
Rectangle
Size
147 × 24
Fill
data/cat-2
Radius
3
Group
Marks · 13

Sizes

Re-laid out, never scaled.

The same data at XS, S, M and L. Every size is redrawn from the data, so text and line weights never shrink.

M against S

Width360 px480 px

Plot328 px440 px

Labels1314

Marks1313

Height212 px246 px

Same tokens at every size: text styles, 1 px lines and mark radius stay put.

When to use

Where the time went.

Three signs it fits, and three signs another type fits better.

Are the steps nested?

Steps in one flat list.

Yes: Keep the flame graph

Is it one run?

Many runs over time.

Yes: Keep the flame graph

Is it time, not money?

A spend breakdown.

Yes: Keep the flame graph

Code and Figma

One name in Figma and in code.

Every Figma property is a prop with the same name and values. One command installs it.

Figma

chart/074-flame-agent-trace

size
legend
Property = propValuesDefault
size"xs" · "s" · "m" · "l""xs"
legendtrue · falsetrue
color"cat-1" · "cat-2" · "cat-3" · "cat-4""cat-1"
npx shadcn add @chartory/flame-graph
flame-graph.tsx
import { FlameGraph } from "@/components/chartory/flame-graph"import { agentTrace } from "./agent-trace"export function AgentTrace() {  return (    <FlameGraph      data={agentTrace}      size="m"      legend={true}    />  )}

Hearth widget

Flame graph as a widget.

The chart in a Hearth card with a hero number and two blocks. One token set, light and dark.

Code
Get the code

EmberPreset

ChartoryDefault preset

Pick the blocks, the size and the preset for your own widget.

Read the Hearth widget docs

FAQ

Flame graph questions.

What people ask before they put a flame graph in a dashboard.

Something else?

hello@usechartory.com
  • The kind of work: model, tool, retrieval and wait, named in the legend. A wide wait bar means time spent doing nothing.

Related types

The same question, a different shape of answer. Every type ships in Figma and in code.

Same family

Part of a whole

16 types in Chartory answer this question.