Three language stacks (Spring Boot, Quarkus, Python) each instrumented with the OpenTelemetry API and SDK, sending OTLP over gRPC port 4317 or HTTP port 4318 to a Collector, which forwards to the LGTM stack: Tempo, Mimir, Loki, Pyroscope, and Grafana as the single UI.
Figure 0.1: Three languages, one OpenTelemetry pipeline, one backend.
Download .excalidraw source
·
Edit on excalidraw.com
A production incident branching into two paths: monitoring, which offers a dashboard and a threshold alert and answers only failure modes anticipated in advance, versus observability, which offers a trace and a metric-log correlation by trace ID and answers questions no one thought to ask.
Figure 1.1: Monitoring answers known questions; observability answers new ones.
Download .excalidraw source
·
Edit on excalidraw.com
Two services connected across a process boundary by a dashed amber arrow labeled traceparent and tracestate, representing W3C context propagation. Below, a pipeline within a single process: instrumentation feeds the SDK, which attaches Resource and runs sampling and processors, which hands off to an OTLP exporter over gRPC port 4317 or HTTP port 4318, into a Collector that receives, processes, and exports to the Tempo, Mimir, and Loki backends.
Figure 2.1: Propagation across a boundary, and the pipeline within a process.
Download .excalidraw source
·
Edit on excalidraw.com
A container labeled lgtm holding an OTel Collector that receives OTLP on gRPC port 4317 and HTTP port 4318 and fans out to Tempo on port 3200, Mimir on port 9090, and Loki on port 3100, all surfaced through a Grafana UI on port 3000. Outside that container, a separate Pyroscope container on port 4040 connects to Grafana for profile correlation, alongside a Kafka broker and a kcat CLI container used to inspect it, with a note that Grafana is the only GUI and Kafka is inspected from the command line.
Figure 3.1: One container, four signal stores, one UI.
Download .excalidraw source
·
Edit on excalidraw.com
Three per-language toolchains (Spring Boot and Quarkus sharing SDKMAN with JDK 25 Temurin and Maven 3.9, Quarkus additionally adding the Quarkus CLI, Python using uv and Python 3.14) converging on one git clone and podman compose -f stack/compose.yaml up -d command, which brings up infra services (lgtm, pyroscope, postgres, kafka) plus a tools-profile kcat container and per-language profiles for the six domain services, alongside an alternate devcontainer path using Testcontainers and Quarkus Dev Services instead of the compose stack
Figure 4.1: Three toolchains, one compose stack, two ways in
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of the order service accepting a REST request, calling inventory and payment over gRPC, publishing order.placed to Kafka, and shipping/notification consuming that event, with review as an independent GraphQL service, all backed by one shared Postgres database
Figure 5.1: One order request, six services, four protocols
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of the x-service-env Compose anchor merging into three per-language profiles (spring, quarkus, python), each containing the same six domain services, all resolving the lgtm, pyroscope, postgres, and kafka infrastructure services by their Compose service names, with kcat under a separate tools profile and a devcontainer path using Testcontainers instead of this stack
Figure 6.1: One infra stack, three language profiles, service-name DNS
Download .excalidraw source
·
Edit on excalidraw.com
The six domain services grouped by protocol: order over REST, inventory and payment over gRPC, review over GraphQL, shipping and notification consuming order.placed from Kafka, all running with OTEL_SDK_DISABLED=true, each still reading and writing Postgres and Kafka correctly, with dashed amber arrows showing nothing reaching Grafana
Figure 7.1: Same code path every later chapter instruments, telemetry off rather than absent
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of three attach mechanisms converging on one trace shape: Spring Boot attaching the OpenTelemetry Java agent via a -javaagent JVM flag reading OTEL_ env vars directly, Quarkus compiling the quarkus-opentelemetry build-time extension into the jar and needing quarkus.otel.* keys explicitly mapped to those same env vars, and Python wrapping uvicorn with the opentelemetry-instrument zero-code launcher reading OTEL_ env vars directly, all three producing one trace spanning REST, gRPC, JDBC, and Kafka, exported over OTLP/HTTP to the Collector and into Tempo
Figure 8.1: Three attach mechanisms, one trace shape
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing an auto-generated parent span for POST /orders, created by whichever mechanism Chapter 8 described for that language, containing two manual child spans: inventory.check-with-retry with two span events (one failed attempt, one successful attempt), an inventory.attempts attribute, and OK status; and payment.authorize-with-retry with span events for repeated failures, a payment.attempts attribute, and an ERROR status with a recorded exception. All three spans share the same trace_id.
Figure 9.1: Manual spans nested under the auto-generated parent, carrying the retry detail the wire protocol can't
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of three metrics sources converging on one OTLP pipeline: Spring Boot's Micrometer MeterRegistry bridged by the OpenTelemetry Java agent, Quarkus's Micrometer MeterRegistry bridged by the quarkus-micrometer-opentelemetry build-time extension, and Python's OpenTelemetry Metrics API used directly through otel.meter(), all producing the same orders_placed_total counter and an orders.fulfillment.duration histogram with exemplars attached, exported over OTLP to Mimir for Prometheus-compatible querying, with a dashed amber arrow showing a histogram bucket's exemplar trace_id linking to a trace in Tempo
Figure 10.1: One counter and one histogram, two bridge mechanisms, one exemplar link to Tempo
Download .excalidraw source
·
Edit on excalidraw.com
Spring Boot, Quarkus, and Python each stamp trace_id and span_id onto their logs through different mechanisms (javaagent MDC, OTel log bridge, JSON logging plus LoggingHandler) and ship them via OTLP through the Collector to Loki; a callout shows the Python service.name mismatch between logs/profiles and traces/metrics, fixed by resolving OTEL_SERVICE_NAME first
Figure 11.1: Three paths to the same trace-stamped log line, and the one resource attribute they all have to agree on
Download .excalidraw source
·
Edit on excalidraw.com
The order service sets cart.id as OpenTelemetry baggage once; it propagates automatically over gRPC to the inventory and payment services, each of which reads it and attaches it as a cart.id span attribute visible in Tempo, with a caution callout about cardinality cost
Figure 12.1: One baggage entry, set once, read as a span attribute at every service that cares
Download .excalidraw source
·
Edit on excalidraw.com
With PROPAGATE_KAFKA_CONTEXT true, the order producer injects traceparent and baggage headers into the order.placed Kafka message and the shipping and notification consumers extract them to continue the same trace; with it false, no headers are injected and each consumer starts a new, disconnected root trace
Figure 13.1: The same Kafka hop, with and without W3C trace context in the message headers
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing Spring Boot, Quarkus, and Python order services each attaching Grafana Pyroscope profiling (Java agent for Spring and Quarkus, SDK for Python), pushing into a Pyroscope server on port 4040, which Grafana renders as a process_cpu flame graph, with an OTLP profiles box shown as an emerging but not-yet-used alternative path, and a callout on the Quarkus path marking the LogManager ordering gotcha
Figure 14.1: Three attach mechanisms, one Pyroscope backend, one flame graph in Grafana
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of shared Resource attributes (service.name, service.version, deployment.environment) flowing into traces, metrics, logs, and profiles, with all four signal types correlating in Grafana because they carry the same resource attributes and trace identifiers
Figure 15.1: One resource vocabulary, four correlated signals
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of a single trace_id connecting Tempo, Loki, Mimir, and Pyroscope datasources into one Grafana pane via tracesToLogsV2, derived fields, exemplars, and tracesToProfiles
Figure 16.1: One trace_id, four signals, one Grafana pane
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing the POST /orders request path split into an auto-instrumentation layer (REST span, gRPC spans, Postgres span, Kafka producer header injection, all automatic) and a hand-placed layer below it (the cart.id baggage attribute set the same way in all three stacks, a manually created Kafka consumer span in Python that Java gets automatically, and manually named GraphQL resolver spans in the Python review service under one automatic POST /graphql span)
Figure 17.1: Auto spans the plumbing; manual work takes two different shapes depending on what the plumbing already covers
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of JSON dashboard files in stack/grafana/dashboards provisioned automatically into Grafana via the dashboards.yaml provider, rendered without a manual import step
Figure 18.1: Dashboards as code: JSON on disk, provisioned on startup
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of the Collector pipeline: services send OTLP to a receiver, through memory_limiter, resource, and batch processors, out through three exporters to Tempo, Prometheus remote write, and Loki
Figure 19.1: Collector pipeline: receivers, processors, exporters
Download .excalidraw source
·
Edit on excalidraw.com
Diagram contrasting head sampling, a per-service SDK decision made at span start with a fixed keep rate, against tail sampling, a Collector processor that buffers full traces and applies ordered policies for errors, latency, critical routes, and a probabilistic baseline
Figure 20.1: Head sampling (per-service) vs. tail sampling (post-hoc, at the Collector)
Download .excalidraw source
·
Edit on excalidraw.com
Diagram comparing two versions of the same counter http_requests_total. With a bounded label set of method, route, and status it produces about three thousand time series, with cheap storage and fast queries. Adding one unbounded label, user_id, turns the same counter into millions of time series, with high storage cost and slow dashboards. The metric definition looks nearly identical in both cases.
Figure 21.1: One unbounded label turns a few thousand series into millions
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing metrics, logs, and traces flowing from services into an OpenTelemetry Collector where filter, aggregate, and attribute-drop processors reduce volume before it reaches backend storage
Figure 21.2: Controlling spend at the Collector, across all three signals
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing spans from Checkout, Payments, Shipping, and Inventory services feeding a span metrics processor, which produces both a Tempo service graph and golden-signal SLO alerting
Figure 22.1: From spans to a service graph and SLO alerting
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing resource attributes promoting telemetry through dev, staging, and prod environments, a redaction step before export, and two downstream paths: the local LGTM stack used in this tutorial, deploying further to the OpenShift CRC appendix, and a managed observability backend for production
Figure 23.1: Promotion, redaction, and the path to a managed backend
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing OTLP profiles and the Pyroscope SDK converging toward OpenTelemetry core, alongside eBPF auto-instrumentation, with core radiating out to the Collector Contrib ecosystem, semantic conventions, and OpAMP and the wider ecosystem
Figure 24.1: OpenTelemetry's expanding signal and tooling surface
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of an OpenShift project named otel-observability: a client (oc or browser) reaching Route objects for order, review, and lgtm-grafana; inside the project, six domain services under the restricted-v2 SCC (order, review, inventory, payment, shipping, notification) connected by gRPC between order and inventory/payment and by Kafka produce/consume edges among order, shipping, and notification; a lgtm all-in-one pod and a pyroscope pod, both under the anyuid SCC through their own scoped ServiceAccounts, receiving OTLP and profiling data from every service; a postgres and a kafka StatefulSet under the nonroot-v2 SCC bound through a shared otel-observability-infra ServiceAccount; and ConfigMaps/a Secret supplying the shared env contract to every app pod
Figure 25.1: One OpenShift project, three Security Context Constraints, the same six services and shared env contract as stack/compose.yaml
Download .excalidraw source
·
Edit on excalidraw.com