liveBook · Manning

Span

As explained in Troubleshooting Java, Second Edition

A span is a recorded unit of work within a distributed trace, including its operation, timing, service, and associated metadata.

A span records one unit of work within a distributed trace. It identifies an operation, service, timing, status, parent relationship, and instrumentation details. section 12.1.1 section 12.1.2

Spans let you reconstruct a request as it crosses services, compare time spent in each operation, locate missing steps, and distinguish local failures from communication problems. section 12.1.1 section 12.4

Read spans by asking focused diagnostic questions:

  • Which service and operation created the span, and how long did it run? section 12.1.1
  • Does the span appear under the expected parent, or does the trace tree contain a missing step? section 12.1.1
  • Do repeated child spans reveal a retry storm, especially when internal traffic rises without more user traffic? section 12.3.2
  • Does a client span end in timeout while the server span continues successfully? section 12.3.3

Finding a timeout mismatch

A trace shows a frontend call ending at 2,000 ms with an error while the OrderService span continues to 3,000 ms. The caller timed out, but the downstream service kept processing. Compare client and server timeout settings before treating the symptom as a server failure. section 12.3.3

Following a missing order

A checkout trace can show validation, the OrderService call, database work, Kafka publication, and confirmation email as separate spans. If the Kafka publication or downstream processing is absent or fails, the trace narrows the investigation.

How Troubleshooting Java, Second Edition covers it

How deep it goes
Explains span relationships, fields, durations, and diagnostic patterns, but stops short of detailed tracing implementation internals.
Examples
Uses checkout traces, Kafka order processing, repeated payment attempts, and client-server timeout timelines.
What it assumes
Assumes distributed services and basic request-flow awareness while defining trace IDs, spans, and tracing tools directly.
What you can do after
Diagnose/debug with spans by tracing requests, interpreting timing, identifying retries, and comparing client-server behavior.
How it connects
Connects spans with distributed tracing, trace IDs, OpenTelemetry, Jaeger, Zipkin, retry storms, and timeout mismatches.

Also explained in

Compare how 6 books explain span →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.