cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Propagate trace context to child threads

CW-Logic32
Newcomer

Sorry if this has been asked before but this is a hard topic to search for.  Most of the results I got were about applications doing "background tasks" that don't need traced.  That is not the case for me.

We have a LOT of apps that do a divide-and-conquer approach to request processing.  Example:

  1. A HTTP request comes in.
  2. The request is broken down into some sub-components.
  3. Multiple Threads are started, 1 per sub-component.
  4. We wait for all the sub-requests to return.
  5. Assemble a final response from all the sub-requests and return it.

We'd like to have distributed tracing properly group all the sub-requests into a single trace so Davis can properly root-cause issues with the sub-requests.  Right now, we're in a state where the parent request can experience a "problem" and that is all the information we get.  The actual issue is in one of the sub-requests but we can't drill down into it.

With OpenTracing/Zipkin, this is a super easy problem to solve.  We can just propagate the trace context to the sub-thread and all is well.  With Dynatrace, I can't seem to find how to do that propagation with the trace context automatically created by Dynatrace.

So, my ask is: how can I manually propagate the automatically created trace context to a child thread without re-inventing tracing using OpenTracing?

0 REPLIES 0

Featured Posts