<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OpenTelemetry Span Sensor For OneAgent - Set Trace ID Function in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/OpenTelemetry-Span-Sensor-For-OneAgent-Set-Trace-ID-Function/m-p/300106#M39108</link>
    <description>&lt;P&gt;The OTEL Span Sensor is for capturing OpenTelemetry spans from your application. This works along with OneAgent tracing.&lt;BR /&gt;&lt;BR /&gt;In the case you describe - you can use OpenTelemetry and also still the OneAgent SDK (you don't mention a particular language, I assume it's one of the supported ones). In both cases, you need to pass the trace context from one thread to another. So you will need to extend your database calls to store the trace context (both trace id and span id, you cannot use your own identifier here as trace id). Or if it's a single process, you can store it in the memory and look it up (just thinking, I don't know you application).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Anyway, I'd recommend thinking once again if this really should be a single trace. You mention you have already a second trace (thread that picks up record in the database). So you would need to disable the sensor that starts the second trace in OneAgent features anyway. But from my point of view, you are mixing the tracing with business data.&amp;nbsp; If there is a significant delay expected between producer and consumer threads, you might run into some limitations of continuing existing trace. In your case, I'd consider creating &lt;A href="https://opentelemetry.io/docs/concepts/signals/traces/#span-links" target="_blank"&gt;span links with OpenTelemetry&lt;/A&gt; instead.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you want it in a single trace anyway, and you don't use OpenTelemetry in your application, OneAgent SDK might be easier to use (I'd probably use &lt;A href="https://github.com/Dynatrace/OneAgent-SDK-for-Java#trace-messaging" target="_blank"&gt;trace messaging&lt;/A&gt;&amp;nbsp;in this case).&lt;BR /&gt;&lt;BR /&gt;I hope this helps.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 May 2026 20:53:08 GMT</pubDate>
    <dc:creator>Julius_Loman</dc:creator>
    <dc:date>2026-05-29T20:53:08Z</dc:date>
    <item>
      <title>OpenTelemetry Span Sensor For OneAgent - Set Trace ID Function</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/OpenTelemetry-Span-Sensor-For-OneAgent-Set-Trace-ID-Function/m-p/300042#M39102</link>
      <description>&lt;P&gt;Hi team,&lt;BR /&gt;&lt;BR /&gt;We're having issues with Trace Continuity for an application that does asynchronous processing and we're trying to explore ways to have the issue addressed so we see end-to-end traces.&lt;BR /&gt;&lt;BR /&gt;With the way the application processes tasks (I'm oversimplifying here) a thread writes a statement to a DB and another thread picks it up to continue processing, but Dynatrace issues a unique Trace ID for each, so we can't see the whole transaction, end-to-end, as a single trace.&lt;BR /&gt;&lt;BR /&gt;We know that OTel has a "set trace ID" function that we could use - since the original TraceID is stored in the database, but we're wondering whether enabling the OTel Span Sensor feature for OneAgent would allow us to leverage the function, or if there is any other way around it.&lt;BR /&gt;&lt;BR /&gt;If any of you have ran into similar issues with Trace Continuity in Asynchronous Processing applications and could share how you handled, it would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2026 20:25:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/OpenTelemetry-Span-Sensor-For-OneAgent-Set-Trace-ID-Function/m-p/300042#M39102</guid>
      <dc:creator>victor_correa</dc:creator>
      <dc:date>2026-05-28T20:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: OpenTelemetry Span Sensor For OneAgent - Set Trace ID Function</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/OpenTelemetry-Span-Sensor-For-OneAgent-Set-Trace-ID-Function/m-p/300106#M39108</link>
      <description>&lt;P&gt;The OTEL Span Sensor is for capturing OpenTelemetry spans from your application. This works along with OneAgent tracing.&lt;BR /&gt;&lt;BR /&gt;In the case you describe - you can use OpenTelemetry and also still the OneAgent SDK (you don't mention a particular language, I assume it's one of the supported ones). In both cases, you need to pass the trace context from one thread to another. So you will need to extend your database calls to store the trace context (both trace id and span id, you cannot use your own identifier here as trace id). Or if it's a single process, you can store it in the memory and look it up (just thinking, I don't know you application).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Anyway, I'd recommend thinking once again if this really should be a single trace. You mention you have already a second trace (thread that picks up record in the database). So you would need to disable the sensor that starts the second trace in OneAgent features anyway. But from my point of view, you are mixing the tracing with business data.&amp;nbsp; If there is a significant delay expected between producer and consumer threads, you might run into some limitations of continuing existing trace. In your case, I'd consider creating &lt;A href="https://opentelemetry.io/docs/concepts/signals/traces/#span-links" target="_blank"&gt;span links with OpenTelemetry&lt;/A&gt; instead.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you want it in a single trace anyway, and you don't use OpenTelemetry in your application, OneAgent SDK might be easier to use (I'd probably use &lt;A href="https://github.com/Dynatrace/OneAgent-SDK-for-Java#trace-messaging" target="_blank"&gt;trace messaging&lt;/A&gt;&amp;nbsp;in this case).&lt;BR /&gt;&lt;BR /&gt;I hope this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2026 20:53:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/OpenTelemetry-Span-Sensor-For-OneAgent-Set-Trace-ID-Function/m-p/300106#M39108</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2026-05-29T20:53:08Z</dc:date>
    </item>
  </channel>
</rss>

