This repo is not currently maintained or supported by Microsoft. Check out our official documentation for the latest investments in container monitoring.
Visual Studio Application Insights for Docker helps you monitor your containerized applications by collecting telemetry about the performance and activity of your Docker host, Docker containers and the applications running within them. The Application Insights container talks to the Docker agent and sends telemetry data back to Application Insights, providing you with diagnostics and data analysis tools.
- Performance counters with Docker context (Docker host, image and container). In the Application Insights portal, you’ll be able to filter and group the counters by context.
- Container events such as start, stop, kill.
- Container error information.
For applications that are instrumented with the Application Insights SDK for Java:
- All the data mentioned above.
- The Docker context (Docker host, image and container) is added to all telemetry data types collected by the Application Insights SDK (exceptions, http requests, events). This allows you to filter and segment your data by context.
- Obtain the instrumentation key of your Application Insights resource. (Look in the Essentials drop-down.) If you don’t have a resource, create a new one.
- Run the following command, replacing %app_ikey% with your instrumentation key: docker run -v /var/run/docker.sock:/docker.sock -d microsoft/applicationinsights ikey=%app_ikey%
- If your application is instrumented with the Application Insights SDK for Java, add the following line into the ApplicationInsights.xml file in your project, under the element:
Note: Only a single container is required per Docker host. If your application is deployed on multiple Docker hosts, then create an instance of this image on every host.
To get full Docker experience in Application Insights portal, please read Monitor Docker applications in Application Insights