Skip to content

Commit fd4115a

Browse files
authored
Update java-get-started-supplemental.md
1 parent 117466e commit fd4115a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/azure-monitor/app/java-get-started-supplemental.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ For more information, see [Use Application Insights Java In-Process Agent in Azu
3333

3434
If you're using the *exec* form, add the parameter `-javaagent:"path/to/applicationinsights-agent-3.5.2.jar"` to the parameter list somewhere before the `"-jar"` parameter, for example:
3535

36-
```
36+
```dockerfile
3737
ENTRYPOINT ["java", "-javaagent:path/to/applicationinsights-agent-3.5.2.jar", "-jar", "<myapp.jar>"]
3838
```
3939

4040
If you're using the *shell* form, add the Java Virtual Machine (JVM) arg `-javaagent:"path/to/applicationinsights-agent-3.5.2.jar"` somewhere before `-jar`, for example:
4141

42-
```
42+
```dockerfile
4343
ENTRYPOINT java -javaagent:"path/to/applicationinsights-agent-3.5.2.jar" -jar <myapp.jar>
4444
```
4545

@@ -48,7 +48,7 @@ ENTRYPOINT java -javaagent:"path/to/applicationinsights-agent-3.5.2.jar" -jar <m
4848

4949
A Dockerfile example:
5050

51-
```
51+
```dockerfile
5252
FROM ...
5353

5454
COPY target/*.jar app.jar
@@ -83,15 +83,15 @@ For information on setting up the Application Insights Java agent, see [Enabling
8383

8484
If you installed Tomcat via `apt-get` or `yum`, you should have a file `/etc/tomcat8/tomcat8.conf`. Add this line to the end of that file:
8585

86-
```
86+
```console
8787
JAVA_OPTS="$JAVA_OPTS -javaagent:path/to/applicationinsights-agent-3.5.2.jar"
8888
```
8989

9090
#### Tomcat installed via download and unzip
9191

9292
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:
9393

94-
```
94+
```console
9595
CATALINA_OPTS="$CATALINA_OPTS -javaagent:path/to/applicationinsights-agent-3.5.2.jar"
9696
```
9797

@@ -103,13 +103,13 @@ If the file `<tomcat>/bin/setenv.sh` already exists, modify that file and add `-
103103

104104
Locate the file `<tomcat>/bin/catalina.bat`. Create a new file in the same directory named `<tomcat>/bin/setenv.bat` with the following content:
105105

106-
```
106+
```console
107107
set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-3.5.2.jar
108108
```
109109

110110
Quotes aren't necessary, but if you want to include them, the proper placement is:
111111

112-
```
112+
```console
113113
set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-3.5.2.jar"
114114
```
115115

@@ -181,7 +181,7 @@ The specified `applicationinsights.agent.id` value must be unique. You use the v
181181

182182
Add these lines to `start.ini`:
183183

184-
```
184+
```console
185185
--exec
186186
-javaagent:path/to/applicationinsights-agent-3.5.2.jar
187187
```
@@ -209,7 +209,7 @@ Add `-javaagent:path/to/applicationinsights-agent-3.5.2.jar` to the existing `jv
209209

210210
1. In `Generic JVM arguments`, add the following JVM argument.
211211

212-
```
212+
```console
213213
-javaagent:path/to/applicationinsights-agent-3.5.2.jar
214214
```
215215

@@ -219,10 +219,10 @@ Add `-javaagent:path/to/applicationinsights-agent-3.5.2.jar` to the existing `jv
219219

220220
Create a new file `jvm.options` in the server directory (for example, `<openliberty>/usr/servers/defaultServer`), and add this line:
221221

222-
```
222+
```console
223223
-javaagent:path/to/applicationinsights-agent-3.5.2.jar
224224
```
225225

226226
### Others
227227

228-
See your application server documentation on how to add JVM args.
228+
See your application server documentation on how to add JVM args.

0 commit comments

Comments
 (0)