liveBook · Manning

Jaeger

As explained in Spring AI in Action

Jaeger is an open-source distributed-tracing system for collecting, storing, and visualizing trace data.

Jaeger is an open-source distributed-tracing system that receives application trace data and provides a user interface for inspecting requests, spans, and span tags. In a Spring Boot application, it reveals what happens during operations such as answering a user question. section 9.4

A Spring Boot integration requires:

  • A Jaeger service in Docker Compose, exposing port 4317 for OTLP trace data and port 16686 for the user interface. section 9.4
  • Micrometer-to-OpenTelemetry and OTLP exporter dependencies. section 9.4
  • An OtlpGrpcSpanExporter bean configured with a property such as http://localhost:4317. section 9.4
services:

  # ...

  jaeger:
    image: jaegertracing/all-in-one:latest
    ports:
      - "16686:16686"
      - "4317:4317"
    environment:
      - COLLECTOR_OTLP_ENABLED=true

Use this Docker Compose listing to add Jaeger beside the application's other observability services. section 9.4

package com.example.boardgamebuddy;

import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class TracingConfig {

  @Bean
  public OtlpGrpcSpanExporter otlpHttpSpanExporter(
        @Value("${otlp.tracing.url}") String url) {
    return OtlpGrpcSpanExporter.builder().setEndpoint(url).build();
  }

}

Use this Spring configuration listing to create the OTLP exporter and inject its configurable endpoint. section 9.4

After traces reach Jaeger, the interface can list traces, show the trace for a POST request to /ask, and expose tags on spans such as a Qdrant query. These details help confirm what an AI operation did and why. section 9.4

How Spring AI in Action covers it

How deep it goes
Explains Docker, dependencies, exporter configuration, endpoint properties, and trace inspection, but not Jaeger internals.
Examples
Shows Board Game Buddy traces for POST /ask requests and Qdrant query spans with inspectable tags.
What it assumes
Assumes a Spring Boot application and Docker Compose, while providing explicit tracing dependencies and exporter configuration.
What you can do after
Diagnose AI request behavior by inspecting Jaeger traces, spans, and tags.
How it connects
Connects distributed tracing with Spring Boot, Micrometer, OpenTelemetry, OTLP, Zipkin, Qdrant, and Prometheus.

Also explained in

Compare how 4 books explain Jaeger →

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.