24 Feb 2023 02:57 PM - last edited on 30 May 2023 07:35 AM by MaciejNeumann
Hi,
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.
08 Mar 2023 11:01 AM
Hi @sselzer ,
the format of the header is like following:
FW4;-470596006;4;1832383454;1102798;3;926782514;348;a479;2h01;3h6d37f3de;4h10d3ce;5h01;6h9f0a7961bfc17a806711020a76b2b914;7haf633cfee8390519
Best,
Mark
27 Mar 2023 08:21 AM
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.
Best regards
Sascha
30 May 2023 03:38 PM
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
31 May 2023 08:10 AM
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?
31 May 2023 08:19 AM
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
https://www.dynatrace.com/support/help/shortlink/service-distributed-traces#faqs