# OpenTelemetry Agent Integration - Kibana APM Dependency Operation Issue

**URL:** <https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781>\
**Category:** APM\
**Tags:** server, open-telemetry\
**Created:** [March 20, 2024, 3:54am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781 "2024-03-20T03:54:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![baoletrg](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@baoletrg](https://discuss.elastic.co/u/baoletrg)\
**Post date:** [March 20, 2024, 3:54am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781/1 "2024-03-20T03:54:25Z")

</div>

I am migrating from Elastic APM Agent to OpenTelemetry Agent. The integration is working very well, exception one issue that is slowing us down when identifying the problem:  
From Dependency, select Operation, then select one span, Latency and Throughtput dashboards are working, but the Trace dashboard said **The selected trace cannot be found**

 ![span_ui](https://us1.discourse-cdn.com/elastic/original/3X/0/d/0d3f15f75639e6dc78ed91c092fb61466666b9e7.png)

Any suggestion? Thank a lot everyone.

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [March 25, 2024, 9:04am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781/2 "2024-03-25T09:04:21Z")

</div>

Hi,

This very probably comes from the data model difference between otel and our current data model.

- Elastic APM has the concept of transactions, which are "root spans" when something is executed in a service (for example an http request).
- with OTel everything is a span and there is no transaction, so the apm-server has to infer which are spans and which are transactions.

Here you have a transaction that has been created from a database span, and likely outside of any parent span (for example when the application starts), thus the trace might not be available.

Once the application has started and you have real user usage, do you still see such transactions without traces ? Does the issue is the same for all transactions or only specific to this one ?

---

<div class="post-metadata">

**Author:** ![baoletrg](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@baoletrg](https://discuss.elastic.co/u/baoletrg)\
**Post date:** [March 25, 2024, 9:28am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781/3 "2024-03-25T09:28:37Z")

</div>

Thanks for your response Mr. Sylvain,  
This issue happens with all the dependencies, http, database, redis.  
Yes, all my data is from real user usage (these span are created by real transactions and can be seen in the trace sample UI).  
I have checked the data between elastic apm agent and otel agent, it seems that the data of spans from otel agent do not have **trace.id** field. This might be the root cause.

---

<div class="post-metadata">

**Author:** ![baoletrg](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@baoletrg](https://discuss.elastic.co/u/baoletrg)\
**Post date:** [March 25, 2024, 9:29am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781/4 "2024-03-25T09:29:36Z")

</div>

Sorry, I means there is no **transaction.id** field in the span data of otel agent.

---

<div class="post-metadata">

**Author:** ![baoletrg](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@baoletrg](https://discuss.elastic.co/u/baoletrg)\
**Post date:** [March 25, 2024, 9:36am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781/5 "2024-03-25T09:36:34Z")

</div>

These are images from 2 span:

1. otel agent span  

2. elastic apm agent span  

Can i try to set transaction.id equals parent,id in otel agent span?

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [March 28, 2024, 9:03am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781/6 "2024-03-28T09:03:42Z")

</div>

Hi, I don't know why this is happening as the `transaction.id` should be set by the apm-server when OTLP (opentelemetry protocol) intake is used.

I'll ask the APM server team about this, which version of the stack (elasticsearch kibana apm-server) are you using here ?

---

<div class="post-metadata">

**Author:** ![baoletrg](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@baoletrg](https://discuss.elastic.co/u/baoletrg)\
**Post date:** [March 28, 2024, 9:17am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781/7 "2024-03-28T09:17:11Z")

</div>

Hi thanks for your reply,  
Setting the transaction.id to the parent,id solves the issue " **The selected trace cannot be found**"

My stack runs version 8.11.4

---

<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:** [April 25, 2024, 9:17am UTC](https://discuss.elastic.co/t/opentelemetry-agent-integration-kibana-apm-dependency-operation-issue/355781/8 "2024-04-25T09:17:32Z")

</div>

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