OTel-Shoppin’ – Combining Instana with OpenTelemetry in Practice

April 19, 2022

Instana AutoTrace: Fully Embracing OpenTelemetry

If you’ve been following Instana, you probably know about Robot-Shop, which is a microservice demo application that’s easy to launch and makes for a good showcase for Instana.

Robot-Shop got a little sibling: OTel-Shop. OTel-Shop is a direct adaption of Robot-Shop – just based on OpenTelemetry. It showcases how to apply OpenTelemetry instrumentation to services in varying programming language environments.

Service Dependency map of OTel-Shop

Reusing 0pen-source instrumentation

OpenTelemetry aims to provide a vendor-neutral toolkit for harvesting traces, metrics and logs from services. The project is under a shared governance in the CNCF and everyone is invited to participate. With Instana, you have the choice: Rely on our AutoTrace components, or use OpenTelemetry artifacts.

The OTel-Shop example application is using OpenTelemetry OSS components exclusively for in-process data collection and will then use our very own Instana Agent to augment the data collected with the deep infrastructure knowledge that our Instana Agent is collecting.

Best of both worlds

This example application uses OpenTelemetry tracing, metrics and our host agent as a collector.

That way you can leverage our existing infrastructure observations and augment them with new signals generated by OpenTelemetry components.

For metrics, we leverage our existing Custom Metrics mechanic to show OpenTelemetry metrics in-context of their creation.

For traces, Instana does as well enable full infrastructure insights. We detect the emitting process and enable direct navigation from the server span generated by the OpenTelemetry Java instrumentation to the process that generated it.

How do I apply OpenTelemetry to my service landscape?

The OTel-Shop example application highlights how some of the modifications you would do look like. Most of them are pretty straight-forward!

For NodeJS for example, we need to boot up the SDK and configure the output. By modifying the Dockerfile of the service to require the tracer.js file before the server is executed, we make sure the tracer is actually loaded and going.

When looking closely at the code, you can see that the SDK is configured to automatically apply instrumentations to known code paths. This includes for example HTTP servers like express.

For Java on the other hand, the first step is to include the OpenTelemetry JavaAgent in your JVM process. This can be done without further modifications on the service code itself. For Java, the OpenTelemetry artifact does some byte-code modifications once initialized and will start generating traces right away.

OTel Shop has more examples in store:

Compatibility with Instana AutoTrace

Instana in-process collectors are tuned to understand, assume and propagate the w3c trace-context correlation information to to provide seamless integration between the two worlds.

So as long as your OpenTelemetry services are configured to enable w3c trace-context propagators (which they are by default), you can enjoy full trace-continuity over HTTP.

Summary

We think OpenTelemetry has a bright future ahead! Many pieces are into place right now that enable seamless usage of OpenTelemetry components with Instanas AutoTrace technology.

That in return enables you to use the full Instana toolkit available when involving OpenTelemetry for instrumentation.

Try out Instana with a guided tour in our Play With environment.

Play with Instana’s APM Observability Sandbox

Announcement, Engineering
Written with Willian Carvalho Since Instana Node.js collector version 1.134.0 in September, the Node.js tracer includes the Instana OpenTelemetry exporter for Node.js. You can find a guide for using the Instana Node.js...
|
Developer, Engineering, Product
The OpenTelemetry Collector is the central data collection mechanism for the OpenTelemetry project. We're going to focus on different angles in subsequent articles, but for now let's look at it more generally....
|
Developer, Product, Thought Leadership
In my last blog post, I talked about the history and rapid adoption of the OpenTelemetry project. Today we discuss the progress made in terms of end-to-end compatibility between distributed tracing with...
|

Start your FREE TRIAL today!

Instana, an IBM company, provides an Enterprise Observability Platform with automated application monitoring capabilities to businesses operating complex, modern, cloud-native applications no matter where they reside – on-premises or in public and private clouds, including mobile devices or IBM Z.

Control hybrid modern applications with Instana’s AI-powered discovery of deep contextual dependencies inside hybrid applications. Instana also gives visibility into development pipelines to help enable closed-loop DevOps automation.

This provides actionable feedback needed for clients as they to optimize application performance, enable innovation and mitigate risk, helping Dev+Ops add value and efficiency to software delivery pipelines while meeting their service and business level objectives.

For further information, please visit instana.com.