15 Nov 2024 07:11 AM
Hello All,
I have a bunch of Java based microservices that are running on Kubernetes and have the Dynatrace OneAgent injected in the pods. Now I can see trace id and span id be automatically propagated by the One Agent.
But now I have a requirement to propagate the traceparent header as well. I wanted to know:
- Does Dynatrace automatically support the traceparent?
- If not do we need to use the OTEL Java SDK for this?
- If we set the traceparent with OTEL SDK, then we kind of need to set the traceid and span id as well right because then we override what the Dynatrace OneAgent does?
16 Nov 2024 12:06 AM - edited 16 Nov 2024 12:07 AM
Hi @prabalr ,
as i see in the docs, the Traceparent is supported by Dynatrace OneAgent, see this link https://{environmentid}.apps.dynatrace.com/ui/apps/dynatrace.classic.distributed.traces/ui/diagnosti...
when investigating in this request and went through trace i found a sequence of 3 service calls as the below figure
and the 1st node has no traceparent id as it's the 1st service call and the 2nd and 3rd service calls has as the following 3 figures
1st and parent request (has no parent trace id)
2nd request (has parent id)
3rd request (has parent span id)
the above example is detected out-of-the-box by the OneAgent but there's another example I've found that using OpenTelemety as the below figures, check these 2 links
https://{environmentid}.apps.dynatrace.com/ui/apps/dynatrace.classic.distributed.traces/ui/diagnosti...
BR,
Mostafa Hussein.
16 Nov 2024 05:11 AM
Sincerely appreciate your revert.
Would you know if Dynatrace uses the W3C Trace Context Propagators? I am specifically looking for the traceparent header that is set up here:
I believe what Dynatrace OneAgent is doing is to probably extract this and parse it to trace_id, span_id, parent_span_id which anyway is the purpose of traceparent.
Is this a right understanding?
16 Nov 2024 11:55 AM
Yes @prabalr Dynatrace is using the same context as mentioned in the docs This typically happens via HTTP headers (like the W3C trace context) or via unique IDs in messaging systems.
https://docs.dynatrace.com/docs/shortlink/distributed-traces-concepts#span-context
Thanks,
Mostafa Hussein.
26 Nov 2024 01:00 PM
Hello @prabalr
In addition to the wonderful illustration provided by @MostafaHussein
PFA below points:
For the Oneagent Java SDK:
Hoping it adds value,
KR,
Peter