Trace context propagation

DesignHard40 min

Your task

Design trace context propagation for a heterogeneous architecture where a single request flows through synchronous HTTP/gRPC calls, then drops onto a Kafka topic consumed asynchronously by a batch worker that fans one message out into 200 downstream jobs, and finally hits a third-party API you don't control. You need a single coherent trace per original request, correct parent/child relationships across the async boundary, and graceful behavior where context can't propagate. Design the propagation model, the async stitching, and the data model.

It covers

  • Context propagation
  • Async
  • Trace stitching