Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Observability & Alert Response

Operator playbook for inspecting live Aspire Dashboard telemetry, running Log Analytics KQL queries, checking resource saturation, and responding to alerts.

SRE / Incident

When to Use & Blast Radius

Use this guide when an Azure Monitor alert fires, latency degrades, or you need to correlate distributed traces and logs across API Gateway, backend services, Message Broker consumers, and AI pipelines. All commands in this runbook are read-only and safe to run against Production.

Telemetry and Alerting Surface

Loading graph...

Pre-Flight Check

Verify your Azure CLI context and retrieve the Log Analytics workspace ID before running queries:

Terminal window
az account set --subscription "<SUBSCRIPTION_ID>"
WORKSPACE_ID=$(az monitor log-analytics workspace list --resource-group "<RESOURCE_GROUP>" --query "[0].customerId" -o tsv)
echo "Workspace ID: ${WORKSPACE_ID}"

Procedure

  1. Stream live container logs for immediate triage

    Stream real-time stdout/stderr or platform lifecycle events without waiting for Log Analytics ingestion lag:

    Terminal window
    # Application stdout/stderr
    az containerapp logs show --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" --type console --follow
    # Platform events (image pulls, probe failures, scaling)
    az containerapp logs show --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" --type system --tail 100

  2. Query application errors and trace IDs in Log Analytics

    Run KQL queries across all Container Apps to surface recent exceptions or correlate a single request by <TRACE_ID>:

    Terminal window
    # Recent application errors across all services
    az monitor log-analytics query --workspace "${WORKSPACE_ID}" \
    --analytics-query "ContainerAppConsoleLogs_CL | where TimeGenerated > ago(1h) | where Log_s has_any ('Error','Exception','Unhandled','Failed') | summarize ErrorCount=count() by ContainerAppName_s | order by ErrorCount desc" \
    -o table
    # Correlate a specific trace or request ID end-to-end
    az monitor log-analytics query --workspace "${WORKSPACE_ID}" \
    --analytics-query "ContainerAppConsoleLogs_CL | where TimeGenerated > ago(2h) | where Log_s contains '<TRACE_ID>' | project TimeGenerated, ContainerAppName_s, Log_s | order by TimeGenerated asc" \
    -o table

  3. Inspect asynchronous Message Broker and dead-letter queue logs

    Check consumer failures and dead-letter routing across Ordering Service, Finance Orchestrator, Basket Service, Notification Service, Catalog Service, Catalog Ingestion, Rating Service, and Scheduler Service:

    Terminal window
    az monitor log-analytics query --workspace "${WORKSPACE_ID}" \
    --analytics-query "ContainerAppConsoleLogs_CL | where TimeGenerated > ago(1h) | where ContainerAppName_s in ('ordering','finance','basket','notification','catalog','catalog-ingestion','rating','scheduler') | where Log_s has_any ('dead-letter','Wolverine','Kafka','ConsumeException') | project TimeGenerated, ContainerAppName_s, Log_s | order by TimeGenerated desc | take 50" \
    -o table

  4. Check compute and datastore saturation

    Inspect Container App replica counts, PostgreSQL CPU/storage, and Redis memory pressure:

    Terminal window
    # Container App active replicas and provisioning state
    az containerapp revision list --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" \
    --query "[?properties.active==\`true\`].{Revision:name, Replicas:properties.replicas, Health:properties.healthState}" -o table
    # PostgreSQL CPU and storage utilization (last 30 minutes)
    PG_ID=$(az postgres flexible-server show --name "<POSTGRES_SERVER>" --resource-group "<RESOURCE_GROUP>" --query id -o tsv)
    az monitor metrics list --resource "${PG_ID}" --metric cpu_percent storage_percent --interval PT5M --output table
    # Azure Managed Redis memory usage
    REDIS_ID=$(az redisenterprise show --name "<REDIS_NAME>" --resource-group "<RESOURCE_GROUP>" --query id -o tsv)
    az monitor metrics list --resource "${REDIS_ID}" --metric usedmemorypercentage --interval PT5M --output table

  5. Inspect live traces in the managed Aspire Dashboard

    In the Azure Portal, open Resource groups → <RESOURCE_GROUP> → Container Apps Environment → Aspire Dashboard to view end-to-end W3C traces, ASP.NET Core / HTTP metrics, and structured logs. For local troubleshooting, open https://localhost:17290.

Common Alert Playbooks

Verification

Confirm log ingestion is active across all Container Apps within the last 15 minutes:

Terminal window
az monitor log-analytics query --workspace "${WORKSPACE_ID}" \
--analytics-query "ContainerAppConsoleLogs_CL | where TimeGenerated > ago(15m) | summarize Logs=count() by ContainerAppName_s | order by ContainerAppName_s asc" \
-o table

Expected output:

ContainerAppName_s Logs
-------------------- ------
backoffice 14
basket 22
catalog 41
commerce 12
gateway 105
...

Rollback / Escape Hatch

All diagnostic queries in this runbook are read-only. If you adjusted log sampling, diagnostic settings, or alert thresholds during an incident, revert them to baseline via aspire deploy --environment "<ENV>".