<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SolvePath</title>
    <description>The latest articles on DEV Community by SolvePath (@solvepath).</description>
    <link>https://dev.to/solvepath</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3828450%2F8c51b14f-81f3-4737-b8ed-951adb1c1580.png</url>
      <title>DEV Community: SolvePath</title>
      <link>https://dev.to/solvepath</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/solvepath"/>
    <language>en</language>
    <item>
      <title>I built a tool that analyzes OpenTelemetry traces and tells you what's wrong</title>
      <dc:creator>SolvePath</dc:creator>
      <pubDate>Tue, 17 Mar 2026 03:52:52 +0000</pubDate>
      <link>https://dev.to/solvepath/i-built-a-tool-that-analyzes-opentelemetry-traces-and-tells-you-whats-wrong-d3j</link>
      <guid>https://dev.to/solvepath/i-built-a-tool-that-analyzes-opentelemetry-traces-and-tells-you-whats-wrong-d3j</guid>
      <description>&lt;p&gt;I kept staring at Jaeger trace waterfalls trying to figure out why a request was slow. 20 spans across 5 services — which one is the problem? Is it the database? A downstream&lt;br&gt;
   timeout? An N+1 query hiding in plain sight?                                                                                                                                 &lt;/p&gt;

&lt;p&gt;So I built TraceLens — you paste an OpenTelemetry trace, and it tells you:                                                                                                    &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Root cause with confidence score
&lt;/li&gt;
&lt;li&gt;Bottlenecks ranked by impact (duration + percentage)
&lt;/li&gt;
&lt;li&gt;Fix recommendations with actual code examples
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try it now                                                                                                                                                                    &lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://tracelens.dev" rel="noopener noreferrer"&gt;https://tracelens.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No signup. No API key. Click "Load sample trace" to see it analyze a real-world database constraint violation.&lt;/p&gt;

&lt;p&gt;How it works&lt;/p&gt;

&lt;p&gt;The naive approach would be to dump the entire OTLP JSON into an LLM and ask "what's wrong?" — but traces are verbose. A 10-span trace can be 15,000+ tokens of JSON.&lt;/p&gt;

&lt;p&gt;TraceLens does three things before hitting the LLM:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parse and build a span tree&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Raw OTLP JSON is a flat array of spans. TraceLens reconstructs the parent-child tree, computes the critical path (longest chain of sequential spans), and detects orphan&lt;br&gt;
  spans.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Compress into compact notation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Instead of sending raw JSON, TraceLens compresses traces into a compact tree notation:&lt;/p&gt;

&lt;p&gt;[order-service] POST /api/orders (3500ms, ERROR)&lt;br&gt;
  ├── [order-service] SELECT orders WHERE customer_id = ? (15ms, OK)&lt;br&gt;
  ├── [inventory-service] GET /api/inventory/check (800ms, OK)&lt;br&gt;
  │   └── [inventory-service] SELECT inventory WHERE sku = ? (45ms, OK)&lt;br&gt;
  └── [order-service] INSERT INTO orders (2300ms, ERROR)&lt;br&gt;
      └── DataIntegrityViolationException: duplicate key (order_ref)&lt;/p&gt;

&lt;p&gt;This is 5-7x fewer tokens than the raw OTLP JSON, while preserving all the diagnostic information.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Domain-tuned prompt&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The system prompt is specifically tuned for distributed trace analysis. It knows about common patterns like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;N+1 queries (many identical child spans)&lt;/li&gt;
&lt;li&gt;Context propagation failures&lt;/li&gt;
&lt;li&gt;Timeout cascades&lt;/li&gt;
&lt;li&gt;Connection pool exhaustion&lt;/li&gt;
&lt;li&gt;Missing indexes (fast COUNT, slow SELECT)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What the output looks like&lt;/p&gt;

&lt;p&gt;For the sample trace (a database constraint violation), TraceLens returns:&lt;/p&gt;

&lt;p&gt;Root Cause (95% confidence): The INSERT failed because order_ref 'ORD-2024-001' already exists — indicating missing idempotency handling or a race condition.&lt;/p&gt;

&lt;p&gt;Bottlenecks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;INSERT INTO orders — 2300ms (65.7% of total time)&lt;/li&gt;
&lt;li&gt;GET /api/inventory/check — 800ms (22.9%)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Recommendations (with code):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add idempotent order creation with ON CONFLICT handling&lt;/li&gt;
&lt;li&gt;Fix order_ref generation to ensure uniqueness (UUID instead of deterministic)&lt;/li&gt;
&lt;li&gt;Add duplicate check before INSERT&lt;/li&gt;
&lt;li&gt;Cache inventory lookups&lt;/li&gt;
&lt;li&gt;Add database index on order_ref&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each recommendation includes a code example you can adapt.&lt;/p&gt;

&lt;p&gt;What's next&lt;/p&gt;

&lt;p&gt;I'd love feedback from anyone working with distributed tracing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is this useful? Would you actually use it?&lt;/li&gt;
&lt;li&gt;What traces would you want to test it with?&lt;/li&gt;
&lt;li&gt;What's missing?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try it: &lt;a href="https://tracelens.dev" rel="noopener noreferrer"&gt;https://tracelens.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apache 2.0 licensed.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>java</category>
      <category>observability</category>
      <category>opentelemetry</category>
    </item>
  </channel>
</rss>
