Your Privacy

This site uses cookies to enhance your browsing experience and deliver personalized content. By continuing to use this site, you consent to our use of cookies.
COOKIE POLICY

Skip to main content

Zero-Code Telemetry with OpenTelemetry’s OBI

Zero-Code Telemetry with OpenTelemetry’s OBI
Back to insights

Full distributed tracing and exception capture for any application — without writing a single line of instrumentation code.

View the source code on GitHub →

The Premise

Observability is essential for understanding what’s happening inside your services, but instrumenting an application by hand — adding trace spans, logging calls, and metric counters throughout your codebase — is tedious and intrusive. What if you could get rich telemetry from an application that has zero logging or tracing code?

I built a small API with intentionally no logging, no tracing, and no OpenTelemetry dependencies in the code at all, then attached OpenTelemetry’s zero-code instrumentation at runtime. The result: full distributed traces, exception details, and HTTP metadata captured in Jaeger — all from a completely un-instrumented application. For this demo I chose Java and Spring Boot, but OBI supports a wide range of languages and frameworks — including .NET, Node.js, Python, Go, PHP, Ruby, and more.

What is OpenTelemetry OBI?

OBI (OpenTelemetry eBPF Instrumentation) is a zero-code approach to observability that works at the kernel level using eBPF — a powerful Linux kernel technology that allows safe, sandboxed programs to run directly within the kernel at runtime without requiring changes to the kernel source code or loading kernel modules. Rather than requiring language-specific agents or SDK changes in your codebase, OBI hooks into system calls and network activity to automatically generate traces, metrics, and logs. Because it operates below the application layer, it works across languages and runtimes — your application code stays completely untouched.

The Architecture

The entire stack runs in Docker Compose with four services:

🌐 React App – Vite + Redux frontend on port 80

☕ API Service – Spring Boot + OBI agent on port 8080

📡 OTel Collector – Receives, batches & routes telemetry

🔍 Jaeger – Trace UI on port 16686

The React frontend calls the API, which is a plain REST service with two endpoints (/posts and /users) backed by simple in-memory data. Nothing fancy — and that’s the point. The application has no OpenTelemetry dependency in its own build file. All the magic happens at the infrastructure level. In this Java example, it’s a single line in the Dockerfile:

# Java example — download the OBI agent at build time

RUN curl -L -o opentelemetry-javaagent.jar \

https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar

# Attach it at runtime — other languages have equivalent one-liners ENTRYPOINT ["java", "-javaagent:/opentelemetry-javaagent.jar", "-jar", "/app.jar"]

A handful of environment variables handle the rest of the configuration — and these are the same regardless of language:

environment:

- OTEL_SERVICE_NAME=obi-test-api

- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318

- OTEL_METRICS_EXPORTER=otlp

- OTEL_LOGS_EXPORTER=otlp

The OpenTelemetry Collector sits between the API and Jaeger, receiving traces via OTLP, batching them, and forwarding to Jaeger’s native OTLP endpoint. Metrics and logs are currently routed to a debug exporter for visibility during development.

What You Get — For Free

After running make up and hitting a few endpoints through the React app, the Jaeger UI immediately starts populating with trace data.

jaeger UI

Jaeger’s search view showing 9 captured traces across GET /posts, GET /posts/{id}, and GET /users. The scatter plot shows response times at a glance, with one clear outlier containing an error.

Without writing any instrumentation code, the agent automatically captures:

HTTP request metadata — method, URL, status code, response time, and client IP for every request handled by the framework. Trace context propagation — each request gets a unique trace ID and span, ready for correlation across services. Error flagging — traces that result in exceptions are immediately tagged, making them easy to spot in the scatter plot and trace list.

Exception Capture in Detail

The most impressive part is what happens when something goes wrong. In this demo, the GET /posts/{id} endpoint throws an exception when a post isn’t found. Here’s what that looks like in Jaeger, with zero catch-and-log code in the application:

Jaeger trace detail showing a captured NoSuchElementException with full stack traceA detailed trace for a failed GET /posts/{id} request. OBI captures the full exception class, message, and complete stack trace — all without a single line of logging code in the application.

The trace shows the exception event with its full stack trace, the HTTP response status, request attributes, and timing — everything you’d normally need to hand-code with a logging framework and custom exception handlers. OBI intercepts it all at the framework level, and this works the same way whether your service is written in Java, Python, Node.js, or any other supported language.

Key Takeaways

1. Truly zero application changes

No SDK dependencies, no annotations, no code changes. OBI attaches at runtime and instruments your framework automatically — in any supported language.

2. Rich exception visibility

Unhandled exceptions are captured with full stack traces, making debugging straightforward even without structured logging in place.

3. Environment-variable driven

Service name, exporter endpoint, and protocol are all configured through env vars — easy to toggle per environment with no rebuilds.

4. Production-ready collector pipeline

The OTel Collector decouples your app from your backend. Swap Jaeger for Datadog, Grafana Tempo, or any OTLP-compatible tool without touching the application.

About Cody Halbleib

Cody Halbleib is a Senior Consultant on the Software team. His family is his partner, Jamie, and his Border Collie mix, Walter.

Digging In

  • Software Engineering

    Building a Consultant in the Trenches: How Playing Offensive Line Shaped My Consulting Career

    People often ask me the same question when they find out that I played college football: “Do you miss it?” On the surface, it’s a bad question with an obvious answer. Yes. However, if I give myself a minute to sit with that question, the answer is more nuanced. Yes, I miss playing football, but […]

  • Software Engineering

    Modernization That Sticks: Why Adoption, Not Just Architecture, Drives Success

    Modernizing a legacy sales platform in a large enterprise isn’t just a technical challenge, it’s a cultural and operational one. On a recent project with a Fortune 500 organization, several past attempts to replace the aging ERP system failed. Why? Because those efforts treated modernization as a software delivery exercise, not an adoption journey. When […]

  • Software Engineering

    Choosing the Right Modernization Approach

    When organizations decide it’s time to modernize their technology infrastructure, choosing the right approach is crucial. Modernization isn’t merely a technical upgrade; it’s a strategic business move that significantly impacts growth, agility, and long-term success. Here’s how your company can effectively begin to select the best modernization strategy tailored to your goals and challenges. In […]

  • Software Engineering

    TAG Panel: Differentiate Your Customer Experience

    Join the CX and Product Management Societies to hear from our panel of Human-Centered Design experts on the business value of Agentic AI.

  • Software Engineering

    The Bloated SaaS Era: Paying More for Less While Businesses Wait

    SaaS was supposed to make business faster, smarter, and more efficient. Instead, it’s become bloated, expensive, and painfully slow to change. The platforms we rely on—Salesforce, Workday, SAP, and others—haven’t truly innovated in years. Yet, they demand massive investments in re-implementation, process re-engineering, and data migration just to keep up. It’s time to ask: Are […]

  • Software Engineering

    Reid Braswell Joins UDig as Vice President, Software Engineering

    UDig is proud to welcome Reid Braswell as our new Vice President of Software Engineering. With over 13 years of experience in technology consulting, Reid brings deep expertise in digital transformation, modern software engineering, and client-focused solutions. His leadership and passion for solving complex challenges make him an exceptional addition to the UDig team. Reid’s […]