liveBook · Manning

OpenTelemetry

As explained in Spring AI in Action

OpenTelemetry is an open-source observability framework for generating, collecting, and exporting telemetry such as traces, metrics, and logs.

OpenTelemetry provides the tracing framework that connects a Spring Boot application to Jaeger through Micrometer and the OpenTelemetry Protocol (OTLP). It turns application activity into traces that can be inspected across operations such as HTTP requests and vector-store queries. section 9.4

A working integration requires:

  • Run Jaeger with OTLP collection enabled, exposing ports 4317 for trace data and 16686 for its user interface. section 9.4
  • Add the Micrometer tracing bridge and the OpenTelemetry OTLP exporter. section 9.4
  • Declare an OTLP exporter bean and inject its endpoint from configuration, allowing development and production hosts to differ. section 9.4
  • Adjust sampling when needed: development can capture every trace, while production commonly uses a smaller proportion to reduce computational load. section 9.4

Tracing Board Game Buddy

A POST request to /ask can be followed in Jaeger from request handling through a Qdrant query. Span tags help confirm what the vector-store operation was intended to do. section 9.4

services:

  # ...

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

Use the supplied Docker Compose listing to start Jaeger with OTLP reception enabled. section 9.4

How Spring AI in Action covers it

How deep it goes
Explains dependencies, exporter configuration, endpoint properties, sampling, and trace inspection, without covering broader telemetry types.
Examples
Demonstrates Board Game Buddy request traces, Qdrant query spans, Jaeger screens, and configurable OTLP deployment.
What it assumes
Assumes a Spring Boot application and Docker Compose setup, while providing dependency, bean, property, and sampling instructions.
What you can do after
Operate/configure Jaeger tracing for a Spring Boot application and inspect request and vector-store spans.
How it connects
Connects Micrometer, Jaeger, OTLP, Spring Boot, Docker Compose, Qdrant, and Zipkin.

Also explained in

Compare how 7 books explain OpenTelemetry →

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.