liveBook · Manning

Span

As explained in Spring AI in Action

A span is a timed record of one operation or component segment within a distributed trace.

A span is a timed record of one operation or component segment within a distributed trace. Spans show how a request unfolds across application components and external services. section 9.4

A trace for POST /ask contains spans for request handling, ChatClient, vector-store operations, RAG processing, and the model call. Parent spans can contain narrower operations. section 9.4

Inspect spans to understand what an application did:

  • Select the /ask trace in Jaeger and inspect its span hierarchy. section 9.4
  • Expand span tags to identify a vector-store query’s purpose, such as retrieving conversation history. section 9.4
  • Compare multiple spans to explain why one question produced two Qdrant queries and two adds. section 9.4
Figure 9.11 Inspecting the tags for a Qdrant query span
figure

Inspecting the tags for a Qdrant query span demonstrates how span metadata reveals an operation’s purpose. section 9.4

How Spring AI in Action covers it

How deep it goes
Examines nested operations and span tags for diagnosis, but does not detail span creation or trace internals.
Examples
Uses the POST /ask trace, Qdrant query and add spans, RAG processing, and GPT-4o-mini calls.
What you can do after
Diagnose request behavior with Jaeger by inspecting span hierarchies and tags.
How it connects
Connects distributed traces with Jaeger, observability, vector stores, RAG, and model calls.

Also explained in

Compare how 6 books explain span →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring AI in Action. The section links point to the parts of the book it draws on.