# APM - logs for trace is not available

**URL:** <https://discuss.elastic.co/t/apm-logs-for-trace-is-not-available/314429>\
**Category:** APM\
**Tags:** ui\
**Created:** [September 14, 2022, 2:56pm UTC](https://discuss.elastic.co/t/apm-logs-for-trace-is-not-available/314429 "2022-09-14T14:56:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![schikin-sw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/schikin-sw/32/100274_2.png) [@schikin-sw](https://discuss.elastic.co/u/schikin-sw)\
**Post date:** [September 14, 2022, 2:56pm UTC](https://discuss.elastic.co/t/apm-logs-for-trace-is-not-available/314429/1 "2022-09-14T14:56:48Z")

</div>

Hello, we are using the latest Elastic Cloud (ver. 8.4) with APM. We are sending logs using filebeat in ECS format. We can see logs coming in and `trace.id` is present in log events. We also have APM data flowing properly and we can see traces. However when trying to lookup logs by the trace we get the following error:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/0/207b3d2b018db5b14beaf355bf448844e19557eb.png)

This looks like a bug - the bracket in that KQL query should be outside the quote. Is there a way to fix it?

Thanks

---

<div class="post-metadata">

**Author:** ![caue.marcondes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/caue.marcondes/32/61739_2.png) [@caue.marcondes](https://discuss.elastic.co/u/caue.marcondes)\
**Post date:** [September 14, 2022, 3:27pm UTC](https://discuss.elastic.co/t/apm-logs-for-trace-is-not-available/314429/2 "2022-09-14T15:27:24Z")

</div>

Hi @schikin-sw , thanks for your message.

This bug was already fixed on this PR [[APM] Fix invalid KQL query by kpatticha · Pull Request #139694 · elastic/kibana · GitHub](https://github.com/elastic/kibana/pull/139694). It was backported to `8.4.1` version. If you can, please update to this minor version and the bug is will be fixed.

Thank you.  
Cauê

---

<div class="post-metadata">

**Author:** ![pskpr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pskpr/32/110887_2.png) [@pskpr](https://discuss.elastic.co/u/pskpr)\
**Post date:** [September 15, 2022, 11:38am UTC](https://discuss.elastic.co/t/apm-logs-for-trace-is-not-available/314429/3 "2022-09-15T11:38:53Z")

</div>

Hi I got the same problem. Are you in any case using openTelemetry with an otel collector?  
If yes, are able to see labels of span events? Cheers

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 6, 2022, 7:39am UTC](https://discuss.elastic.co/t/apm-logs-for-trace-is-not-available/314429/4 "2022-10-06T07:39:07Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
