Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/web-app-app-configuration/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ The emulator serves an emulated Azure portal at `http://localhost:4566/_localsta

### Delivery times

On the emulator the records are queryable within seconds, and the aggregated ones (`AACHttpRequest` and `AzureMetrics`) once their one-minute window is over. On Azure the records take minutes, and the first records of a new diagnostic setting can take [up to 90 minutes](https://learn.microsoft.com/azure/azure-monitor/data-collection/diagnostic-settings#expected-latency-after-creating-a-diagnostic-setting): run the queries again later, or raise `RETRY_COUNT` for the script. The exported platform metrics (`AzureMetrics`) are the exception: Azure exports them late and irregularly, so on Azure `query-logs-and-metrics.sh` reads them once, shows those that arrived and notes how many are still missing, without failing. A new setting can also take a while before it delivers anything, and on Azure the records of what the application did while it started, such as its start-up console lines or its secret reads in the key vault, can then be missing for good: once the workspace receives records, `az webapp restart --name local-webapp-test --resource-group local-rg` starts the application again, and the records of the new start arrive.
On the emulator the records are queryable within seconds, and the aggregated ones (`AACHttpRequest` and `AzureMetrics`) once their one-minute window is over. On Azure the records take minutes, and the first records of a new diagnostic setting can take [up to 90 minutes](https://learn.microsoft.com/azure/azure-monitor/data-collection/diagnostic-settings#expected-latency-after-creating-a-diagnostic-setting): run the queries again later, or raise `RETRY_COUNT` for the script. The exported platform metrics (`AzureMetrics`) are the exception: Azure exports them late and irregularly, so on Azure `query-logs-and-metrics.sh` reads them once, shows those that arrived and notes how many are still missing, without failing. A new setting can also take a while before it delivers anything, and on Azure the records of what the application did while it started, such as its start-up console lines, its reads of the App Configuration store or its secret reads in the key vault, can then be missing for good: once the workspace receives records, `az webapp restart --name local-webapp-test --resource-group local-rg` starts the application again, and the records of the new start arrive.

## Troubleshooting

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,16 +397,10 @@ query_workspace \
"AppServicePlatformLogs | project TimeGenerated, Level, Message | order by TimeGenerated desc | take 10" \
"[].{Time:TimeGenerated,Level:Level,Message:Message}"

# The requests to the store (AACHttpRequest), each record aggregating the requests of one method and status code: among
# them the GET with which the app reads its key-values, made by the managed identity of the web app (ClientObjectId)
query_workspace \
"Requests to the [$APP_CONFIG_NAME] App Configuration store (AACHttpRequest)" \
"AACHttpRequest | project TimeGenerated, Method, StatusCode, HitCount, ClientObjectId, RequestURI | order by TimeGenerated desc | take 10" \
"[].{Time:TimeGenerated,Method:Method,Status:StatusCode,Hits:HitCount,Caller:ClientObjectId,Uri:RequestURI}"

# Azure can drop for good the records of a new diagnostic setting's first minutes, among them the secret reads of
# the web app's start, so the web app is restarted and called again: it reads its secrets anew
echo -e "\nRestarting the [$WEB_APP_NAME] web app, so that it reads its two secrets again..."
# The web app reads its key-values from the store and its two secrets from the key vault only when it starts, and Azure
# can drop for good the records of a new diagnostic setting's first minutes, among them those reads, so the web app is
# restarted before the two queries that look for them: it reads its key-values and secrets anew
echo -e "\nRestarting the [$WEB_APP_NAME] web app, so that it reads its key-values and its two secrets again..."
az webapp restart \
--name "$WEB_APP_NAME" \
--resource-group "$RESOURCE_GROUP_NAME" \
Expand All @@ -420,6 +414,13 @@ else
fi
wait_for_web_app "https://$WEB_APP_HOST_NAME/"

# The requests to the store (AACHttpRequest), each record aggregating the requests of one method and status code: among
# them the GET with which the app reads its key-values, made by the managed identity of the web app (ClientObjectId)
query_workspace \
"Requests to the [$APP_CONFIG_NAME] App Configuration store (AACHttpRequest)" \
"AACHttpRequest | project TimeGenerated, Method, StatusCode, HitCount, ClientObjectId, RequestURI | order by TimeGenerated desc | take 10" \
"[].{Time:TimeGenerated,Method:Method,Status:StatusCode,Hits:HitCount,Caller:ClientObjectId,Uri:RequestURI}"

# The reads of the pg-user and pg-password secrets that resolved the two Key Vault references (AZKVAuditLogs)
query_workspace \
"Secret reads in the [$KEY_VAULT_NAME] key vault (AZKVAuditLogs)" \
Expand Down
2 changes: 1 addition & 1 deletion samples/web-app-app-configuration/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ The emulator serves an emulated Azure portal at `http://localhost:4566/_localsta

