# Logs is correlated to traces despite dt.span\_id, dt.trace\_id, dt.trace\_sampled are absent

**URL:** <https://community.dynatrace.com/t/logs-is-correlated-to-traces-despite-dt-span-id-dt-trace-id-dt-trace-sampled-are-absent/51778>\
**Category:** Logs\
**Tags:** distributed-tracing, oneagent, logs\
**Created:** [May 23, 2025, 3:49am UTC](https://community.dynatrace.com/t/logs-is-correlated-to-traces-despite-dt-span-id-dt-trace-id-dt-trace-sampled-are-absent/51778 "2025-05-23T03:49:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![waikeat\_chan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/waikeat_chan/32/33405_2.png) [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Post date:** [May 23, 2025, 3:49am UTC](https://community.dynatrace.com/t/logs-is-correlated-to-traces-despite-dt-span-id-dt-trace-id-dt-trace-sampled-are-absent/51778/1 "2025-05-23T03:49:00Z")

</div>

I have open a ticket to Dynatrace about why traces don’t have log.

Then based on the [documentation](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-enrichment) provided, the understanding is that these fields/header needs to be present for the trace-log correlation to works.

![Snippet.png](https://global.discourse-cdn.com/dynatrace/optimized/3X/8/3/833f34e602607f4065b6789fd42894178d27e75b_2_690x50.png)

But then what I see in customer environment isn’t that.

As you can see below:

I can see the trace highlighted has logs for it when I open with ‘open logs of this trace’

 ![AtFirst.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/2fbd0593bb299cf40c7e79deae66d74f16d91a11.jpeg)

Since this correlation works, so by right there should be values in either of these 3 fields: dt.trace.id, dt.span.id, dt.trace\_sampled.

But then when I add these 3 fields to the query, they are all null!!

 ![ButThen.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/1/e1925f0384c8cf4a75f026ea17f6e8c593216e9f.png)

So right now I really don’t know how all this works actually. (And if the 3 fields aren’t necessary for the correlation to work then **I’ll be very curious on what basis the Dynatrace Support revert to us that the correlation doesn’t work because there 3 fields are null** )

Best Regards,

Wai Keat

---

<div class="post-metadata">

**Author:** ![marco\_irmer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marco_irmer/32/3038_2.png) [@marco\_irmer](https://community.dynatrace.com/u/marco_irmer)\
**Post date:** [May 23, 2025, 9:30pm UTC](https://community.dynatrace.com/t/logs-is-correlated-to-traces-despite-dt-span-id-dt-trace-id-dt-trace-sampled-are-absent/51778/2 "2025-05-23T21:30:48Z")

</div>

I believe the field name is actually ‘trace\_id’ rather than ‘dt.trace\_id’. From what I can tell, the reference in the documentation to the fields with the dt. prefix may be out of date from before Grail was GA. The current semantic dictionary [entry](https://docs.dynatrace.com/docs/discover-dynatrace/references/semantic-dictionary/model/log#logs) for logs confirms that the field name is now ‘trace\_id’.
