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-24Lines changed: 64 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,16 @@
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
+
In the following sections, you will find information on how to get Java auto-instrumentation for specific technical environments.
12
14
13
15
## Azure App Service
14
16
@@ -18,26 +20,63 @@ For more information, see [Application monitoring for Azure App Service and Java
18
20
19
21
For more information, see [Monitoring Azure Functions with Azure Monitor Application Insights](./monitor-functions.md#distributed-tracing-for-java-applications-preview).
20
22
21
-
## Spring Boot
23
+
## Containers
22
24
23
-
For more information, see [Using Azure Monitor Application Insights with Spring Boot](./java-spring-boot.md).
25
+
### Docker entry point
26
+
27
+
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
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
88
50
-
## Tomcat 8 (Windows)
89
+
###Tomcat 8 (Windows)
51
90
52
-
### Run Tomcat from the command line
91
+
####Run Tomcat from the command line
53
92
54
93
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
94
@@ -65,13 +104,13 @@ set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-
65
104
66
105
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
106
68
-
### Run Tomcat as a Windows service
107
+
####Run Tomcat as a Windows service
69
108
70
109
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
110
72
-
## JBoss EAP 7
111
+
###JBoss EAP 7
73
112
74
-
### Standalone server
113
+
####Standalone server
75
114
76
115
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
116
@@ -80,7 +119,7 @@ Add `-javaagent:path/to/applicationinsights-agent-3.4.11.jar` to the existing `J
80
119
...
81
120
```
82
121
83
-
### Domain server
122
+
####Domain server
84
123
85
124
Add `-javaagent:path/to/applicationinsights-agent-3.4.11.jar` to the existing `jvm-options` in `JBOSS_HOME/domain/configuration/host.xml`:
86
125
@@ -125,7 +164,7 @@ If you're running multiple managed servers on a single host, you'll need to add
125
164
126
165
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
166
128
-
## Jetty 9
167
+
###Jetty 9
129
168
130
169
Add these lines to `start.ini`:
131
170
@@ -134,7 +173,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