Announcing Instana Instrumentation for Azure App Services

With the latest release, Instana is introducing .NET Framework support for Azure App Service Instrumentation to further increase our customer’s observability in serverless environments.

What is Azure App Service?

App Service is a feature in Azure that allows you to create web applications, mobile applications, RESTful APIs in your language, without managing infrastructure. App Service not only adds the power of Microsoft Azure to your application, such as security, load balancing, autoscaling, and automated management. You can also take advantage of its DevOps capabilities, such as continuous deployment from Azure DevOps, GitHub, Docker Hub, and other sources, package management, staging environments, custom domain, and TLS/SSL certificates.

The Problem

Using App Service in Azure to deploy .NET applications is convenient and versatile, but it also presents the challenge of monitoring and observability when the infrastructure spans multiple cloud vendors.

Instana solves this problem by introducing instrumentation to App Service, which enables automatic tracing and monitoring for all of your Apps in your Azure subscription.

How it works

To get it working, there are a couple of easy steps to follow. The first thing needed is a way how to collect entity information and metrics about all of your AppServices. To do so, you need to have a running Instana Agent configured to monitor your Azure subscription.

Collecting metrics

The easiest way to do so is to run a VM inside your Azure subscription where you would have an Instana agent installed and configured to discover all of your Azure services. Here you can find detailed information on how to do that.

Once the monitoring of the Azure subscription is done, within the Instana UI Entity map, you will see all discovered Azure services, including App Services. It should look something like this:

Clicking on Open Dashboard will lead you to a screen where you will find all the metrics and entity information for that specific service you have selected.

Collecting traces

After having entities and metrics, we can start collecting traces that will be tied to those entities. To do so, you need to add an extension to your AppService.

Go to Azure Portal, and locate the AppService you like to have instrumented. Once you have opened it in Azure Portal, find the left-side menu Extensions link and open it.

Once opened, from the Extensions page, you can easily add a new extension (or see already installed extensions and modify them from there – like update them or remove them). You’ll need to add the **Instana Tracing AppService** extension.

Once the Instana Tracing AppService extension is installed, you can open it up and you will see some details about the extension:

On top of that page, there will be a Browse button, that you need to click. It will lead you to a page where you can configure the Instrumentation:

Once you enter all the information there, please click on the Update Config button. This will save the information within the context of the AppService.

Now, the only remaining thing needed is to restart the AppService. You can do that from the Dashboard of the AppService. When you run your application, it should have Instana rewriter attached to it and we should start collecting traces.

To see the traces, go back to Instana UI, you can open the dashboard of your AppService entity shown above, and from there click on the Upstream / Downstream button. This will show you traces collected for this entity.

Supported Versions

Currently, AppService instrumentation is limited to .Net Framework 4.5.1+ runtimes, with support for .Net Core coming soon.

Troubleshooting and miscellaneous

Bitness of the application

When configuring the Instana Instrumentation through the installed extension in Azure, you will see an Enable 64 bit checkbox. This might be confusing at first, but, depending on the bitness of your application, we have to attach the appropriate rewriter. The thing is, we don’t know at that point what is the bitness of your application. By default, when you deploy the application through Visual Studio to Azure AppService, it will be installed in 32-bit mode. This can be changed in the configuration of the AppService, by going to Configuration → General Settings:

If you are using a 64-bit mode, please enable it in the Instana Tracing AppService Extension configuration, otherwise, we will fail to attach and collect traces.

Tracing doesn’t work

There are a couple of things to check before contacting our support team.

  • Firstly, check that the above-mentioned bitness is correctly configured – both in the AppService configuration, and in the Instana Tracing AppService extension configuration.
  • Make sure that the Agent Key and Endpoint URL in the Instana Tracing AppService extension is set correctly. This information is available through the Instana UI or in our documentation.
  • Check for errors in Event logs by opening Diagnose and solve problems → Application Event Logs
Event logs
  • Open up the Kudu Process Explorer by opening the Advanced Tools and then check if the w3wp process has Instana.Profiler_x64.dll module attached.

If all of the above is correct, but tracing still doesn’t work, please contact our support team.

Play with Instana’s APM Observability Sandbox

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.