You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/java-get-started-supplemental.md
+64-25Lines changed: 64 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,55 @@
1
1
---
2
-
title: Add the JVM arg - Application Insights for Java
3
-
description: Learn how to add the JVM arg that enables Application Insights for Java.
2
+
title: Application Insights with containers
3
+
description: This article shows you how to set-up Application Insights
4
4
ms.topic: conceptual
5
-
ms.date: 03/31/2023
5
+
ms.date: 04/06/2023
6
6
ms.devlang: java
7
7
ms.custom: devx-track-java
8
8
ms.reviewer: mmcc
9
9
---
10
10
11
-
# Update your JVM args: Application Insights for Java
11
+
# Get Started (Supplemental)
12
+
13
+
## Containers
14
+
15
+
### Docker entry point
16
+
17
+
If you're using the *exec* form, add the parameter `-javaagent:"path/to/applicationinsights-agent-3.4.11.jar"` to the parameter list somewhere before the `"-jar"` parameter, for example:
If you're using a third-party container image that you can't modify, mount the Application Insights Java agent jar into the container from outside. Set the environment variable for the container
@@ -22,22 +63,19 @@ For more information, see [Monitoring Azure Functions with Azure Monitor Applica
22
63
23
64
For more information, see [Using Azure Monitor Application Insights with Spring Boot](./java-spring-boot.md).
24
65
25
-
## Third-party container images
26
-
27
-
If you're using a third-party container image that you can't modify, mount the Application Insights Java agent jar into the container from outside. Set the environment variable for the container
If you installed Tomcat via download and unzip from [https://tomcat.apache.org](https://tomcat.apache.org), you should have a file `<tomcat>/bin/catalina.sh`. Create a new file in the same directory named `<tomcat>/bin/setenv.sh` with the following content:
If the file `<tomcat>/bin/setenv.sh` already exists, modify that file and add `-javaagent:path/to/applicationinsights-agent-3.4.11.jar` to `CATALINA_OPTS`.
49
87
50
-
## Tomcat 8 (Windows)
88
+
###Tomcat 8 (Windows)
51
89
52
-
### Run Tomcat from the command line
90
+
####Run Tomcat from the command line
53
91
54
92
Locate the file `<tomcat>/bin/catalina.bat`. Create a new file in the same directory named `<tomcat>/bin/setenv.bat` with the following content:
55
93
@@ -65,13 +103,13 @@ set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-
65
103
66
104
If the file `<tomcat>/bin/setenv.bat` already exists, modify that file and add `-javaagent:path/to/applicationinsights-agent-3.4.11.jar` to `CATALINA_OPTS`.
67
105
68
-
### Run Tomcat as a Windows service
106
+
####Run Tomcat as a Windows service
69
107
70
108
Locate the file `<tomcat>/bin/tomcat8w.exe`. Run that executable and add `-javaagent:path/to/applicationinsights-agent-3.4.11.jar` to the `Java Options` under the `Java` tab.
71
109
72
-
## JBoss EAP 7
110
+
###JBoss EAP 7
73
111
74
-
### Standalone server
112
+
####Standalone server
75
113
76
114
Add `-javaagent:path/to/applicationinsights-agent-3.4.11.jar` to the existing `JAVA_OPTS` environment variable in the file `JBOSS_HOME/bin/standalone.conf` (Linux) or `JBOSS_HOME/bin/standalone.conf.bat` (Windows):
77
115
@@ -80,7 +118,7 @@ Add `-javaagent:path/to/applicationinsights-agent-3.4.11.jar` to the existing `J
80
118
...
81
119
```
82
120
83
-
### Domain server
121
+
####Domain server
84
122
85
123
Add `-javaagent:path/to/applicationinsights-agent-3.4.11.jar` to the existing `jvm-options` in `JBOSS_HOME/domain/configuration/host.xml`:
86
124
@@ -125,7 +163,7 @@ If you're running multiple managed servers on a single host, you'll need to add
125
163
126
164
The specified `applicationinsights.agent.id` value must be unique. It's used to create a subdirectory under the Application Insights directory. Each JVM process needs its own local Application Insights config and local Application Insights log file. Also, if reporting to the central collector, the `applicationinsights.properties` file is shared by the multiple managed servers, so the specified `applicationinsights.agent.id` is needed to override the `agent.id` setting in that shared file. The `applicationinsights.agent.rollup.id` can be similarly specified in the server's `system-properties` if you need to override the `agent.rollup.id` setting per managed server.
127
165
128
-
## Jetty 9
166
+
###Jetty 9
129
167
130
168
Add these lines to `start.ini`:
131
169
@@ -134,7 +172,7 @@ Add these lines to `start.ini`:
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/opentelemetry-enable.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,9 +184,10 @@ Java auto-instrumentation is enabled through configuration changes; no code chan
184
184
Point the JVM to the jar file by adding `-javaagent:"path/to/applicationinsights-agent-3.4.11.jar"` to your application's JVM args.
185
185
186
186
> [!TIP]
187
-
> For help with configuring your application's JVM args, see [Tips for updating your JVM args](./java-standalone-arguments.md).
188
-
189
-
If you develop a Spring Boot application, you can optionally replace the JVM argument by a programmatic configuration. For more information, see [Using Azure Monitor Application Insights with Spring Boot](./java-spring-boot.md).
187
+
> For scenario-specific guidance, see [Get Started (Supplemental)](./java-get-started-supplemental.md).
188
+
189
+
> [!TIP]
190
+
> If you develop a Spring Boot application, you can optionally replace the JVM argument by a programmatic configuration. For more information, see [Using Azure Monitor Application Insights with Spring Boot](./java-spring-boot.md).
0 commit comments