### Delivery times

On the emulator the records are queryable within seconds, and the aggregated ones (`AACHttpRequest` and `AzureMetrics`) once their one-minute window is over. On Azure the records take minutes, and the first records of a new diagnostic setting can take [up to 90 minutes](https://learn.microsoft.com/azure/azure-monitor/data-collection/diagnostic-settings#expected-latency-after-creating-a-diagnostic-setting): run the queries again later, or raise `RETRY_COUNT` for the script. The exported platform metrics (`AzureMetrics`) are the exception: Azure exports them late and irregularly, so on Azure `query-logs-and-metrics.sh` reads them once, shows those that arrived and notes how many are still missing, without failing. A new setting can also take a while before it delivers anything, and on Azure the records of what the application did while it started, such as its start-up console lines or its secret reads in the key vault, can then be missing for good: once the workspace receives records, `az webapp restart --name local-webapp-test --resource-group local-rg` starts the application again, and the records of the new start arrive.
On the emulator the records are queryable within seconds, and the aggregated ones (`AACHttpRequest` and `AzureMetrics`) once their one-minute window is over. On Azure the records take minutes, and the first records of a new diagnostic setting can take [up to 90 minutes](https://learn.microsoft.com/azure/azure-monitor/data-collection/diagnostic-settings#expected-latency-after-creating-a-diagnostic-setting): run the queries again later, or raise `RETRY_COUNT` for the script. The exported platform metrics (`AzureMetrics`) are the exception: Azure exports them late and irregularly, so on Azure `query-logs-and-metrics.sh` reads them once, shows those that arrived and notes how many are still missing, without failing. A new setting can also take a while before it delivers anything, and on Azure the records of what the application did while it started, such as its start-up console lines, its reads of the App Configuration store or its secret reads in the key vault, can then be missing for good: once the workspace receives records, `az webapp restart --name local-webapp-test --resource-group local-rg` starts the application again, and the records of the new start arrive.

## Troubleshooting

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,16 +397,10 @@ query_workspace \
"AppServicePlatformLogs | project TimeGenerated, Level, Message | order by TimeGenerated desc | take 10" \
"[].{Time:TimeGenerated,Level:Level,Message:Message}"

# The requests to the store (AACHttpRequest), each record aggregating the requests of one method and status code: among
# them the GET with which the app reads its key-values, made by the managed identity of the web app (ClientObjectId)
query_workspace \
"Requests to the [$APP_CONFIG_NAME] App Configuration store (AACHttpRequest)" \
"AACHttpRequest | project TimeGenerated, Method, StatusCode, HitCount, ClientObjectId, RequestURI | order by TimeGenerated desc | take 10" \
"[].{Time:TimeGenerated,Method:Method,Status:StatusCode,Hits:HitCount,Caller:ClientObjectId,Uri:RequestURI}"

# Azure can drop for good the records of a new diagnostic setting's first minutes, among them the secret reads of
# the web app's start, so the web app is restarted and called again: it reads its secrets anew
echo -e "\nRestarting the [$WEB_APP_NAME] web app, so that it reads its two secrets again..."
# The web app reads its key-values from the store and its two secrets from the key vault only when it starts, and Azure
# can drop for good the records of a new diagnostic setting's first minutes, among them those reads, so the web app is
# restarted before the two queries that look for them: it reads its key-values and secrets anew
echo -e "\nRestarting the [$WEB_APP_NAME] web app, so that it reads its key-values and its two secrets again..."
az webapp restart \
--name "$WEB_APP_NAME" \
--resource-group "$RESOURCE_GROUP_NAME" \
Expand All @@ -420,6 +414,13 @@ else
fi
wait_for_web_app "https://$WEB_APP_HOST_NAME/"

# The requests to the store (AACHttpRequest), each record aggregating the requests of one method and status code: among
# them the GET with which the app reads its key-values, made by the managed identity of the web app (ClientObjectId)
query_workspace \
"Requests to the [$APP_CONFIG_NAME] App Configuration store (AACHttpRequest)" \
"AACHttpRequest | project TimeGenerated, Method, StatusCode, HitCount, ClientObjectId, RequestURI | order by TimeGenerated desc | take 10" \
"[].{Time:TimeGenerated,Method:Method,Status:StatusCode,Hits:HitCount,Caller:ClientObjectId,Uri:RequestURI}"

# The reads of the pg-user and pg-password secrets that resolved the two Key Vault references (AZKVAuditLogs)
query_workspace \
"Secret reads in the [$KEY_VAULT_NAME] key vault (AZKVAuditLogs)" \
Expand Down