gw auth api ord inv db
Some paths require a wider view.
Return on a larger screen.

Moments Within

A span tells the story of an operation.
But within that story, some moments deserve their own name.
observation
A checkout span takes 800ms. Inside it, a cache miss happens at +50ms and a retry at +400ms.
Should you create child spans for these, or is there a lighter way?
approach a: child spans
checkout
800ms
cache_miss
50ms
process
300ms
retry
150ms
0 200ms 400ms 600ms 800ms
4 spans
Three child spans added to describe two brief moments. The trace becomes noisy.

Three child spans for two brief moments feels heavy. Is there a lighter way to record what happened?

approach b
checkout
800ms
cache_miss +50ms
retry +400ms
0 200ms 400ms 600ms 800ms
1 span
Two lightweight annotations mark when each moment occurred. The trace stays clean.

These timestamped annotations on a span are called...

Not every moment needs its own span.

An event marks what happened and when — a lightweight annotation that keeps your traces clean.

Continue →