Skip to content

Commit 6d64282

Browse files
committed
fix
1 parent 4d54163 commit 6d64282

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

articles/container-apps/java-metrics-scale-with-keda.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ Use the following steps to define environment variables and set up the environme
5656
## Set up a managed identity for your Azure Container Apps
5757
To scale with Azure Container Apps platform metrics, you need a managed identity to access metrics from Azure Monitor.
5858
59-
1. Create a user-assigned identity and assign it to your Azure Container Apps. You can follow the doc [Add a user-assigned identity](./managed-identity.md#add-a-user-assigned-identity). After you create the identity, run the CLI command to set the identity ID.
59+
1. Create a user-assigned identity and assign it to your Azure Container Apps. You can follow the doc [add a user-assigned identity](./managed-identity.md#add-a-user-assigned-identity). After you create the identity, run the CLI command to set the identity ID.
6060
6161
```azurecli
6262
USER_ASSIGNED_IDENTITY_ID=$(az identity show --resource-group $RESOURCE_GROUP --name $IDENTITY_NAME --query "id" --output tsv)
6363
```
6464
65-
2. Grant the `Monitoring Reader` role for your managed identity to read data from Azure Monitor. You can find more details about the roles for Azure Monitor in [Built-in Role Monitoring Reader](../role-based-access-control/built-in-roles/monitor.md#monitoring-reader).
65+
2. Grant the `Monitoring Reader` role for your managed identity to read data from Azure Monitor. You can find more details about the roles for Azure Monitor in [Azure built-in roles for Monitor](../role-based-access-control/built-in-roles/monitor.md#monitoring-reader).
6666
6767
```azurecli
6868
# Get the principal ID for your managed identity
@@ -75,7 +75,6 @@ To scale with Azure Container Apps platform metrics, you need a managed identity
7575
To scale with Azure Monitor metrics, you can refer to [Azure Monitor KEDA scaler](https://keda.sh/docs/2.16/scalers/azure-monitor/) to define your Container Apps scale rule.
7676
7777
Here's a list of core metadata to set up the scale rule.
78-
7978
| Metadata key | Description |
8079
|------------------------------------|-------------------------------------------------------------------------------------------------------|
8180
| tenantId | ID of the tenant that contains the Azure resource. |
@@ -90,7 +89,7 @@ Here's a list of core metadata to set up the scale rule.
9089

9190

9291

93-
Add a scale rule with [metrics from Azure Container Apps](./metrics.md) for your application.
92+
Add a scale rule with [Azure Monitor metrics for Azure Container Apps](./metrics.md) for your application.
9493

9594
### [Azure CLI](#tab/azurecli)
9695

@@ -153,7 +152,7 @@ az containerapp update \
153152

154153
This command adds a scale rule to your container app with the name `scale-with-azure-monitor-metrics`
155154
- The scale type is set to `azure-monitor`.
156-
- It uses the managed identity with resource ID `USER_ASSIGNED_IDENTITY_ID` to authenticate with Azure Monitor and query metrics for your container app.
155+
- KEDA uses the managed identity with resource ID `USER_ASSIGNED_IDENTITY_ID` to authenticate with Azure Monitor and query metrics for your container app.
157156
- KEDA queries the metric `JvmGcCount`, and aggregates the metric values within 1 minute with aggregation type `Total`.
158157
- The target value is set to `30`, which means KEDA calculates the `desiredReplicas` using `ceil(AggregatedMetricValue(JvmGcCount)/30)`.
159158

@@ -171,22 +170,22 @@ Here's a sample metric snapshot for the example scale rule.
171170
:::image type="content" source="media/java-metrics-keda/keda-auto-scale-java-gc-portal.png" alt-text="Screenshot of KEDA scale with JVM metrics" lightbox="media/java-metrics-keda/keda-auto-scale-java-gc-portal.png":::
172171

173172
1. Initially, there's one replica (the `minReplicas`) for the app.
174-
1. A spike in requests causes the replica to experience frequent JVM garbage collection (GC).
173+
1. A spike in requests causes the Java app to experience frequent JVM garbage collection (GC).
175174
1. KEDA observes the aggregated metric value for `jvm.gc.count` is increased to 140 and calculates desiredReplicas as `ceil(140/30)` = 5.
176175
1. KEDA scales out the container app's replica count to 5.
177-
1. The traffic is distributed across more replicas, reducing the average GC count.
176+
1. The http traffic is distributed across more replicas, reducing the average GC count.
178177
1. The GC count further decreases when no requests are coming in.
179178
1. After a cooldown period, KEDA scales the replica count down to `minReplicas=1`.
180179

181180
## Scale Log
182181

183-
To view the KEDA scale logs, you can run the query in `Logs`.
182+
To view the KEDA scale logs, you can run the query in `Logs` blade.
184183

185184
```kusto
186-
ContainerAppSystemLogs
187-
| where RevisionName == "<your-revision>"
188-
| where EventSource == "KEDA"
189-
| project TimeGenerated, Type, Reason, ContainerAppName, Log
185+
ContainerAppSystemLogs
186+
| where RevisionName == "<your-revision>"
187+
| where EventSource == "KEDA"
188+
| project TimeGenerated, Type, Reason, ContainerAppName, Log
190189
```
191190

192191
:::image type="content" source="media/java-metrics-keda/keda-auto-scale-java-log.png" alt-text="Screenshot of KEDA scale log query" lightbox="media/java-metrics-keda/keda-auto-scale-java-log.png":::
@@ -202,5 +201,5 @@ az group delete --resource-group $RESOURCE_GROUP
202201
## Related content
203202
204203
> [!div class="nextstepaction"]
205-
> [ Set scaling rules in Azure Container Apps](./scale-app.md)
206-
> [ Java metrics for Azure Container Apps](./java-metrics.md)
204+
- [Set scaling rules in Azure Container Apps](./scale-app.md)
205+
- [Java metrics for Azure Container Apps](./java-metrics.md)

0 commit comments

Comments
 (0)