Skip to content

Commit 317a0bc

Browse files
authored
Merge pull request #205499 from jeanbisutti/java_agent_arg
Add double quote for java agent arg
2 parents 9327fe4 + b4e2f97 commit 317a0bc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

articles/azure-monitor/app/java-in-process-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Download the [applicationinsights-agent-3.3.0.jar](https://github.com/microsoft/
5555

5656
#### Point the JVM to the jar file
5757

58-
Add `-javaagent:path/to/applicationinsights-agent-3.3.0.jar` to your application's JVM args.
58+
Add `-javaagent:"path/to/applicationinsights-agent-3.3.0.jar"` to your application's JVM args.
5959

6060
> [!TIP]
6161
> For help with configuring your application's JVM args, see [Tips for updating your JVM args](./java-standalone-arguments.md).

articles/azure-monitor/app/java-spring-boot.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ You can enable the Azure Monitor Application Insights agent for Java by adding a
1515

1616
### Usual case
1717

18-
Add the JVM arg `-javaagent:path/to/applicationinsights-agent-3.3.0.jar` somewhere before `-jar`, for example:
18+
Add the JVM arg `-javaagent:"path/to/applicationinsights-agent-3.3.0.jar"` somewhere before `-jar`, for example:
1919

2020
```
21-
java -javaagent:path/to/applicationinsights-agent-3.3.0.jar -jar <myapp.jar>
21+
java -javaagent:"path/to/applicationinsights-agent-3.3.0.jar" -jar <myapp.jar>
2222
```
2323

2424
### Spring Boot via Docker entry point
2525

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

2828
```
2929
ENTRYPOINT ["java", "-javaagent:path/to/applicationinsights-agent-3.3.0.jar", "-jar", "<myapp.jar>"]
3030
```
3131

32-
If you're using the *shell* form, add the JVM arg `-javaagent:path/to/applicationinsights-agent-3.3.0.jar` somewhere before `-jar`, for example:
32+
If you're using the *shell* form, add the JVM arg `-javaagent:"path/to/applicationinsights-agent-3.3.0.jar"` somewhere before `-jar`, for example:
3333

3434
```
35-
ENTRYPOINT java -javaagent:path/to/applicationinsights-agent-3.3.0.jar -jar <myapp.jar>
35+
ENTRYPOINT java -javaagent:"path/to/applicationinsights-agent-3.3.0.jar" -jar <myapp.jar>
3636
```
3737

3838
## Programmatic configuration

0 commit comments

Comments
 (0)