You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
22
23
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).
24
24
25
25
## Prerequisites
26
26
27
-
-[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`
28
28
- 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).
29
29
30
-
## Use Azure CLI to produce tail logs
30
+
## Use the Azure CLI to produce tail logs
31
31
32
-
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:
33
33
34
34
```azurecli
35
35
az config set defaults.group=<service-group-name>
@@ -88,7 +88,7 @@ You can also get details of app instances from the Azure portal. After selecting
88
88
89
89
### Continuously stream new logs
90
90
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:
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:
92
92
93
93
```azurecli
94
94
az spring app logs --name auth-service --follow
@@ -153,13 +153,13 @@ Azure Spring Apps also enables you to access real-time app logs from a public ne
153
153
154
154
Use the following steps to enable a log streaming endpoint on the public network:
155
155
156
-
1. Select the Azure Spring Apps service instance deployed in your virtual network, and then select **Networking** 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.
157
157
158
158
1. Select the **Vnet injection** tab.
159
159
160
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.
161
161
162
-
:::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":::
163
163
164
164
#### [Azure CLI](#tab/azure-CLI)
165
165
@@ -183,7 +183,7 @@ Log streaming uses the same key as the test endpoint described in [Set up a stag
183
183
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.
184
184
185
185
> [!NOTE]
186
-
> If you can't access app logs in the virtual network injection instance from the internet after you enabled a log stream public endpoint, check your network security group to see whether you 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.
187
187
188
188
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.
0 commit comments