# X-Dynatrace header in Kafka in a readable format

**URL:** <https://community.dynatrace.com/t/x-dynatrace-header-in-kafka-in-a-readable-format/38588>\
**Category:** Dashboarding\
**Tags:** kafka, dashboards-classic\
**Created:** [February 24, 2023, 2:57pm UTC](https://community.dynatrace.com/t/x-dynatrace-header-in-kafka-in-a-readable-format/38588 "2023-02-24T14:57:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sselzer](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sselzer](https://community.dynatrace.com/u/sselzer)\
**Post date:** [February 24, 2023, 2:57pm UTC](https://community.dynatrace.com/t/x-dynatrace-header-in-kafka-in-a-readable-format/38588/1 "2023-02-24T14:57:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [March 8, 2023, 11:01am UTC](https://community.dynatrace.com/t/x-dynatrace-header-in-kafka-in-a-readable-format/38588/2 "2023-03-08T11:01:08Z")

</div>

Hi&nbsp;[@sselzer](https://community.dynatrace.com/user/58175)&nbsp;,

the format of the header is like following:

```markup
FW4;-470596006;4;1832383454;1102798;3;926782514;348;a479;2h01;3h6d37f3de;4h10d3ce;5h01;6h9f0a7961bfc17a806711020a76b2b914;7haf633cfee8390519

```

Best,

Mark

---

<div class="post-metadata">

**Author:** ![sselzer](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sselzer](https://community.dynatrace.com/u/sselzer)\
**Post date:** [March 27, 2023, 7:21am UTC](https://community.dynatrace.com/t/x-dynatrace-header-in-kafka-in-a-readable-format/38588/3 "2023-03-27T07:21:48Z")

</div>

Hi&nbsp;[@mark\_bley](https://community.dynatrace.com/user/13072)&nbsp;, 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

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [May 30, 2023, 2:38pm UTC](https://community.dynatrace.com/t/x-dynatrace-header-in-kafka-in-a-readable-format/38588/4 "2023-05-30T14:38:35Z")

</div>

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

 ![mark_bley_0-1685457477346.png](https://global.discourse-cdn.com/dynatrace/original/2X/a/ac444473780b2644c5ddf71c9f8f606b8d1a2aa7.png)

---

<div class="post-metadata">

**Author:** ![sselzer](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sselzer](https://community.dynatrace.com/u/sselzer)\
**Post date:** [May 31, 2023, 7:10am UTC](https://community.dynatrace.com/t/x-dynatrace-header-in-kafka-in-a-readable-format/38588/5 "2023-05-31T07:10:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [May 31, 2023, 7:19am UTC](https://community.dynatrace.com/t/x-dynatrace-header-in-kafka-in-a-readable-format/38588/6 "2023-05-31T07:19:26Z")

</div>

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

> **[Distributed Traces Classic](https://docs.dynatrace.com/docs/observe/application-observability/distributed-traces)**
>
> Gain observability into highly distributed, cloud-native architectures to effectively trace and analyze transactions in real time.

> **[OpenTelemetry and Dynatrace](https://docs.dynatrace.com/docs/ingest-from/opentelemetry)**
>
> Learn how to integrate and ingest OpenTelemetry data (traces, metrics, and logs) into Dynatrace.
