Portal Community

Azure Monitor Components for BizFirstGO

Azure Monitor ServiceReplacesQuery Language
Log Analytics WorkspaceLokiKQL (Kusto Query Language) — different from LogQL
Azure Monitor Managed PrometheusPrometheusPromQL — same as self-hosted
Application InsightsTempoApplication Insights (AI) query interface
Azure Managed GrafanaGrafana OSSSame Grafana UI — pre-connected to Azure data sources

OTel Collector Configuration for Azure Monitor

# otel-collector-config.yaml — export to Azure Monitor
exporters:
  # Logs → Azure Monitor Log Analytics Workspace
  azuremonitor:
    connection_string: "${AZURE_MONITOR_CONNECTION_STRING}"
    # Note: azuremonitor exporter handles logs + traces in one connection

  # Metrics → Azure Monitor Managed Prometheus (Remote Write)
  prometheusremotewrite/azure:
    endpoint: "${AZURE_PROMETHEUS_REMOTE_WRITE_ENDPOINT}"
    headers:
      Authorization: "Bearer ${AZURE_MANAGED_IDENTITY_TOKEN}"

service:
  pipelines:
    logs/azure:
      receivers: [otlp]
      processors: [memory_limiter, batch, redaction]
      exporters: [azuremonitor]

    traces/azure:
      receivers: [otlp]
      processors: [memory_limiter, batch, redaction, tail_sampling]
      exporters: [azuremonitor]

    metrics/azure:
      receivers: [otlp, prometheus]
      processors: [memory_limiter, batch]
      exporters: [prometheusremotewrite/azure]

Log Query in KQL (Azure equivalent of LogQL)

// Log Analytics KQL — equivalent to BizFirstGO LogQL queries

// Find all error logs for a specific execution (LogQL: {job="processengine"} |= "exec-id")
ContainerLog
| where LogEntry contains "exec-a1b2c3d4"
| where LogEntry contains "error"
| project TimeGenerated, LogEntry
| order by TimeGenerated asc

// Count errors by service (LogQL: count_over_time({level="error"}[5m]))
ContainerLog
| where LogEntry contains "\"level\":\"error\""
| summarize ErrorCount = count() by bin(TimeGenerated, 5m), ContainerName
| order by TimeGenerated desc
KQL Is Not LogQL — Dashboard Migration Required

BizFirstGO's pre-built Loki dashboards use LogQL queries and cannot run against Log Analytics Workspace. If you migrate to Azure Monitor, you must rewrite all Loki panels using KQL equivalents. This is a significant migration effort — budget 2-4 days for the 10 pre-built dashboards. Azure Monitor dashboards cannot be migrated back to self-hosted Loki if you later switch.