The IBM® Instana® platform is a great APM tool with all important capabilities to provide end-to-end observability and AIOps to the companies. The Instana platform can instrument the applications automatically using the one-agent concept where, with a single agent, it can instrument all kinds of applications.
So, why do I need to instrument an application using OpenTelemetry (Otel)? We have some good reasons why, and this example is just because the application is hosted on IBM® Cloud Foundry where we can’t install any agent. In this kind of situation, we have two options to instrument the application.
The first one is to use Instana manual instrumentation and the second one is to use Otel instrumentation and send the tracing to the Instana backend. And, in this example, we’ll use Otel to do it.
Now we can instrument the application using the Otel instructions located on the Otel documentation for Python: Python OpenTelemetry Instrumentation.
Let me show in more detail how the application was instrumented.
Otel packages to be installed:
OpenTelemetry exporters to be configured:
OpenTelemetry instrumentation variables:
Imports required:
Initializing trace provider:
Creating span for tracing:
Adding custom attributes to span:
Instana backend to receive the tracing data:
Now, with those configurations, the Instana backend will start to receive the tracing data.
Let me share some Instana screenshots to demonstrate how to get the data.
Span generated by Otel:
This span is created by Otel. You can see here a custom attribute defined on the code: amsSite.
Error call details collected by Otel:
Application error detected by the Instana platform.
Tracing details:
Application view:
Custom dashboards created using Otel data:
Chart analysis for calls overview calls, erroneous call rate, latency:
You can see here the number of calls, the error rate and latency collected by Otel.
List of traces captured:
This screenshot represents the traces generated by the application through Otel instrumentation.
Individual trace details:
It’s an individual trace created by Otel instrumentation. OpenTelemetry HTTP and custom tags:
Here you can see the custom attributes defined on the instrumentation.
Get started
Ready to try out IBM Instana and see what it can do for you?
Sign up for a free, two-week trial