Application Insights

Application Insights is a Microsoft Service that collects telemetry information for mobile, browser-based, or server applications. Application Insights collects the data and moves it into the cloud to process and store. The telemetry and diagnostics data can be viewed, as well as sliced and diced, through an integration with the Azure Portal. The following link provides more information on general Application Insights functionality: https://azure.microsoft.com/en-us/services/application-insights/.

Recently, Application Insights added full support for Docker containers by adding an Application Insights image to Docker Hub. Application Insights follows the approach of a “monitoring container” as we had mentioned in the container monitoring section. As a result, we can run a single instance of an Application Insights container on our Docker host VM. The service in the container talks to the Docker agent and sends the telemetry data back to Application Insights.

Application Insights supports two models for Docker.

Capture telemetry for apps not instrumented with Application Insights. This means there is no instrumentation code in the microservice, resulting in only the following Docker related data being captured:

Image Performance counters with Docker context (Docker host, image, and container)

Image Container events

Image Container error information

This data by itself is already very helpful, as we have learned before. We can get even more out of Application Insights if we instrument the microservice code.

Capture telemetry for instrumented apps.

Image Gets all the data mentioned before.

Image Adds the Docker context (Docker host, image, and container) to the captured telemetry data.


Image Note

See https://azure.microsoft.com/en-us/documentation/articles/app-insights-get-started/ for more information on how to instrument applications with Application Insights.


As mentioned previously, Application Insights offers a great UI for looking at and analyzing log data. The experience enables us to drill down into the Docker aspects of our microservices application. Application Insights offers an overview Docker blade with information for:

Container activity across Docker hosts and images

Image CPU

Image Memory

Image Network in

Image Network out

Image Block I/O

Activity by Docker host

Activity by Docker image

Active images

Active containers

In Figure 7.8, we can see the Docker overview blade for our book companion application Flak.io, showing that we currently have four Docker host machines in this cluster, the activity of the four Docker images, and the number of active containers.

Image

FIGURE 7.8: Application Insights Docker overview blade

The Docker overview blade is a good starting point for drilling deeper into each component (individual Docker host, images, and containers). Figure 7.9, for example, shows the Docker by host blade.

Image

FIGURE 7.9: Docker by host blade in Application Insights

All these features make Application Insights a very powerful and developer-focused monitoring solution for containerized microservices applications on Azure.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.154.139