OpenTelemetry for Spring and NestJS: 100 Payments, 11 Traces

1 October 2026 nestjstypescriptnodejsjavaspring-bootopentelemetry
PDF The design sheet The full architecture and the verified references. Free, no email.
Thumbnail for OpenTelemetry for Spring and NestJS: 100 Payments, 11 Traces 3:43
Watch on YouTube, or read on below.
Run this yourself → Clone the repo, docker compose up, and watch it happen

A hundred payments go through a Spring Boot service, and every one calls a NestJS ledger that traces every request it receives. Jaeger showed eleven ledger traces. Measured on 1 October 2026 with real processes and a real Jaeger. A trace is usually a decision made at the root and propagated downstream.

Sampling

Nothing configured, 100 root requests each: Spring Boot’s OpenTelemetry starter produced 9 traces, because its default sampling probability is 0.1. The Node SDK under Nest sampled all 100.

Propagation

With Spring sampling everything, a RestClient built from the injected RestClient.Builder carried the trace into the Nest ledger: one trace, both services. RestClient.create() did not: it sits outside the instrumented builder path. From Nest, a plain fetch carried the trace into Spring.

The root decides

At Spring’s default, the sampling decision travelled downstream in the traceparent header and Nest followed it: 11 ledger traces out of 100. With Spring at 1.0, all 100.

The full code for every measurement is in the repository, and the free design sheet above has the checklist on one page.


Watch next

New videos land on Code with Sam - subscribe there if this was useful.

Get the interview pack

A free, practical pack for engineers preparing for senior backend interviews - the questions that actually get asked, and how to answer them like someone who has done the work.

New articles and videos when they land. No spam, and one click to leave.