Skip to content

Commit d066ca4

Browse files
committed
Table
1 parent 90883ec commit d066ca4

File tree

1 file changed

+12
-31
lines changed

1 file changed

+12
-31
lines changed

articles/azure-monitor/app/java-standalone-upgrade-from-2x.md

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,17 @@ auto-instrumentation which is provided by the 3.x Javaagent.
1717

1818
## Step 1: Update dependencies
1919

20-
* If you are using `applicationinsights-core` and/or `applicationinsights-web` dependencies, update those to the latest
21-
3.x version.
22-
* If you are using `applicationinsights-web-auto` dependency, remove that and replace it with the latest 3.x version of
23-
`applicationinsights-web`.
24-
* If you are using `applicationinsights-logging-log4j1_2`, `applicationinsights-logging-log4j2`,
25-
and/or `applicationinsights-logging-logback`, remove those dependencies, since loggers are now auto-instrumented in
26-
3.x and these custom logging appenders are no longer needed.
27-
* If you are using `applicationinsights-spring-boot-starter`, remove that and replace it with the latest 3.x version of
28-
`applicationinsights-web`.
29-
* Note: the cloud role name will no longer default to `spring.application.name`, see the
30-
[3.x configuration docs](./java-standalone-config.md#cloud-role-name) for configuring the cloud role name.
31-
32-
## Step 2: Remove references from web.xml (if any)
33-
34-
If you have the Application Insights web filter `com.microsoft.applicationinsights.web.internal.WebRequestTrackingFilter`
35-
added your web.xml, remove that, since requests are now auto-instrumented in 3.x and this custom web filter is no longer
36-
needed, e.g. remove
37-
38-
```
39-
<filter>
40-
<filter-name>ApplicationInsightsWebFilter</filter-name>
41-
<filter-class>com.microsoft.applicationinsights.web.internal.WebRequestTrackingFilter</filter-class>
42-
</filter>
43-
<filter-mapping>
44-
<filter-name>ApplicationInsightsWebFilter</filter-name>
45-
<url-pattern>/*</url-pattern>
46-
</filter-mapping>
47-
```
48-
49-
## Step 3: Add the 3.x Javaagent
20+
| 2.x dependency | Action | Remarks |
21+
|----------------|--------|---------|
22+
| `applicationinsights-core` | Update the version to `3.4.0` or later | |
23+
| `applicationinsights-web` | Update the version to `3.4.0` or later, and remove the Application Insights web filter your `web.xml` file. | |
24+
| `applicationinsights-web-auto` | Replace with `3.4.0` or later of `applicationinsights-web` | |
25+
| `applicationinsights-logging-log4j1_2` | Remove the dependency and remove the Application Insights appender from your log4j configuration. | This is no longer needed since Log4j 1.2 is auto-instrumented in the 3.x Javaagent. | |
26+
| `applicationinsights-logging-log4j2` | Remove the dependency and remove the Application Insights appender from your log4j configuration. | This is no longer needed since Log4j 2 is auto-instrumented in the 3.x Javaagent. | |
27+
| `applicationinsights-logging-log4j1_2` | Remove the dependency and remove the Application Insights appender from your logback configuration. | This is no longer needed since Logback is auto-instrumented in the 3.x Javaagent. | |
28+
| `applicationinsights-spring-boot-starter` | Replace with `3.4.0` or later of `applicationinsights-web` | The cloud role name will no longer default to `spring.application.name`, see the [3.x configuration docs](./java-standalone-config.md#cloud-role-name) for configuring the cloud role name. |
29+
30+
## Step 2: Add the 3.x Javaagent
5031

5132
Add the 3.x Javaagent to your JVM command-line args, e.g.
5233

@@ -59,7 +40,7 @@ If you were using the Application Insights 2.x Javaagent, just replace your exis
5940
Note: if you were using the spring-boot-starter and if you prefer, there is an alternative to using the Javaagent, see
6041
[3.x Spring Boot](./java-spring-boot.md).
6142

62-
#### Step 4: Configure your Application Insights connection string
43+
## Step 3: Configure your Application Insights connection string
6344

6445
[Configure the connection string](./java-standalone-config.md#connection-string).
6546

0 commit comments

Comments
 (0)