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 use the Azure CLI to get real-time logs of jobs 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).
20
20
21
21
> [!NOTE]
22
-
> - For streaming logs of applications in Azure Spring Apps, see [Stream Azure Spring Apps application console logs in real time](./how-to-log-streaming.md).
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).
22
+
> - For more information on streaming logs of applications in Azure Spring Apps, see [Stream Azure Spring Apps application console logs in real time](./how-to-log-streaming.md).
23
+
> - For more information on 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
27
-[Azure CLI](/cli/azure/install-azure-cli) with the Azure Spring Apps extension, version 1.24.0 or higher. You can install the extension by using the following command: `az extension add --name spring`.
28
28
29
29
## Assign an Azure role
30
30
31
-
To stream logs of jobs, you must have the relevant Azure roles assigned to you. The following table lists the required roles and the operations for which these roles are granted permissions:
31
+
To stream logs of jobs, you must have the relevant Azure roles assigned to you. The following table lists the required role and the operation for which this role is granted permission:
@@ -44,11 +44,11 @@ Use the following steps to assign an Azure role using the Azure portal:
44
44
45
45
1. In the navigation pane, select **Access Control (IAM)**.
46
46
47
-
1. On the **Access Control (IAM)** page, select **Add** and then select **Add role assignment**.
47
+
1. On the **Access Control (IAM)** page, select **Add**, and then select **Add role assignment**.
48
48
49
49
:::image type="content" source="media/how-to-managed-component-log-streaming/add-role-assignment.png" alt-text="Screenshot of the Azure portal that shows the Access Control (IAM) page with the Add role assignment option highlighted." lightbox="media/how-to-managed-component-log-streaming/add-role-assignment.png":::
50
50
51
-
1. On the **Add role assignment** page, in the **Name** list, search for and select the target role and then select **Next**.
51
+
1. On the **Add role assignment** page, in the **Name** list, search for and select the target role, and then select **Next**.
52
52
53
53
:::image type="content" source="media/how-to-asa-job-log-streaming/asa-job-log-reader-role.png" alt-text="Screenshot of the Azure portal that shows the Add role assignment page with the Azure Spring Apps Job Log Reader Role name highlighted." lightbox="media/how-to-asa-job-log-streaming/asa-job-log-reader-role.png":::
54
54
@@ -71,7 +71,7 @@ Use the following command to assign an Azure role:
71
71
72
72
## List all instances in a job execution
73
73
74
-
For a job, every time it's triggered, a new job execution will be created. And up to your parallelism setting of your job, several instances will execute in parallel. Use the following command to list all instances in a job execution:
74
+
Use the following command to list all instances in a job execution:
75
75
76
76
```azurecli
77
77
az spring job execution instance list \
@@ -87,7 +87,7 @@ This section provides examples of using the Azure CLI to produce tail logs.
87
87
88
88
### View tail logs for a specific instance
89
89
90
-
To view the tail logs for a specific instance, use the `az spring job logs` command with the `-i/--instance` argument.
90
+
To view the tail logs for a specific instance, use the `az spring job logs` command with the `-i/--instance` argument, as shown in the following example:
91
91
92
92
```azurecli
93
93
az spring job logs \
@@ -100,7 +100,7 @@ az spring job logs \
100
100
101
101
### View tail logs for all instances in one command
102
102
103
-
To view the tail logs for all instances, use the `--all-instances` argument, as shown in the following command. The instance name is the prefix of each log line. When there are multiple instances, logs are printed in batch for each instance, so logs of one instance aren't interleaved with the logs of another instance.
103
+
To view the tail logs for all instances, use the `--all-instances` argument, as shown in the following command. The instance name is the prefix of each log line. When there are multiple instances, logs are printed in batch for each instance. This way, logs of one instance aren't interleaved with the logs of another instance.
104
104
105
105
```azurecli
106
106
az spring job logs \
@@ -145,7 +145,7 @@ az spring job logs \
145
145
--follow
146
146
```
147
147
148
-
When you stream logs for multiple instances in a job execution, the logs of one instance interleave with logs of others.
148
+
When you stream logs for multiple instances in a job execution, the logs of one instance interleave with the logs of others.
149
149
150
150
## Stream logs in a virtual network injection instance
151
151
@@ -170,7 +170,7 @@ Use the following steps to enable a log streaming endpoint on the public network
170
170
171
171
### [Azure CLI](#tab/azure-CLI)
172
172
173
-
Use the following command to enable the log stream public endpoint.
173
+
Use the following command to enable the log stream public endpoint:
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
> [!NOTE]
24
-
> - For streaming logs of jobs in Azure Spring Apps, see [Stream Azure Spring Apps job logs in real time](./how-to-asa-job-log-streaming.md).
25
-
> - 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
+
> - For more information on streaming logs of jobs in Azure Spring Apps, see [Stream Azure Spring Apps job logs in real time (Preview)](./how-to-asa-job-log-streaming.md).
25
+
> - For more information on 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).
26
26
27
27
## Prerequisites
28
28
@@ -198,5 +198,5 @@ The following table shows an example of a basic rule that we recommend. You can
198
198
199
199
-[Quickstart: Monitoring Azure Spring Apps apps with logs, metrics, and tracing](../basic-standard/quickstart-logs-metrics-tracing.md)
200
200
-[Analyze logs and metrics with diagnostics settings](./diagnostic-services.md)
201
-
-[Stream Azure Spring Apps job logs in real time](./how-to-asa-job-log-streaming.md)
201
+
-[Stream Azure Spring Apps job logs in real time (Preview)](./how-to-asa-job-log-streaming.md)
202
202
-[Stream Azure Spring Apps managed component logs in real time](./how-to-managed-component-log-streaming.md)
This article describes how to use the Azure CLI to get real-time logs of managed components 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).
20
20
21
21
> [!NOTE]
22
-
> - For streaming logs of applications in Azure Spring Apps, see [Stream Azure Spring Apps application console logs in real time](./how-to-log-streaming.md).
23
-
> - For streaming logs of jobs in Azure Spring Apps, see [Stream Azure Spring Apps job logs in real time](./how-to-asa-job-log-streaming.md).
22
+
> - For more information on streaming logs of applications in Azure Spring Apps, see [Stream Azure Spring Apps application console logs in real time](./how-to-log-streaming.md).
23
+
> - For more information on streaming logs of jobs in Azure Spring Apps, see [Stream Azure Spring Apps job logs in real time (Preview)](./how-to-asa-job-log-streaming.md).
24
24
25
25
## Prerequisites
26
26
@@ -327,4 +327,4 @@ The following table shows an example of a basic rule that we recommend. You can
327
327
-[Troubleshoot VMware Spring Cloud Gateway](./how-to-troubleshoot-enterprise-spring-cloud-gateway.md)
0 commit comments