This commit is contained in:
Gal Haggiag 2016-05-22 13:57:55 +03:00
Родитель f09e963716
Коммит ad017180a0
3 изменённых файлов: 67 добавлений и 1 удалений

27
0.9.2/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,27 @@
FROM java:8u66
WORKDIR /usr/docker
RUN apt-get -y -qq update \
&& apt-get -y -qq remove python \
&& apt-get -y -qq autoremove \
&& apt-get -y -qq install python3.4 \
&& ln -s /usr/bin/python3.4 /usr/bin/python \
# TODO: run a script to install all libraries from requirements.txt
&& apt-get -y -qq install python3-pip \
&& python -m pip install python-dateutil==2.4.2 \
# docker-py is dependent on the 'requests' module which currently has a bug. Therefore, the docker-py
# must be installed last otherwise no other modules can be installed.
&& python -m pip install docker-py==1.3.1 \
# Download and build sources
&& export TERM=${TERM:-dumb} \
&& git clone https://github.com/Microsoft/ApplicationInsights-Docker \
&& cd /usr/docker/ApplicationInsights-Docker \
&& git checkout tags/v0.9.2 \
&& chmod +x ./gradlew \
&& ./gradlew shadow
WORKDIR /usr/docker/ApplicationInsights-Docker/build/docker/
ENTRYPOINT ["java","-cp", "/usr/docker/ApplicationInsights-Docker/build/docker/ApplicationInsights-Docker-0.9.jar", "com.microsoft.applicationinsights.AgentBootstrapper"]

38
0.9.2/README.md Normal file
Просмотреть файл

@ -0,0 +1,38 @@
Visual Studio [Application Insights][appinsights-overview] 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][appinsights-home], providing you with diagnostics and data analysis tools.
## What data will I get for my containerized apps?
#### For applications that are not instrumented with an Application Insights SDK:
* Performance counters with Docker context (Docker host, image and container). In the Application Insights portal, youll 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][appinsights-java-sdk]:
* 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.
## Supported tags
* [`0.9.2`, `latest` _(0.9.2/Dockerfile)_](https://github.com/Microsoft/ApplicationInsights-Docker-CI/tree/master/0.9.2/Dockerfile)
* [`0.9.1`, _(0.9.1/Dockerfile)_](https://github.com/Microsoft/ApplicationInsights-Docker-CI/tree/master/0.9.1/Dockerfile)
* [`0.9.0`, _(0.9.0/Dockerfile)_](https://github.com/Microsoft/ApplicationInsights-Docker-CI/tree/master/0.9.0/Dockerfile)
## How to use this Image
1. Obtain the instrumentation key of your Application Insights resource. (Look in the Essentials drop-down.) If you dont have a resource, [create a new one][appinsights-create-resource].
2. 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%
3. 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 <TelemetryInitializers> element:
<Add type="com.microsoft.applicationinsights.extensibility.initializer.docker.DockerContextInitializer"/>
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.
## How to see Docker data
To get full Docker experience in [Application Insights portal][azure-portal], please read [Monitor Docker applications in Application Insights][appinsights-docker-article]
[appinsights-home]: https://azure.microsoft.com/en-us/services/application-insights/
[appinsights-overview]: https://azure.microsoft.com/en-us/documentation/articles/app-insights-overview/
[appinsights-java-sdk]: https://azure.microsoft.com/en-us/documentation/articles/app-insights-java-get-started/
[appinsights-create-resource]: https://azure.microsoft.com/documentation/articles/app-insights-create-new-resource/
[azure-portal]: https://portal.azure.com/
[appinsights-docker-article]: https://azure.microsoft.com/en-us/documentation/articles/app-insights-docker/

Просмотреть файл

@ -13,7 +13,8 @@ The Application Insights container talks to the Docker agent and sends telemetry
* 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.
## Supported tags
* [`0.9.1`, `latest` _(0.9.1/Dockerfile)_](https://github.com/Microsoft/ApplicationInsights-Docker-CI/tree/master/0.9.1/Dockerfile)
* [`0.9.2`, `latest` _(0.9.2/Dockerfile)_](https://github.com/Microsoft/ApplicationInsights-Docker-CI/tree/master/0.9.2/Dockerfile)
* [`0.9.1`, _(0.9.1/Dockerfile)_](https://github.com/Microsoft/ApplicationInsights-Docker-CI/tree/master/0.9.1/Dockerfile)
* [`0.9.0`, _(0.9.0/Dockerfile)_](https://github.com/Microsoft/ApplicationInsights-Docker-CI/tree/master/0.9.0/Dockerfile)
## How to use this Image