|
1 | 1 | # Application Insights for Java |
2 | | -| Build & Unit Tests | Smoke Tests | |
3 | | -:-:|:-: |
4 | | -|  |  | |
5 | 2 |
|
6 | | -## Introduction |
| 3 | +See documentation at https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-in-process-agent. |
7 | 4 |
|
8 | | -This is the repository of the Java SDK for [Azure Application Insights](https://azure.microsoft.com/en-us/services/application-insights/). Application Insights is a service that monitors the availability, performance and usage of your application. The SDK sends telemetry about the performance and usage of your app to the Application Insights service where your data can be visualized in the [Azure Portal](https://portal.azure.com). The SDK automatically collects telemetry about HTTP requests, dependencies, and exceptions. You can also use the SDK to send your own events and trace logs. |
| 5 | +## If you need to build locally |
9 | 6 |
|
10 | | -For more information please refer to: |
| 7 | +Download the main repo and submodule: |
11 | 8 |
|
12 | | -* [Getting started with Application Insights in a Java web project](https://azure.microsoft.com/documentation/articles/app-insights-java-get-started/) |
13 | | -* [Application Insights overview](https://azure.microsoft.com/services/application-insights/) |
14 | | -* [Application Insights with SpringBoot](https://docs.microsoft.com/en-us/java/azure/spring-framework/configure-spring-boot-java-applicationinsights) |
| 9 | +``` |
| 10 | +git clone https://github.com/microsoft/ApplicationInsights-Java |
| 11 | +cd ApplicationInsights-Java |
| 12 | +git submodule init |
| 13 | +git submodule update |
| 14 | +``` |
15 | 15 |
|
16 | | -The following packages are built in this repository: |
| 16 | +Publish all the artifacts from the submodule to your local maven repository: |
17 | 17 |
|
18 | | -| Base API and channel: | Web applications instrumentation: | Application Insights SpringBoot Starter: | |
19 | | -|-|-|-| |
20 | | -[](https://search.maven.org/remote_content?g=com.microsoft.azure&a=applicationinsights-core&v=latest) | [](https://search.maven.org/remote_content?g=com.microsoft.azure&a=applicationinsights-web&v=latest) | [](https://search.maven.org/remote_content?g=com.microsoft.azure&a=applicationinsights-spring-boot-starter&v=latest) | |
| 18 | +``` |
| 19 | +cd otel |
| 20 | +./gradlew publishToMavenLocal |
| 21 | +cd .. |
| 22 | +``` |
21 | 23 |
|
22 | | -| Logback adaptor: | Log4J 2 adaptor: | Log4J 1.2 adaptor: | |
23 | | -|-|-|-| |
24 | | -| [](https://search.maven.org/remote_content?g=com.microsoft.azure&a=applicationinsights-logging-logback&v=latest) | [](https://search.maven.org/remote_content?g=com.microsoft.azure&a=applicationinsights-logging-log4j2&v=latest) | [](https://search.maven.org/remote_content?g=com.microsoft.azure&a=applicationinsights-logging-log4j1_2&v=latest) | |
| 24 | +Build the agent jar file: |
25 | 25 |
|
26 | | -## To upgrade to the latest SDK |
| 26 | +``` |
| 27 | +./gradlew -DskipWinNative=true :agent:agent:shadowJar |
| 28 | +``` |
27 | 29 |
|
28 | | -After you upgrade, you'll need to merge back any customizations you made to `ApplicationInsights.xml`. Take a copy of it to compare with the new file. |
29 | | - |
30 | | -*If you're using Maven or Gradle* |
31 | | - |
32 | | -1. If you specified a particular version number in `pom.xml` or `build.gradle`, update it. |
33 | | -2. Refresh your project's dependencies. |
34 | | - |
35 | | -*Otherwise* |
36 | | - |
37 | | -* Download the latest version of [Application Insights Java SDK](https://docs.microsoft.com/en-us/azure/application-insights/app-insights-java-get-started), [scroll down to the getting started section](https://docs.microsoft.com/en-us/azure/application-insights/app-insights-java-get-started) and follow the instructions to manually download the SDK and replace the old `.jar` files. |
38 | | - |
39 | | -Compare the old and new `ApplicationInsights.xml`. Many of the changes you see are because we added and removed modules. Reinstate any customizations that you made. |
| 30 | +The agent jar file should now be available under `agent/agent/build/libs`. |
40 | 31 |
|
41 | 32 | ## Microsoft Open Source Code of Conduct |
42 | 33 |
|
|
0 commit comments