Skip to content

Commit 00192d2

Browse files
authored
Merge pull request #227507 from heyams/heya/appsvc-startup-command
Update startup command
2 parents a8c391c + 8f4ebc8 commit 00192d2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

articles/azure-monitor/app/azure-web-apps-java.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,17 @@ To manually update, follow these steps:
100100
101101
2. Disable Application Insights via the Application Insights tab in the Azure portal.
102102

103-
3. Once the agent jar file is uploaded, go to App Service configurations and add a new environment variable, `JAVA_OPTS`, with the value `-javaagent:{PATH_TO_THE_AGENT_JAR}/applicationinsights-agent-{VERSION_NUMBER}.jar`.
103+
3. Once the agent jar file is uploaded, go to App Service configurations. If you
104+
need to use **Startup Command** for Linux, please include jvm arguments:
104105

105-
4. Restart the app, leaving the **Startup Command** field blank, to apply the changes.
106+
:::image type="content"source="./media/azure-web-apps/startup-command.png" alt-text="Screenshot of startup command.":::
107+
108+
**Startup Command** won't honor `JAVA_OPTS`.
109+
110+
If you don't use **Startup Command**, create a new environment variable, `JAVA_OPTS`, with the value
111+
`-javaagent:{PATH_TO_THE_AGENT_JAR}/applicationinsights-agent-{VERSION_NUMBER}.jar`.
112+
113+
4. Restart the app to apply the changes.
106114

107115
> [!NOTE]
108116
> If you set the JAVA_OPTS environment variable, you will have to disable Application Insights in the portal. Alternatively, if you prefer to enable Application Insights from the portal, make sure that you don't set the `JAVA_OPTS` variable in App Service configurations settings.
12.4 KB
Loading

0 commit comments

Comments
 (0)