Skip to main content

Scope

This runbook covers:
  1. Connecting to the Olis Azure environment safely.
  2. Verifying the deployed Container Apps.
  3. Setting up and validating centralized logging.
  4. Running operational queries and alerts.
Use this for dev/qa/prod by swapping names and resource groups.

Prerequisites

  • Azure CLI (az) installed and authenticated.
  • Access to the target subscription.
  • RBAC roles (minimum):
    • Reader on resource group for viewing.
    • Container App Contributor for app/env changes.
    • Key Vault Secrets User for reading secret metadata/values.
    • Monitoring Reader (and Monitoring Contributor if creating alerts).

Connect to Azure

Confirm identity and scope:

Validate Deployed Apps

Current dev app names used by this repo:
  • Auth: olis-auth-aca-wp
  • RAG: olis-rag-dev-wp
  • Ingestion worker: olis-ingest-worker-dev-wp

Logging Architecture

For Container Apps, baseline operational logging should be:
  1. App writes structured logs to stdout/stderr.
  2. Container Apps environment ships logs to Log Analytics.
  3. Alert rules are created on KQL queries.
In this repo, the Log Analytics wiring pattern is defined in:
  • infra/main.bicep (workspace creation)
  • infra/modules/containerapps_env.bicep (managed env appLogsConfiguration)

Verify Log Analytics Is Wired

Get managed environment details:
Expected:
  • destination = "log-analytics"
  • logAnalyticsConfiguration.customerId populated
If this is missing, deploy/update environment with IaC from infra/main.bicep and infra/modules/containerapps_env.bicep.

Live Log Access

Tail application logs:
Tail a specific revision:

KQL Queries (Log Analytics)

Find recent auth errors:
Find seat/invite/email auth activity:
Container restart/system issues:

Create Basic Alert Rules

Create an alert for repeated auth errors (example):
Add action groups after creating your notification channel(s).

Optional: App Insights for Request Traces

If you want richer request traces/metrics in addition to container logs:
  1. Create a workspace-based Application Insights resource.
  2. Store the connection string in Key Vault.
  3. Expose it to the auth/rag containers as env var APPLICATIONINSIGHTS_CONNECTION_STRING.
  4. Add SDK instrumentation in services if needed.
Note: Container logs to Log Analytics remain the primary operational baseline.

Key Vault Checks (SMTP + Auth)

Example checks for current auth prefix:

Smoke Checklist After Deployment

  1. Auth app revision updated and healthy.
  2. NOTIFIER_PROVIDER=smtp and AUTH_EMAIL_ENABLED=true present in env.
  3. Invite call returns notification { sent: true }.
  4. Seat request call returns notification { sent: true }.
  5. Email code verification returns access token.
  6. Magic link flow returns grant and exchange returns access token.
  7. Logs appear in Container Apps logs and Log Analytics queries.

Troubleshooting

  • 403 ORG_NOT_FOUND on email start:
    • Domain identity is not mapped in org_identities for that org.
  • 500 on invite/seat APIs:
    • Check auth app logs first, then confirm org/membership rows and DB connectivity.
  • Handshake 429 from az containerapp exec:
    • Retry after short delay; exec endpoint is rate-limited.
  • SMTP notifications not sending:
    • Validate Key Vault secret refs, sender domain, and SMTP credentials.