liveBook · Manning

OpenTelemetry

As explained in Quarkus in Action

OpenTelemetry is a vendor-neutral, language-agnostic collection of APIs, tools, and protocols for generating, collecting, and exporting application telemetry.

OpenTelemetry (OTel) is a vendor-neutral, language-agnostic collection of tools and APIs for collecting and exporting application telemetry. In a cloud-native Java application, its distributed tracing capabilities help follow a request across services and find where time is spent. Quarkus supports OpenTelemetry through MicroProfile Telemetry. section 10.4.1 section 10.7

A trace groups the operations involved in a request. Each operation is a span, and spans in one trace form a tree. A trace ID lets supporting services correlate their spans; HTTP can carry that tracing metadata in headers. Jaeger visualizes the resulting trace. section 10.4 section 10.8

Choose how to export the tracing data:

  • Export OTLP data directly from applications to Jaeger for a simpler, smaller-scale setup. section 10.4.1
  • Send OTLP data through an OpenTelemetry Collector for central processing before forwarding it to a backend. At larger scale, the collector can add filtering, batching, and retries. section 10.4.1

Following a database operation

A request that creates a product can include a database SELECT to obtain the next ID and an INSERT to save the definition. Their spans place those operations within the request’s trace, helping locate delays alongside work done by other services. section 10.4

Figure 10.9 OpenTelemetry tracing topology with OpenTelemetry Collector
figure

The collector topology shows applications exporting tracing data through a central collector before it reaches a backend. section 10.4.1

OpenTelemetry also encompasses metrics and logs, but the Quarkus support described here focuses on tracing: its metrics and logging capabilities were not considered ready and stable at the time. A separate collector is optional when the backend accepts OTLP directly. section 10.4.1

How Quarkus in Action covers it

How deep it goes
Defines traces, spans, propagation, and export topologies, but does not specify instrumentation code or exporter configuration.
Examples
Illustrates spans with a database SELECT and INSERT, and contrasts collector-mediated export with direct export to Jaeger.
What it assumes
Introduces traces and spans while working in the context of cloud-native Java services.
What you can do after
Apply it via Quarkus and Jaeger to visualize cross-service traces and identify slow operations.
How it connects
Connects distributed tracing with HTTP headers, OTLP, OpenTelemetry Collector, MicroProfile Telemetry, Quarkus, and Jaeger.

Also explained in

Compare how 7 books explain OpenTelemetry →

Related concepts

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