Skip to content

Commit 35a6ffc

Browse files
Merge pull request #261567 from jiec-msft/mason/asae-log-stream
Add doc for managed component log stream in Azure Spring Apps
2 parents 042c616 + 5e9ee6a commit 35a6ffc

31 files changed

+539
-74
lines changed

articles/spring-apps/how-to-enterprise-application-configuration-service.md

Lines changed: 127 additions & 38 deletions
Large diffs are not rendered by default.

articles/spring-apps/how-to-log-streaming.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ ms.custom: devx-track-java, devx-track-extended-java, devx-track-azurecli, event
1818

1919
**This article applies to:** ✔️ Basic/Standard ✔️ Enterprise
2020

21-
This article describes how to enable log streaming in Azure CLI to get real-time application console logs for troubleshooting. You can also use diagnostics settings to analyze diagnostics data in Azure Spring Apps. For more information, see [Analyze logs and metrics with diagnostics settings](./diagnostic-services.md).
21+
This article describes how to enable log streaming in the Azure CLI to get real-time application console logs for troubleshooting. You can also use diagnostics settings to analyze diagnostics data in Azure Spring Apps. For more information, see [Analyze logs and metrics with diagnostics settings](./diagnostic-services.md).
22+
23+
For streaming logs of managed components in Azure Spring Apps, see [Stream Azure Spring Apps managed component logs in real time](./how-to-managed-component-log-streaming.md).
2224

2325
## Prerequisites
2426

25-
- [Azure CLI](/cli/azure/install-azure-cli) with the Azure Spring Apps extension, minimum version 1.0.0. You can install the extension by using the following command: `az extension add --name spring`
27+
- [Azure CLI](/cli/azure/install-azure-cli) with the Azure Spring Apps extension, version 1.0.0 or higher. You can install the extension by using the following command: `az extension add --name spring`
2628
- An instance of Azure Spring Apps with a running application. For more information, see [Quickstart: Deploy your first application to Azure Spring Apps](./quickstart.md).
2729

28-
## Use Azure CLI to produce tail logs
30+
## Use the Azure CLI to produce tail logs
2931

30-
This section provides examples of using Azure CLI to produce tail logs. To avoid repeatedly specifying your resource group and service instance name, use the following commands to set your default resource group name and cluster name:
32+
This section provides examples of using the Azure CLI to produce tail logs. To avoid repeatedly specifying your resource group and service instance name, use the following commands to set your default resource group name and cluster name:
3133

3234
```azurecli
3335
az config set defaults.group=<service-group-name>
@@ -44,7 +46,7 @@ If an app named `auth-service` has only one instance, you can view the log of th
4446
az spring app logs --name <application-name>
4547
```
4648

47-
This command returns logs similar to the following examples, where `auth-service` is the application name.
49+
The command returns logs similar to the following examples, where `auth-service` is the application name.
4850

4951
```output
5052
...
@@ -66,7 +68,7 @@ First, run the following command to get the app instance names:
6668
az spring app show --name auth-service --query properties.activeDeployment.properties.instances --output table
6769
```
6870

69-
This command produces results similar to the following output:
71+
The command produces results similar to the following output:
7072

7173
```output
7274
Name Status DiscoveryStatus
@@ -86,7 +88,7 @@ You can also get details of app instances from the Azure portal. After selecting
8688

8789
### Continuously stream new logs
8890

89-
By default, `az spring app logs` prints only existing logs streamed to the app console, and then exits. If you want to stream new logs, add the `-f/--follow` argument:
91+
By default, `az spring app logs` prints only existing logs streamed to the app console and then exits. If you want to stream new logs, add the `-f/--follow` argument, as shown in the following example:
9092

9193
```azurecli
9294
az spring app logs --name auth-service --follow
@@ -149,19 +151,19 @@ Azure Spring Apps also enables you to access real-time app logs from a public ne
149151
150152
### [Azure portal](#tab/azure-portal)
151153
152-
Use the following steps to enable a log streaming endpoint on the public network.
154+
Use the following steps to enable a log streaming endpoint on the public network:
153155
154-
1. Select the Azure Spring Apps service instance deployed in your virtual network, and then open the **Networking** tab in the navigation menu.
156+
1. Select the Azure Spring Apps service instance deployed in your virtual network and then select **Networking** in the navigation menu.
155157
156-
1. Select the **Vnet injection** page.
158+
1. Select the **Vnet injection** tab.
157159
158-
1. Switch the status of **Dataplane resources on public network** to **enable** to enable a log streaming endpoint on the public network. This process will take a few minutes.
160+
1. Switch the status of **Dataplane resources on public network** to **enable** to enable a log streaming endpoint on the public network. This process takes a few minutes.
159161
160-
:::image type="content" source="media/how-to-log-streaming/dataplane-public-endpoint.png" alt-text="Screenshot of enabling a log stream public endpoint on the Vnet Injection page." lightbox="media/how-to-log-streaming/dataplane-public-endpoint.png":::
162+
:::image type="content" source="media/how-to-log-streaming/dataplane-public-endpoint.png" alt-text="Screenshot of the Azure portal that shows the Networking page with the Vnet injection tab selected and the Troubleshooting section highlighted." lightbox="media/how-to-log-streaming/dataplane-public-endpoint.png":::
161163
162164
#### [Azure CLI](#tab/azure-CLI)
163165
164-
Use the following command to enable the log stream public endpoint.
166+
Use the following command to enable the log stream public endpoint:
165167
166168
```azurecli
167169
az spring update \
@@ -172,7 +174,7 @@ az spring update \
172174
173175
---
174176

175-
After you've enabled the log stream public endpoint, you can access the app log from a public network as you would access a normal instance.
177+
After you enable the log stream public endpoint, you can access the app log from a public network just like you would access a normal instance.
176178

177179
## Secure traffic to the log streaming public endpoint
178180

@@ -181,7 +183,7 @@ Log streaming uses the same key as the test endpoint described in [Set up a stag
181183
To ensure the security of your applications when you expose a public endpoint for them, secure the endpoint by filtering network traffic to your service with a network security group. For more information, see [Tutorial: Filter network traffic with a network security group using the Azure portal](../virtual-network/tutorial-filter-network-traffic.md). A network security group contains security rules that allow or deny inbound network traffic to, or outbound network traffic from, several types of Azure resources. For each rule, you can specify source and destination, port, and protocol.
182184

183185
> [!NOTE]
184-
> If you can't access app logs in the virtual network injection instance from the internet after you've enabled a log stream public endpoint, check your network security group to see whether you've allowed such inbound traffic.
186+
> If you can't access app logs in the virtual network injection instance from the internet after you enable a log stream public endpoint, check your network security group to see whether you allowed such inbound traffic.
185187
186188
The following table shows an example of a basic rule that we recommend. You can use commands like `nslookup` with the endpoint `<service-name>.private.azuremicroservices.io` to get the target IP address of a service.
187189

@@ -194,3 +196,4 @@ The following table shows an example of a basic rule that we recommend. You can
194196

195197
- [Quickstart: Monitoring Azure Spring Apps apps with logs, metrics, and tracing](./quickstart-logs-metrics-tracing.md)
196198
- [Analyze logs and metrics with diagnostics settings](./diagnostic-services.md)
199+
- [Stream Azure Spring Apps managed component logs in real time](./how-to-managed-component-log-streaming.md)

0 commit comments

Comments
 (0)