Skip to content

Commit 88e48b1

Browse files
authored
Merge pull request #273646 from saragluna/asa-update-custom-actuator
Add custom actuator to Azure Spring Apps related docs
2 parents 51d7387 + b0d558e commit 88e48b1

File tree

3 files changed

+54
-17
lines changed

3 files changed

+54
-17
lines changed

articles/spring-apps/enterprise/concept-manage-monitor-app-spring-boot-actuator.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ To view all the endpoints built-in and related configurations, see the [Exposing
6464

6565
### Secure actuator endpoint
6666

67-
When you open the app to the public, these actuator endpoints are exposed to the public as well. We recommend that you hide all endpoints by setting `management.endpoints.web.exposure.exclude=*`, because the `exclude` property takes precedence over the `include` property. Be aware that this action blocks Application Live View in the Enterprise plan and other apps or tools that rely on the actuator HTTP endpoint.
67+
When you open the app to the public, these actuator endpoints are exposed to the public as well. We recommend that you hide all endpoints by setting `management.endpoints.web.exposure.exclude=*`, because the `exclude` property takes precedence over the `include` property. This action blocks Application Live View in the Enterprise plan and other apps or tools that rely on the actuator HTTP endpoint.
6868

69-
In the Enterprise plan, you can disable the public endpoint of apps and configure a routing rule in VMware Spring Cloud Gateway to disable actuator access from the public. For more information, see [Configure VMware Spring Cloud Gateway](./how-to-configure-enterprise-spring-cloud-gateway.md).
69+
In the Enterprise plan, there are two ways to secure the access:
70+
71+
- You can disable the public endpoint of apps and configure a routing rule in VMware Spring Cloud Gateway to disable actuator access from the public. For more information, see [Configure VMware Spring Cloud Gateway](./how-to-configure-enterprise-spring-cloud-gateway.md).
72+
73+
- You can configure the actuator to listen on a different HTTP port from the main application. In a standalone application, the actuator HTTP port defaults to the same as the main HTTP port. For the application to listen on a different port, set the `management.server.port` property. The Application Live View is unable to automatically detect this port change, so you also need to configure the property on an Azure Spring Apps deployment. Then, the actuator isn't publically accessible, but the Application Live View can read from the actuator endpoint via another port. For more information, see [Use Application Live View with the Azure Spring Apps Enterprise plan](./how-to-use-application-live-view.md).
7074

7175
## Next steps
7276

73-
* [Metrics for Azure Spring Apps](./concept-metrics.md)
74-
* [App status in Azure Spring Apps](./concept-app-status.md)
77+
- [Metrics for Azure Spring Apps](./concept-metrics.md)
78+
- [App status in Azure Spring Apps](./concept-app-status.md)

articles/spring-apps/enterprise/how-to-use-application-live-view.md

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ You can monitor Application Live View using the Azure portal or Azure CLI.
118118

119119
You can view the state of Application Live View in the Azure portal on the **Overview** tab of the **Developer Tools** page.
120120

121-
:::image type="content" source="media/how-to-use-application-live-view/application-live-view-enabled.png" alt-text="Screenshot of the Developer Tools page showing the Overview tab." lightbox="media/how-to-use-application-live-view/application-live-view-enabled.png":::
121+
:::image type="content" source="media/how-to-use-application-live-view/application-live-view-enabled.png" alt-text="Screenshot of the Azure portal that shows the Developer Tools page Overview tab." lightbox="media/how-to-use-application-live-view/application-live-view-enabled.png":::
122122

123123
### [Azure CLI](#tab/Azure-CLI)
124124

125-
Use the following command in the Azure CLI to view Application Live View:
125+
Use the following command to view Application Live View:
126126

127127
```azurecli
128128
az spring application-live-view show \
@@ -200,7 +200,7 @@ Use the following steps to deploy an app and monitor it in Application Live View
200200

201201
1. After the app is successfully deployed, you can monitor it using the Application Live View dashboard on Dev Tools Portal. For more information, see [Monitor apps by Application Live View](./monitor-apps-by-application-live-view.md).
202202

203-
If you've already enabled Dev Tools Portal and exposed a public endpoint, use the following command to get the Dev Tools Portal dashboard URL. Add the suffix `/app-live-view` to compose the endpoint to access Application Live View.
203+
If you already enabled Dev Tools Portal and exposed a public endpoint, use the following command to get the Dev Tools Portal dashboard URL. Add the suffix `/app-live-view` to compose the endpoint to access Application Live View.
204204

205205
```azurecli
206206
az spring dev-tool show --service <Azure-Spring-Apps-service-instance-name> \
@@ -209,31 +209,29 @@ Use the following steps to deploy an app and monitor it in Application Live View
209209
--output tsv
210210
```
211211

212-
You can also access the Application Live View using Visual Studio Code (VS Code). For more information, see the [Use Application Live View in VS Code](#use-application-live-view-in-vs-code) section.
212+
You can also access the Application Live View using Visual Studio Code (VS Code). For more information, see the [Use Application Live View in VS Code](#use-application-live-view-in-vs-code) section of this article.
213213

214214
## Manage Application Live View in existing Enterprise plan instances
215215

216216
You can enable Application Live View in an existing Azure Spring Apps Enterprise plan instance using the Azure portal or Azure CLI.
217217

218-
If you have already enabled Dev Tools Portal and exposed a public endpoint, use <kbd>Ctrl</kbd>+<kbd>F5</kbd> to deactivate the browser cache after you enable Application Live View.
218+
If you enabled Dev Tools Portal and exposed a public endpoint, use <kbd>Ctrl</kbd>+<kbd>F5</kbd> to deactivate the browser cache after you enable Application Live View.
219219

220220
### [Azure portal](#tab/Portal)
221221

222222
Use the following steps to manage Application Live View using the Azure portal:
223223

224-
1. Navigate to your service resource, and then select **Developer Tools**.
224+
1. Navigate to your Azure Spring Apps service instance, and then select **Developer Tools**.
225225
1. Select **Manage tools**.
226226

227227
:::image type="content" source="media/how-to-use-application-live-view/manage.png" alt-text="Screenshot of the Azure portal that shows the Developer Tools page." lightbox="media/how-to-use-application-live-view/manage.png":::
228228

229229
1. Select the **Enable App Live View** checkbox, and then select **Save**.
230230

231-
:::image type="content" source="media/how-to-use-application-live-view/check-enable.png" alt-text="Screenshot of the Developer Tools section showing the Enable App Live View checkbox." lightbox="media/how-to-use-application-live-view/check-enable.png":::
231+
:::image type="content" source="media/how-to-use-application-live-view/check-enable.png" alt-text="Screenshot of the Azure portal that shows the Developer Tools section with the Enable App Live View checkbox." lightbox="media/how-to-use-application-live-view/check-enable.png":::
232232

233233
1. You can then view the state of Application Live View on the **Developer Tools**.
234234

235-
:::image type="content" source="media/how-to-use-application-live-view/check-enable.png" alt-text="Screenshot of the Developer Tools section showing the Enable App Live View checkbox." lightbox="media/how-to-use-application-live-view/check-enable.png":::
236-
237235
### [Azure CLI](#tab/Azure-CLI)
238236

239237
Use the following command to enable Application Live View using the Azure CLI:
@@ -255,6 +253,41 @@ az spring dev-tool create \
255253

256254
---
257255

256+
## Configure customized Spring Boot actuator
257+
258+
Application Live View can automatically connect and monitor Spring boot apps with default actuator settings. The default HTTP port of the actuator endpoints are same as the HTTP port of the application and all actuator endpoints are accessible by the default context path of the application, which has the `/actuator` suffix.
259+
260+
If the port (`management.server.port=`) or the context path (`management.endpoints.web.base-path=/`) are customized for an app, Application Live View stops connecting and monitoring the app and reports 404 for the app. To enable Application Live View to continue monitoring such apps, use the following steps to configure the app deployment to customize the actuator endpoints.
261+
262+
### [Azure portal](#tab/Portal)
263+
264+
Use the following steps to configure the deployment using the Azure portal:
265+
266+
1. Navigate to your Azure Spring Apps service instance, then go to the **Apps** page and select an application.
267+
1. Select **Configuration** in the navigation pane.
268+
1. On the **General settings** tab, update the **Spring Boot actuator port** and **Spring Boot actuator path** values, then select **Save**.
269+
270+
:::image type="content" source="media/how-to-use-application-live-view/application-configuration-save.png" alt-text="Screenshot of the Azure portal that shows the Configuration page with Save option highlighted." lightbox="media/how-to-use-application-live-view/application-configuration-save.png":::
271+
272+
### [Azure CLI](#tab/Azure-CLI)
273+
274+
Use the following command to deploy your application with the custom actuator settings in the Azure CLI:
275+
276+
```azurecli
277+
az spring app deploy \
278+
--resource-group <resource-group-name> \
279+
--service <Azure-Spring-Apps-service-instance-name> \
280+
--name <app-name> \
281+
--artifact-path <jar-file-in-target-folder> \
282+
--custom-actuator-path <another-path-for-actuator> \
283+
--custom-actuator-port <another-port-for-actuator>
284+
```
285+
286+
---
287+
288+
> [!NOTE]
289+
> You can set this configuration on an app or a deployment. When you configure an app, it actually takes effect on the current active deployment, but doesn't automatically affect new deployments.
290+
258291
## Use Application Live View in VS Code
259292

260293
You can access Application Live View directly in VS Code to monitor your apps in the Azure Spring Apps Enterprise plan.
@@ -272,7 +305,7 @@ Use the following steps to view the Application Live View dashboard for a servic
272305
1. Expand the service instance that you want to monitor and right-click to select the service instance.
273306
1. Select **Open Application Live View** from the menu to open the Application Live View dashboard in your default browser.
274307

275-
:::image type="content" source="media/how-to-use-application-live-view/visual-studio-code-open-service.png" alt-text="Screenshot of the VS Code extension showing the Open Application Live View option for a service instance." lightbox="media/how-to-use-application-live-view/visual-studio-code-open-service.png":::
308+
:::image type="content" source="media/how-to-use-application-live-view/visual-studio-code-open-service.png" alt-text="Screenshot of the VS Code extension that shows the Open Application Live View option for a service instance." lightbox="media/how-to-use-application-live-view/visual-studio-code-open-service.png":::
276309

277310
### View Application Live View page for an app
278311

@@ -282,15 +315,15 @@ Use the following steps to view the Application Live View page for an app:
282315
1. Expand the service instance and the app that you want to monitor. Right-click the app.
283316
1. Select **Open Application Live View** from the menu to open the Application Live View page for the app in your default browser.
284317

285-
:::image type="content" source="media/how-to-use-application-live-view/visual-studio-code-open-app.png" alt-text="Screenshot of the VS Code extension showing the Open Application Live View option for an app." lightbox="media/how-to-use-application-live-view/visual-studio-code-open-app.png":::
318+
:::image type="content" source="media/how-to-use-application-live-view/visual-studio-code-open-app.png" alt-text="Screenshot of the VS Code extension that shows the Open Application Live View option for an app." lightbox="media/how-to-use-application-live-view/visual-studio-code-open-app.png":::
286319

287320
### Troubleshoot Application Live View issues
288321

289322
If you try to open Application Live View for a service instance or an app that hasn't enabled Application Live View or exposed a public endpoint, you see an error message.
290323

291-
:::image type="content" source="media/how-to-use-application-live-view/visual-studio-code-not-enabled.png" alt-text="Screenshot of the error message showing Application Live View not enabled and public endpoint not accessible." lightbox="media/how-to-use-application-live-view/visual-studio-code-not-enabled.png":::
324+
:::image type="content" source="media/how-to-use-application-live-view/visual-studio-code-not-enabled.png" alt-text="Screenshot of the error message that shows Application Live View not enabled and public endpoint not accessible." lightbox="media/how-to-use-application-live-view/visual-studio-code-not-enabled.png":::
292325

293-
To enable Application Live View and expose public endpoint, use either the Azure portal or the Azure CLI. For more information, see the [Manage Application Live View in existing Enterprise plan instances](#manage-application-live-view-in-existing-enterprise-plan-instances) section.
326+
To enable Application Live View and expose public endpoint, use either the Azure portal or the Azure CLI. For more information, see the [Manage Application Live View in existing Enterprise plan instances](#manage-application-live-view-in-existing-enterprise-plan-instances) section of this article.
294327

295328
## Next steps
296329

96.6 KB
Loading

0 commit comments

Comments
 (0)