The correction is integrated into the TP (See the green boxes)
What you will learn in this TP
- Start Jaeger and HotROD
- Read a trace
- Identify the bottleneck
All steps and instructions are shown. Recommended for this lab: guided
Introduction #
Context. HotROD users are complaining: ordering a car sometimes takes several seconds. You use traces to find the cause.
Prerequisites: Docker Compose · Estimated time: 40 min
Your first diagnosis using traces.Setup #
Guided steps, with their solutions.
1. Start
Why? HotROD sends its traces to Jaeger over OTLP.
Create a Compose file with Jaeger and HotROD, then start it.See the correction
services: jaeger: image: jaegertracing/jaeger:2.23.0 ports: ["16686:16686", "4317:4317", "4318:4318"] hotrod: image: jaegertracing/example-hotrod:2.23.0 command: [all] environment: { OTEL_EXPORTER_OTLP_ENDPOINT: "http://jaeger:4318" } ports: ["8080:8080"]docker compose up -d2. Generate requests
Why? Several simultaneous clicks reproduce the load that slows the service down.
Openhttp://localhost:8080and quickly click the customer buttons about ten times.See the correction
Each click shows the assigned car and the latency; some exceed 1 s.
3. Find a slow trace
Why? The scatter plot highlights abnormal traces.
In Jaeger, search for traces from thefrontendservice for theHTTP GET /dispatchoperation and open the slowest one.See the correction
The trace contains around fifty spans spread across several services (frontend, customer, driver, route, mysql, redis).
4. Read the timeline
Why? The critical path reveals where the time is spent.
Which span is the longest on the critical path? What do you notice about the calls torouteandredis?See the correction
The
mysqlquery (SQL SELECT on customers) is slow, and the calls torouterun in small batches (a staircase pattern) rather than in parallel. Somerediscalls fail (timeout) and are then retried.5. Check with the System Architecture view
Why? The dependency graph confirms the topology inferred from the traces.
Open the System Architecture tab and find the services and their calls.See the correction
The graph shows frontend → customer → mysql, frontend → driver → redis and frontend → route. It is computed from the traces held in memory.
Validate your work
Check that each goal above is reached and that you get the result described in the introduction.
Difficulty level : ●●○○○ (2/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Distributed tracing with Jaeger: concepts and architecture
The concepts of distributed tracing (trace, span, context, propagation) and Jaeger: its history, ...
Installing Jaeger v2: all-in-one, configuration and storage
Run Jaeger v2 as all-in-one, understand its configuration file (jaeger_storage and jaeger_query e...
Analyzing traces in the Jaeger interface
Search for traces, read a timeline, spot the critical path, compare two traces, use the dependenc...
Instrumenting applications for Jaeger with OpenTelemetry
Send traces to Jaeger with OpenTelemetry: auto-instrumentation (Java, Python, Node.js), SDK and m...
Jaeger in production: sampling, storage, Kafka and Kubernetes
Make Jaeger reliable and affordable: sampling strategies (head, tail, adaptive), storage sizing, ...
Grafana Tempo or Jaeger: which tracing backend to choose?
Detailed comparison of Grafana Tempo and Jaeger: architecture, storage, search, query language, s...
Distributed tracing best practices with Jaeger
Checklist for useful tracing: OpenTelemetry instrumentation, span naming, attributes, propagation...
Grafana Tempo: the distributed tracing backend at scale
Understand distributed tracing and Grafana Tempo: traces, spans, TraceID, architecture (distribut...
Correlations in Grafana: jump from one data source to another
Create links between data sources in Explore: query and external correlations, variables, regex a...