24 Feb 2023 06:57 AM - last edited on 29 May 2023 11:35 PM by MaciejNeumann
I tried to read manually the tracing header in a Kafka message set by Dynatrace in a readable format, but it seems to be not mappable to a String. Can someone tell me what format the header has? I see it is a byte array, but when I map it to a string it is gibberish, so probably it is in a different format.
What I actually want to do is to create a message receiver that is not monitored by Dynatrace but still use the tracing information provided by Dynatrace e.g. for logging purposes.
Solved! Go to Solution.
Hi @sselzer ,
the format of the header is like following:
Hi @mark_bley , how can I read this string representation from the byte array in the header? I can't find a fitting decoding to get something readable out like your example above.
The x-dynatrace header has information about the current trace/span and it's passed from service to service in order to keep further traces in the same context. There is no need to decode anything from your side
Thanks for the answer. But this would mean that a trace will break at the first service in the chain not observed by Dynatrace. So it is not meant to decode this header outside of Dynatrace and there is also no way, correct?
If the header is lost(usually we see it gets blocked by FW) and with it the traces' context, the OneAgent will start a new trace (yes the chain would be broken/split).
Maybe these pages in our documentation can help further