<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Minu on Medium]]></title>
        <description><![CDATA[Stories by Minu on Medium]]></description>
        <link>https://medium.com/@minurose.a?source=rss-2622ce94f404------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Minu on Medium</title>
            <link>https://medium.com/@minurose.a?source=rss-2622ce94f404------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 12:22:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@minurose.a/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Solving incomplete traces in Instana: Using configuration-based SDK to inject entry spans]]></title>
            <link>https://medium.com/ibm-cloud/solving-incomplete-traces-in-instana-using-configuration-based-sdk-to-inject-entry-spans-118192bee998?source=rss-2622ce94f404------2</link>
            <guid isPermaLink="false">https://medium.com/p/118192bee998</guid>
            <category><![CDATA[ibm-instana]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Minu]]></dc:creator>
            <pubDate>Mon, 29 Sep 2025 04:24:25 GMT</pubDate>
            <atom:updated>2025-10-07T08:50:30.104Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author: </strong>Minu Rose John A</p><p>IBM Instana is an advanced observability platform designed to provide real-time insights into the performance and health of modern applications. It provides automatic and intelligent distributed tracing by capturing spans across services and components in real time. It monitors each request as it flows through microservices, databases, message queues, and external APIs — building a complete trace.</p><p>In distributed tracing, entry spans mark the beginning of a request’s lifecycle within a service, while exit spans represent outbound calls to other services or systems. However, in some cases — especially with legacy systems or partially instrumented services — only exit spans are created. This creates a visibility gap, making it difficult to trace the full lifecycle of a request. Instana supports configuration-based SDKs which makes Instana especially effective in environments where code-level changes are limited or not feasible.</p><p>This blog explores how to create entry spans using configuration-based SDK in Instana which empowers users to enhance trace completeness without modifying application code.</p><p><strong>🚧 The problem: Exit-only tracing</strong></p><p>Exit span represents outbound calls from a service (for example, HTTP requests, database queries). But without corresponding entry spans, users lose context about:</p><ul><li>Where the request originated.</li><li>How long the service took to process it.</li><li>What metadata (e.g., headers, user info) was involved.</li></ul><p>This leads to incomplete traces, making it harder to debug issues, analyze performance, or visualize service dependencies.</p><p><strong>🛠️ The solution: Configuration-based SDK</strong></p><p>To address this, you can leverage the configuration-based SDK on Instana to programmatically inject <strong>entry spans</strong> into the trace data. This approach allows you to simulate the beginning of a request, even when the application itself doesn’t emit entry spans.</p><p><strong>✨ Key benefits:</strong></p><p>Here are some of the key benefits of leveraging configuration-based SDK in Instana:</p><ul><li><strong>Improved trace completeness</strong>: Entry spans help reconstruct the full journey of a request.</li><li><strong>Better observability</strong>: Enables more accurate service maps and dependency graphs.</li><li><strong>Minimal code changes</strong>: Configuration-based SDK allows span creation without modifying application logic.</li><li><strong>Manual flexibility</strong>: Entry spans can also be added manually in technologies where auto-instrumentation is not available, ensuring consistent observability.</li></ul><p><strong>⚙️ Step-by-step guide to set up configuration-based SDK to inject entry spans</strong></p><p>To set up the configuration-based SDK in Instana, complete the following steps:</p><p><strong>1. Identify the application entry point</strong></p><p>You need to determine where the application receives its request. This could be:</p><ul><li>An HTTP request (through HttpServlet, Filter, Spring Controller)</li><li>A message listener (for example, Kafka, JMS, SQS)</li><li>A scheduled task.</li></ul><p><strong>2. Define the entry span configuration</strong></p><p>To create an entry for scheduled methods, target the specific class and method name where the job is defined.</p><p>To illustrate the setup process, the blog will use a Quarkus application with scheduled jobs as the working example.</p><p><strong>🧭 Instrumenting scheduled jobs in Quarkus: Two approaches</strong></p><p>When it comes to creating entry spans for scheduled jobs in a Quarkus application using configuration-based SDKs, you have two viable strategies:</p><p><strong>🔹 Option 1: Instrument individual scheduled methods</strong></p><p>This approach targets specific methods annotated with @Scheduled, such as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2dKmJ8_ldR5x4EmdD847FQ.png" /></figure><p><strong>Configuration </strong>(configuration.yaml)</p><pre>sdk:<br>      targets:<br>         - match:<br>            type: class<br>            name: com.example.ScheduledTasks<br>            method: runJob<br>          span:<br>            name: quarkus<br>            type: ENTRY<br>            stackDepth: 10   </pre><p>Explanation:</p><ul><li><strong>type</strong>: entry ensures this span becomes the root or a new trace segment.</li><li><strong>name</strong>: defines the fully qualified name of the class</li><li><strong>method</strong>: the method to instrument</li></ul><p><strong>🔹 Option 2: Instrument the Quarkus internal scheduler (ScheduledTask.run())</strong></p><p>A more generic and scalable alternative is to target the internal class used by Quarkus to execute all scheduled jobs:</p><pre>sdk: <br>      targets: <br>        - match: <br>            type: class <br>            name: io.quarkus.scheduler.runtime.SimpleScheduler$ScheduledTask <br>            method: doInvoke <br>          span: <br>            name: quarkus <br>            type: ENTRY <br>            stackDepth: 10 </pre><p>This automatically captures all scheduled jobs, without needing separate rules for each method.</p><p><strong>3. Verifying your configuration-based SDK setup</strong></p><p>After adding your instrumentation rules, it’s important to confirm that the configuration.yaml is parsed correctly and that spans are being generated as expected. Without this check, it can be tricky to know whether missing spans are due to misconfiguration or actual application behavior. <br> <br>To ensure configuration-based SDK is working as expected, follow these steps to verify your configuration-based SDK setup.</p><p><strong>Steps to verify your configuration-based SDK setup:</strong></p><ol><li>Check agent logs</li></ol><ul><li>On startup, the agent should log something like:</li></ul><pre>INFO | LoggerEndpoint | JVM (PID) - Spent xx ms and xxx KiB of Metaspace for instrumentation [sdk]</pre><p>If you don’t see this, it could be that the YAML file is not properly referenced.</p><p>2. Check your spans</p><ul><li>Review the collected trace log data to ensure SDK-related spans are present.</li></ul><p>Example of SDK-related span entries:</p><pre>2025–07–07T07:20:06.119+0000|1|S|4639|110||:||-|EN|052d6bf37f16034c7:0:52d6bf37f16034c7|sdk:sdk.quarkus-hello|*com.instana.agent.instrumentation.sdk.SdkPlugin:start:789:SdkPlugin.java</pre><p><strong>4. 🔍 Viewing the entry and exit spans on the Instana UI</strong></p><p>Once the configuration-based SDK is successfully set up and the application is running, the SDK entry spans will begin to appear alongside the existing exit spans. Now you can view the trace details in the “Analytics” page on Instana.</p><p>This allows you to:</p><ul><li>Visualize the complete trace from entry to exit.</li><li>Confirm that the parent-child relationships between spans are correctly established.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iA8Qjt2YROFg7nUlKI1YbQ.png" /></figure><p><strong>Conclusion</strong></p><p>Generating entry spans using Instana’s configuration-based SDK is a powerful technique to enhance observability in applications that emit only exit spans. It bridges the gap in distributed tracing, enabling teams to gain deeper insights without invasive code changes.</p><p>By strategically defining entry span rules for key entry points, you can:</p><ul><li>Ensure every request has a trace root.</li><li>Enable better trace correlation.</li><li>Enhance observability without modifying customer code.</li></ul><p>Whether you’re working with scheduled jobs, message consumers, or partially instrumented services, the configuration-based SDK gives you the flexibility to complete your traces and gain the full benefits of Instana’s intelligent monitoring.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=118192bee998" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ibm-cloud/solving-incomplete-traces-in-instana-using-configuration-based-sdk-to-inject-entry-spans-118192bee998">Solving incomplete traces in Instana: Using configuration-based SDK to inject entry spans</a> was originally published in <a href="https://medium.com/ibm-cloud">IBM Cloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>