Exercise 5 of 8 · OpenTelemetry + Jaeger · About 18 min

A charge, from Express into FastAPI

Find a slow FastAPI operation inside an Express checkout trace and prove that context crossed the network.

Before you begin

Keep your stack running. In Codespaces, use labs/observability and the Ports tab for tool URLs; locally, use the extracted baodium-observability folder. Earlier exercises establish the signals used here.

Before you run it

With a 900 ms payment delay and a 1,500 ms caller timeout, predict the response outcome and where most of the trace duration will appear.

OpenTelemetry + JaegerStep 1 of 4

Slow the dependency

Make payment take 900 ms without injecting failures. Checkout still waits up to 1,500 ms for the dependency.

node lab.mjs fault slow
node lab.mjs traffic 12
What you should see

Successful but visibly slower responses. The CLI prints a real trace ID from checkout.

Help with this exercise

Export and collection are asynchronous. The verifier polls for up to 25 seconds. Check Jaeger and application logs if an exporter cannot connect.

Need a hint or a troubleshooting path?

Export and collection are asynchronous. The verifier polls for up to 25 seconds. Check Jaeger and application logs if an exporter cannot connect.

Check a common misconception

Sharing a trace ID alone does not prove correct parentage. Inspect the payment server span’s parent against the outbound client span.

Before you move on

What to keep
Record one trace ID, both service names, the outbound span ID and the payment parent span ID, plus the observed durations.
What to explain
Explain how injected and extracted W3C context connects Express to FastAPI. Separate caller waiting time from downstream work.
A question to take further
After a client timeout, what evidence would tell you whether downstream work was cancelled or continued?

Write what you found

Inject the timeout fault and explain why a payment span can finish after the checkout client span has ended.

Stop the stack when you finish

Continue to the next exercise with the stack running. When finished, stop and remove only this lab’s Compose services and volumes.

node lab.mjs down
Reference: OpenTelemetry context propagation ↗ (opens in a new tab)