How maheshpulivarthi18/opentelmetry works
This repository is a hands-on OpenTelemetry learning course, not a single deployed application. Its recurring workflow is a simulated checkout that produces telemetry, propagates trace context across services or a queue, and exports or correlates the resulting signals. Later exercises branch into database and external-API instrumentation, metrics, log correlation, and sampling. The graph represents the distinct chapter exercises and their demonstrated runtime interactions; source excerpts are limited, so undocumented wiring is omitted.
Main entry points: gateway.js Untraced gateway · spans-demo.js Trace and spans · backend.js Charge backend · queue.js Message queue
Components 24
Tracing Fundamentals
- Untraced gateway
chapters/01-why-logs-fail/code/gateway.js - Untraced backend
chapters/01-why-logs-fail/code/backend.js - Trace and spans
chapters/02-traces-and-spans/code/spans-demo.js
Services and Propagation
- Traceparent gateway
chapters/03-context-propagation/code/gateway.js - Traceparent backend
chapters/03-context-propagation/code/backend.js - Propagation demo
chapters/03-context-propagation/code/coffee-shop-demo.js - Instrumented gateway
chapters/04-manual-instrumentation/code/gateway.js - Instrumented backend
chapters/04-manual-instrumentation/code/backend.js - Auto-instrumentation setup
chapters/04-manual-instrumentation/code/tracing.js - Checkout gateway
chapters/06-distributed-tracing/code/gateway.js - Charge backend
chapters/06-distributed-tracing/code/backend.js - Message queue
chapters/06-distributed-tracing/code/queue.js - Notifications worker
chapters/06-distributed-tracing/code/notifications.js
Export and Integrations
- OTLP span demo
chapters/05-collector/code/spans-demo.js - OTel Collector
- Database instrumentation
chapters/07-database-instrumentation/code/db-demo.js - SQLite database
- Payment API client
chapters/08-external-apis/code/client.js - Fake payment API
chapters/08-external-apis/code/fake-external-api.js
Signals and Sampling
- Metrics demo
chapters/09-metrics/code/metrics-demo.js - Trace-correlated gateway logs
chapters/10-logs/code/gateway.js - Trace-correlated backend logs
chapters/10-logs/code/backend.js - Sampling demo
chapters/11-advanced-topics/code/sampling-demo.js
Other components
- HTTP caller
Connections 11
- HTTP caller → Untraced gateway: requests checkout
chapters/01-why-logs-fail/code/gateway.js - Untraced gateway → Untraced backend: calls charge
chapters/01-why-logs-fail/code/gateway.js - Trace and spans → Trace and spans: creates child span
chapters/02-traces-and-spans/code/spans-demo.js - Traceparent gateway → Traceparent backend: sends traceparent
chapters/03-context-propagation/code/gateway.js - Checkout gateway → Charge backend: calls charge
- Charge backend → Message queue: enqueues receipt
chapters/06-distributed-tracing/code/backend.js - Notifications worker → Message queue: dequeues message
chapters/06-distributed-tracing/code/notifications.js - OTLP span demo → OTel Collector: exports spans
chapters/05-collector/code/spans-demo.js - Database instrumentation → SQLite database: queries
chapters/07-database-instrumentation/code/db-demo.js - Payment API client → Fake payment API: sends payment request
chapters/08-external-apis/code/client.js - Trace-correlated gateway logs → Trace-correlated backend logs: calls charge
chapters/10-logs/code/gateway.js