ION DocsV3
  • Architecture
    • ION Architecture V2
      • ION V2 — Architecture Overview
      • V2 context
        • V2 capacity model
        • V2 constraints
        • V2 integration boundaries
        • V2 requirements
        • V2 solution strategy
      • V2 Structural Design
        • ION V2 Landscape
        • ION V2 Platform Views
          • ION V2 Delivery and Runway
          • ION V2 Incident-Processing Pipelines
          • ION V2 Platform Networking
          • ION V2 Platform Observability
          • ION V2 Platform Security
        • ION V2 System Context
        • ION V2 Systems
          • Alya System Topology
          • Cogs System Topology
          • Ion IQ System Topology
          • Kingsman System Topology
          • Pigeon System Topology
          • Veritas System Topology
          • Watchtower System Topology
      • V2 evolution and platform lineage
        • Tiberium Origins
          • Tiberium Architecture Overview
          • Tiberium Components Architecture Overview
        • Voyager and the V2 Merge
          • Voyager Architecture Overview
          • Voyager Identity Architecture Overview
          • Voyager Services Architecture Overview
      • V2 Platform Architecture
        • Alya Workbench
          • Mission Brief: Alya (Workbench for Cyber Defenders)
        • Asset Discovery
        • Automation
        • Customer Communications
          • Notification and Escalation Design
        • Reporting and Dashboards
        • Vulnerability Mitigations
      • V2 Well-Architected
        • V2 Reliability
          • Availability Architecture
        • V2 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V2 Security Architecture
          • Teams Notification Security
          • Customer Data and PII
          • V2 Identity
            • Applications and Authorization
            • V2 Identity Architecture
            • Microsoft Entra ID
            • V2 Identity Standard
            • V2 Identity Implementation
              • Application Registration
              • Application Roles
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Managed Identity
            • V2 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Portal Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Customer Environment Access Architecture
            • Customer Environment Access Guidelines
            • Customer Environment Access How-to
    • ION Architecture V3
      • ION V3 Architecture Overview
      • V3 context
        • V3 capacity model
        • V3 constraints
        • V3 integration boundaries
        • V3 requirements
        • V3 solution strategy
      • V3 Structural Design
        • Data and events
          • Archival and retention
          • Event model
          • Event sourcing
          • Event store
          • Micro-frontend interaction
          • Recovery and disaster recovery
          • Replay and reconstruction
          • Reporting and customer analytics
          • Event-sourcing requirements
          • Snapshots
          • UI interaction
        • ION v3 domains
          • Assets domain
            • Assets domain flows
            • Assets domain implementation
            • Assets domain model
          • Customer Collaboration domain
            • Customer Collaboration domain flows
            • Customer Collaboration domain implementation
            • Customer Collaboration domain model
          • Incident domain
            • Incident domain flows
            • Incident domain implementation
            • Incident domain model
          • Investigation domain
            • Investigation domain flows
            • Investigation domain implementation
            • Investigation domain model
          • Remediation domain
            • Remediation domain implementation
            • Remediation domain model
          • Ticket domain
            • Ticket domain flows
            • Ticket domain implementation
            • Ticket domain model
        • ION V3 Landscape
        • ION V3 Platform Views
          • Internal API
            • Internal API architecture
            • Internal API consumer guide
            • Internal API identity and access
            • Internal API implementation
          • Micro-Frontends
            • Micro-Frontends architecture
            • Micro-Frontends capability service (Signet)
            • Micro-Frontends composition
            • Micro-Frontends identity and access
            • Micro-Frontends implementation
            • Micro-Frontends real-time (SignalR)
            • Micro-Frontends routing and ingress
            • Shells and MFEs
          • SOAR Integration
            • SOAR Integration architecture
            • SOAR Integration customer onboarding
            • SOAR Integration Identity and Access Design
            • SOAR Integration implementation
            • SOAR Integration operations
        • ION V3 System Context
        • ION V3 systems
          • Alya
          • Cogs
          • ION IQ
          • Kingsman
          • Pigeon
          • Veritas
          • Watchtower
      • V2 to V3 evolution
        • V2 to V3 architecture delta
        • V2 to V3 decision changes
        • V2 to V3 migration guidance
        • V2 to V3 service impact
      • Well-Architected
        • Cost Optimization
          • Cost Governance
            • Cost Governance Architecture
            • Cost Governance Guidelines
            • Cost Governance Implementation
          • SKU Strategy
            • SKU Strategy Architecture
            • SKU Strategy Guidelines
            • SKU Strategy Implementation
        • Operational excellence
          • Audit Logs
            • Audit Logs Architecture
            • Audit Logs Guidelines
            • Audit Logs Implementation
          • CI/CD Runway
            • CI/CD Runway Architecture
            • CI/CD Runway Guidelines
            • CI/CD Runway Implementation
          • Feature Flags
            • Feature Flags Architecture
            • Feature Flags Guidelines
            • Feature Flags Implementation
          • Incident management
            • Incident management architecture
            • Incident management guidelines
            • Incident management implementation
          • Azure Landing Zone
            • Azure Landing Zone Architecture
            • Azure Landing Zone Guidelines
            • Azure Landing Zone Implementation
          • Notifications
            • Notifications Architecture
            • Notifications Guidelines
            • Notifications Implementation
          • Observability
            • Observability Architecture
            • Observability Guidelines
            • Observability Implementation
        • Performance efficiency
          • Capacity, sizing, and scaling
            • Capacity, sizing, and scaling architecture
            • Capacity, sizing, and scaling guidelines
            • Implement capacity, sizing, and scaling
          • UI responsiveness
            • UI responsiveness architecture
            • UI responsiveness guidelines
            • Implement UI responsiveness
        • V3 reliability
          • Application resilience patterns
          • Critical flows
          • Customer reliability assurance
            • ION Platform reliability and service continuity
            • Customer reliability slides
          • Disaster recovery
            • Disaster recovery architecture
            • Disaster recovery guidelines
            • Disaster recovery implementation
              • DR implementation: API Management
              • DR implementation: App Configuration
              • DR implementation: Application Gateway
              • DR implementation: Azure SQL Database
              • DR implementation: Container Apps
              • DR implementation: Container Registry
              • DR implementation: Cosmos DB
              • DR implementation: Event Hubs
              • DR implementation: Azure Front Door
              • DR implementation: Function Apps
              • DR implementation: Key Vault
              • DR implementation: Log Analytics and Application Insights
              • DR implementation: MySQL Flexible Server (Temporal)
              • DR implementation: PostgreSQL Flexible Server
              • DR implementation: Azure Managed Redis
              • DR implementation: Service Bus
              • DR implementation: SignalR
              • DR implementation: Storage accounts
            • Operational-data replication
            • Disaster recovery operations
          • Edge and routing
            • Azure Application Gateway
              • Azure Application Gateway architecture
              • Azure Application Gateway guidelines
              • Azure Application Gateway implementation
              • Azure Application Gateway resiliency
              • Azure Application Gateway security
            • Azure Front Door
              • Azure Front Door architecture
              • Azure Front Door guidelines
              • Azure Front Door implementation
              • Azure Front Door resiliency
              • Azure Front Door security
          • Event-store disaster recovery (moved)
          • Failure mode analysis
          • Graceful degradation
            • Graceful degradation architecture
            • Graceful degradation guidelines
            • Graceful degradation implementation
          • V3 reliability maturity model
            • V3 reliability maturity assessment
            • Maturity level 2: self-preservation
            • Maturity level 3: recovery readiness
            • Maturity level 4: maintain stability
            • Maturity level 5: stay resilient
          • Multi-region replication
            • Multi-region replication architecture
            • Multi-region replication guidelines
            • Multi-region replication implementation assessment
          • Reliability testing
          • Scaling and headroom
          • Targets and health model
          • Trade-offs and accepted risks
        • V3 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • API Contracts and Asynchronous Operations
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V3 Security Architecture
          • Data protection
            • Data protection architecture
            • Data protection guidelines
            • Data protection implementation guidelines
              • API Management
              • Application Gateway
              • Azure SQL Database
              • Azure Container Apps
              • Azure Cosmos DB
              • Azure Front Door
              • Azure Function Apps
              • Azure Database for MySQL
              • Azure Database for PostgreSQL
              • Data protection procedures
          • V3 Security Guidelines
          • V3 Identity
            • Applications and Authorization in ION V3
            • V3 Identity Architecture
            • Capabilities
            • Microsoft Entra ID for ION V3
            • V3 Identity Standard
            • V3 Identity Implementation
              • App Service Authentication
              • Application Registration
              • Application Roles
              • Customer Azure RBAC
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Mailbox-Scoped Access
              • Managed Identity
              • Workload Identity Federation
            • V3 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Azure RBAC Identity Workflow
              • Customer Portal Identity Workflow
              • Mailbox Access Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Shell and MFE Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Azure Lighthouse
              • Azure Lighthouse implementation
            • GDAP and Tenant Governance
              • Access Packages (legacy)
              • GDAP human access implementation
            • Customer environment access guidelines
            • Multi-tenant Entra apps
              • Multi-tenant Entra apps implementation
            • Teams B2B Direct Connect
              • Teams B2B Direct Connect implementation
          • Network Security
            • Network Security Architecture
            • Network Security Guidelines
            • Network Security Implementation
              • Egress and Static IPs
              • Resource Access Restrictions
          • V3 Security Patterns
    • ION Architecture V4
      • How V4 evolves from V3
  • Principles
  • Patterns
    • Application Permissions Only
    • Async REST
    • Audit Logs (Pattern)
    • Auth / AuthZ
    • Dead Letter Queue (DLQ)
    • Dual Writes (and how to avoid them)
    • ECST — Event-Carried State Transfer
    • Event Hubs Throttling
    • Feature Flags (Pattern)
    • Idempotent Write
    • MFE UI Interaction
    • Notifications (Pattern)
    • Private Data Store Access
    • Schema Evolution
    • Service Bus Topic Throttling
    • UI Interaction with an Event-Sourced Backend
  • Standards
    • API Standard
    • API Standards
    • Coding Standard
    • Coding Standards
    • Documentation Standard
    • Documentation Standards
    • Microservice Standard
    • Microservice Checklist
    • Operational Readiness Standard
    • ORR — Operational Readiness Review Checklist
  • Decisions
    • ADR-0001
    • ADR-0002
    • ADR-0003
    • ADR-0004
    • ADR-0005
    • ADR-0006
    • ADR-0007
    • ADR-0008
    • ADR-0009
    • ADR-0010
    • ADR-0011
    • ADR-0012
    • ADR-0013
    • ADR-0014
    • ADR-0015
    • ADR-0016
    • ADR-0017
    • ADR-0018
    • ADR-0019
    • ADR-0020
    • ADR-0021
    • ADR-0022
    • ADR-0023
    • ADR-0024
    • ADR-0025
    • ADR-0026
    • ADR-0027
    • ADR-0028
    • ADR-0029
    • ADR-0030
    • ADR-0031
    • ADR-0032
    • ADR-0033
    • ADR-0034
  • Services
  • Governance
    • Assumptions
    • Discrepancies
    • V3 reference coverage and conflict matrix
OntinueION Docs
  1. Decisions
  2. Observability stack — Application Insights + Log Analytics + Azure Monitor Metrics, instrumented via OpenTelemetry

Observability stack — Application Insights + Log Analytics + Azure Monitor Metrics, instrumented via OpenTelemetry

proposedoperational excellence
decisionsv2v3v4proposed0021observabilityloggingmetricstracingapplication-insightslog-analyticsopentelemetryaudit

ADR-0021 — Observability stack: Application Insights + Log Analytics + Azure Monitor Metrics, instrumented via OpenTelemetry

Context

Every ION service emits three telemetry streams — logs, metrics, and traces — plus audit records for user-attributable actions. ION needs one platform-wide answer to:

  1. Where does telemetry land (sink choice)?
  2. What client-side SDK / instrumentation library do services use?
  3. What is the log schema, log-level policy, and PII-redaction rule?
  4. What is the metrics schema (labels, cardinality budget)?
  5. How does distributed tracing propagate across HTTP → Service Bus → Temporal boundaries?
  6. What is the workspace topology — per-service, per-environment, or platform-wide?
  7. Where do audit logs live, and how are they distinguished from diagnostic logs?
  8. How is the correlation-ID discipline codified in ADR-0020 § 8 actually realised end-to-end?

V2 shipped with informal answers per Architecture- Logging Guidelines.md and Architecture- Logging and Metrics Guidelines.md. Both include concrete schemas (fields, labels), sampling settings, APIM trace types, and SLI definitions. This ADR retrospectively codifies them and closes gaps: distributed tracing across event/workflow boundaries, workspace topology, audit-vs-diagnostic separation, and OpenTelemetry instrumentation as the vendor-lock-in mitigation lever.

Forces / Drivers

  • Requirement / Constraint: NFR-5 Availability 99.9 %; NFR-4 latency visibility; correlation-ID discipline from ADR-0020; Trilateral API (§ 10) — all three legs (publish/subscribe/REST) must be traceable with the same correlation identifier; SLI/SLO definitions in Architecture- Logging and Metrics Guidelines.md; data-residency constraint on Swiss customer telemetry.
  • Principle(s) embodied: § 16 Observability at every layer (primary); § 21 Azure-native managed services first (Azure Monitor family = the sanctioned sink); § 20 Vendor lock-in mitigation (OpenTelemetry keeps code portable); § 19 Cost as design constraint (sampling, log minimisation, cardinality budget).
  • WAF pillar optimized: operational-excellence (primary — a uniform telemetry contract across services, one query surface, one correlation identifier); reliability (SLI/SLO measurement, incident-response evidence); security (audit trail, JWT-claim provenance in APIM traces).

Decision

Observability is realised on the Azure Monitor family as the sink, instrumented on the client side through the OpenTelemetry SDK, with a common schema for logs, metrics, traces, and audit records. Concretely:

1. Sinks

  • Logs and traces → Azure Application Insights, which back onto an Azure Log Analytics workspace per environment (Alpha, Beta, Gamma, Prod). Application Insights is the ingestion + telemetry-shape surface; Log Analytics is the storage + query surface (KQL).
  • Metrics → Azure Monitor Metrics (platform metrics from Azure resources) plus Application Insights customMetrics (application metrics emitted by service code).
  • Audit records → Log Analytics workspace, dedicated IonAudit_CL custom table, distinct from diagnostic-log tables. Audit records MUST NOT sample, MUST NOT redact, and have their own retention.
  • Data residency: workspace(s) are provisioned in Switzerland North matching the platform region (ADR-0007, ADR-0017).

2. Workspace topology

  • One Application Insights instance per service, per environment. Rationale: independent sampling and cost controls per service; blast radius of a chatty service is bounded; per-service RBAC is possible.
  • One shared Log Analytics workspace per environment as the backing store for all Application Insights instances. Rationale: single KQL query surface across services for cross-service traces and incident investigation; matches the Trilateral API observability contract.
  • Audit table lives in the shared per-env workspace (not per-service) because audit records are consumed by SOC, compliance, and support — not by service teams.
  • NOT to be confused with ADR-0031, which normalizes the V2 ADR3 proposal for one Ontinue/NewCO-owned Log Analytics workspace per customer. Its exact realization is not corroborated. This ADR instead governs shared ION platform observability workspaces per environment.

3. Instrumentation — OpenTelemetry SDK

  • Services instrument with OpenTelemetry SDKs (OTel .NET, OTel Python) exporting to Application Insights via the Azure Monitor OpenTelemetry exporter.
  • W3C traceparent and tracestate are the wire-level trace-context format — carried on HTTP headers (per ADR-0020) and on CloudEvents extension attributes (per ADR-0005).
  • Rationale: OpenTelemetry is the § 20 lock-in mitigation lever — if Azure Monitor is ever swapped for another backend, exporter changes, not application code.

4. Log schema (structured JSON)

Diagnostic logs use structured JSON with the following required fields (per Architecture- Logging and Metrics Guidelines.md § Debug/Diagnostic Logs):

FieldPurpose
timestampRFC 3339 UTC
logLevelCritical / Error / Warning / Information / Debug
serviceService short-name
applicationDomain application (Incidents / Tickets / Assets / …)
correlationIdUUID; same identifier walks HTTP → event → workflow
requestIdUUID for branched/intermediate flows
customerShortCustomer short-name (never customer PII in the field)
userEmailPresent only when user context exists (audit-relevant flows)
environmentalpha / beta / gamma / prod
serverInstance identifier (Function App instance, pod, host)
idResource identifier (incident id / ticket id / asset id)
statussuccess / failure
messageHuman-readable message
dataStructured payload (nested JSON)

Log levels follow the standard hierarchy (Critical → Debug); default production log level is Information; Debug and Trace are disabled in prod. Health-check functions log at Warning to avoid drowning signal.

5. Metrics schema

Metrics carry the label set from Architecture- Logging and Metrics Guidelines.md § Metrics Structure: timestamp, metricName, metricValue, environment, application, component, customerShort, transactionId?, correlationId?, incidentId?.

Cardinality budget: high-cardinality labels (correlationId, incidentId, userEmail) are attached to logs and traces, not to metrics. Metrics stay low-cardinality (env × application × component × customerShort). Violations blow up Application Insights customMetrics storage cost and are rejected at code-review time.

SLI catalogue (from § API/Business/Pipeline Metrics):

  • Business: Time-to-create-ticket; Availability (Alya/Portal); Latency percentiles; Feature usage.
  • Pipeline: Timeliness (Sentinel-to-processed delay); Completeness (incidents-successfully-ticketed / non-auto-closed incidents).
  • API: Availability (1 - 5xx-rate); Latency percentiles; Throughput; Error rate.

6. Distributed tracing

  • Every request/event/workflow-activity carries a traceparent (W3C). APIM injects one if the caller doesn’t provide it (per ADR-0020 § 8).
  • HTTP boundary: APIM emits ION Platform APIM Request/Response traces with the JWT claim fields (JwtTenantId, JwtUserId, JwtRoles, etc. — per Architecture- Logging Guidelines.md § APIM Traces). Non-JWT variants exist for webhooks.
  • Event boundary: CloudEvents envelope carries traceparent as an extension attribute (per ADR-0005); publisher extracts current span context, subscriber restores it.
  • Workflow boundary: Temporal activities receive traceparent from the workflow context (per ADR-0019); workflow-start captures it from the triggering command/event and propagates it to every activity.

7. Sampling

  • Adaptive sampling in Application Insights, configured per-service in host.json (Functions) / SDK config (services). Baseline: cap at ~20 telemetry items/second per instance, excluding Requests and Exceptions — those are always retained.
  • Audit records never sample (§ 1).
  • Error / Critical logs never sample.

8. Audit logs (distinct from diagnostic logs)

  • Audit records follow the CloudEvents envelope (per Architecture- Logging and Metrics Guidelines.md § Audit Logs), with type like com.ontinue.audit.<resource>.<action>.v<n>.
  • Emitted by every service that performs a user-attributable action; written to the IonAudit_CL custom table in the per-env Log Analytics workspace.
  • Never sampled. Never redacted (PII is expected — it’s the audit trail).
  • Retention: separate policy from diagnostic logs (typically longer, driven by compliance).

9. PII / sensitive-data policy

  • Diagnostic logs redact tokens, secrets, and full request/response bodies by default. userEmail allowed where present.
  • Customer-tenant data (entities, IPs from customer traffic) is logged only when necessary for debugging; treated as sensitive.
  • Audit logs are the only place raw user identity + action is intentionally recorded end-to-end.

10. Health probes contract

  • Every service exposes HEAD /v1/healthcheck/liveness (per Internal API worked example, ADR-0020) at the Warning log level (so probe traffic doesn’t drown signal).
  • Readiness probes are separate from liveness where the service runtime distinguishes them (AKS-hosted Temporal cluster, etc.).

Alternatives Considered

Sink

Option A — Azure Monitor family (App Insights + Log Analytics + Azure Monitor Metrics) (selected)

Option B — Self-hosted ELK / Grafana Loki / Prometheus / Tempo

Rejected — decisive: § 21 Azure-native managed services first. Reinforcing: would compound the § 21 exception ION already carries for Temporal (ADR-0019); every stateful cluster ION owns is a permanent operational tax.

Feature parity is not the question here — the operational cost of owning another stateful cluster (or four) is. Azure Monitor is sufficient for ION’s SLIs.

Option C — Datadog / New Relic / Splunk (third-party SaaS)

Rejected — decisive: § 21 — not an Azure-native managed service. Reinforcing: Swiss data-residency constraint on customer telemetry; cost at ION’s log/metric volume; exfiltration of tenant-attributable data to a third-party operator.

Option D — Split vendors (logs = X, metrics = Y, traces = Z)

Rejected — decisive: fragments the correlation-ID story. Reinforcing: tripled operational surface (auth, retention, RBAC, cost model per vendor).

The whole value of correlation-ID discipline is that one identifier walks all three telemetry streams; splitting the stream forces manual join across vendors.

Instrumentation

Option I1 — OpenTelemetry SDK exporting to Azure Monitor (selected)

Option I2 — Application Insights SDK directly (no OTel abstraction)

Rejected — decisive: § 20 vendor lock-in mitigation would be sacrificed with no offsetting gain. Reinforcing: OTel is now Microsoft’s recommended path for Azure Monitor instrumentation.

The Azure Monitor OTel exporter is first-class and stable; using OTel buys sink-portability at no cost.

Option I3 — Custom logging library (Ontinue-authored)

Rejected — decisive: reinventing the SDK ecosystem with no conformance target for consumers or third parties.

Workspace topology

Option W1 — Per-service App Insights + shared per-env Log Analytics (selected)

Option W2 — Single shared Application Insights instance per environment

Rejected — decisive: no per-service sampling / cost isolation — a single chatty service can consume the shared budget. Reinforcing: RBAC is coarser (harder to scope service-team access).

Option W3 — Per-service Log Analytics workspaces (fully isolated)

Rejected — decisive: cross-service KQL queries become cross-workspace joins — expensive and awkward for incident investigation, which is the primary consumer.

Option W4 — Reuse customer-tenant Log Analytics workspaces (per ADR3 V2)

Rejected — decisive: ADR3 governs customer data collection (Sentinel MDR data in customer tenants); mixing platform telemetry into those workspaces breaks tenancy boundary and confuses SOC KQL queries.

Distributed tracing

Option T1 — W3C traceparent everywhere (HTTP + CloudEvents + Temporal) (selected)

Option T2 — Correlation ID only, no distributed tracing

Rejected — decisive: correlation-ID discipline in ADR-0020 § 8 is undermined without span-level trace context. Reinforcing: latency attribution across services is impossible without spans.

Option T3 — Zipkin / Jaeger B3 propagation

Rejected — decisive: W3C traceparent is the standard the Azure Monitor SDK, APIM, and OpenTelemetry all speak natively. B3 would require translation shims at every boundary.

Sampling

Option S1 — Adaptive sampling with Errors/Requests retained (selected)

Option S2 — No sampling

Rejected — decisive: cost at ION’s log volume (~180K incidents/day × N events/incident × M log lines/event) is unsustainable.

Option S3 — Head-based fixed-rate sampling (drop N % up front)

Rejected — decisive: loses low-frequency error signal that is exactly what observability is for.

Audit logs

Option AU1 — Dedicated audit table, CloudEvents envelope, never sampled (selected)

Option AU2 — Mix audit records into diagnostic-log stream

Rejected — decisive: audit compliance requires distinct retention, sampling, and RBAC from diagnostic logs.

Option AU3 — Send audit records to an event-store aggregate

Deferred, not rejected. Sensible longer-term — audit is a natural event-sourcing use case. Retained for a future ADR; current V3 posture is the Log-Analytics audit table.

Rationale

Azure Monitor wins as the sink because § 21 rules alternatives out — the operational cost of self-hosting ELK/Loki/Prometheus is not justified by any feature gap ION has actually hit. Third-party SaaS loses on data residency and § 21.

OpenTelemetry as the instrumentation layer is § 20 in action — the same principle that keeps ION service code portable across substrates. The Azure Monitor OTel exporter is Microsoft’s own recommended path; the abstraction is essentially free.

The per-service-App-Insights + shared-workspace topology gives the right trade-off: independent sampling and cost controls per service, but a single KQL surface for cross-service investigation — the primary consumption pattern during incidents.

W3C traceparent is the only propagation format supported natively at every ION boundary (APIM, Azure Monitor SDK, OTel, and — via the CloudEvents extension — the Service Bus event backbone). Choosing it means zero translation shims.

Distinct audit logs are a compliance non-negotiable; mixing them into the diagnostic-log stream defeats retention, RBAC, and sampling policy alike.

Consequences

Positive

  • One telemetry contract across every ION service — one correlation identifier, one query surface, one sampling policy.
  • Cross-service incident investigation is a single KQL workspace, not a cross-vendor join.
  • OpenTelemetry keeps ION code sink-portable (§ 20).
  • Audit trail is compliance-ready by construction (never sampled, never redacted, retention-distinct).
  • SLI/SLO measurement is uniformly available for every service.

Negative

  • Application Insights cost grows with telemetry volume; sampling policy and cardinality budget must be enforced at code review, not discovered on the bill.
  • OpenTelemetry SDK maturity varies by language; Python OTel exporter has known gaps that services must work around.
  • Audit-log retention is a separate cost line from diagnostic logs; needs explicit governance.
  • Instrumentation is a per-service tax; drift (missing correlation IDs, high-cardinality metrics) is a real risk without automated checks.

Neutral / follow-ups

  • Publish standards/observability-standards.md codifying the schema, log levels, sampling, and cardinality rules with worked KQL query examples.
  • Publish patterns/audit-logs.md (already stubbed) with the CloudEvents audit envelope and the IonAudit_CL schema.
  • Automated PR checks for high-cardinality metric labels and missing-correlation-ID logs — follow-up.
  • Revisit audit-as-event-store (Option AU3) when the Ticket/Incident event stores mature.
  • Contract-test the OTel instrumentation against the log/metric schemas — follow-up standard.

WAF Pillar Impact

  • Primary pillar: operational-excellence — one uniform telemetry contract, one KQL query surface, one instrumentation library.
  • Secondary pillars: reliability (SLI/SLO measurement, incident evidence, health probes); security (audit trail, JWT-claim provenance in APIM traces, tenant-attributable actions). Cost-optimization: sampling + cardinality budget keep Application Insights cost bounded, but this is a trade-off, not an optimization — full-fidelity telemetry is out of budget at ION scale.
  • Trade-offs: Sampling means some low-volume debug detail is intentionally dropped; the cardinality budget means some queries ION might want cannot be answered from metrics alone (must join to logs). ION accepts this because the alternative — unbounded telemetry cost — is worse.

Previous approach (V2)

V2 shipped with informal versions of most of this — structured JSON logs, correlation IDs, Application Insights per Function App, and the Log-Analytics-and-metrics guidelines that this ADR canonicalises. Gaps V2 left open, closed by this ADR:

  • No codified distributed-tracing story across event/workflow boundaries (correlation ID existed; span propagation did not).
  • No explicit workspace-topology decision (per-service AI + shared Log Analytics per env was practice; never named).
  • Audit-vs-diagnostic log separation was inconsistent.
  • OpenTelemetry adoption as the § 20 mitigation lever was not yet named.

References

  • references/Architecture- Logging Guidelines.md — log levels, Function App logging config, APIM trace types.
  • references/Architecture- Logging and Metrics Guidelines.md — SLI/SLO definitions, log/metrics/audit schemas, APIM JWT trace fields.
  • references/Architecture V2- ADR3 - Log Analytics Workspace design.md — customer-tenant workspace design (distinct concern from this ADR).
  • External: Azure Monitor OpenTelemetry exporter — https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-overview
  • External: W3C Trace Context — https://www.w3.org/TR/trace-context/
  • External: CloudEvents distributed-tracing extension — https://github.com/cloudevents/spec/blob/main/cloudevents/extensions/distributed-tracing.md

Related ADRs

  • Depends on: ADR-0005 (CloudEvents extension carries traceparent); ADR-0020 (correlation-ID discipline on the HTTP leg).
  • Depended on by: pending CI/CD Runway ADR (deployment observability hooks); pending Reporting Data Store ADR (dashboard freshness SLIs); pending per-service ADRs (SLI/SLO catalogues).
  • Related: ADR-0008 (event backbone — trace propagation); ADR-0014 (APIM emits the APIM-trace records); ADR-0019 (Temporal workflows propagate traceparent into activities).

On this page

  • Context
  • Forces / Drivers
  • Decision
  • 1. Sinks
  • 2. Workspace topology
  • 3. Instrumentation — OpenTelemetry SDK
  • 4. Log schema (structured JSON)
  • 5. Metrics schema
  • 6. Distributed tracing
  • 7. Sampling
  • 8. Audit logs (distinct from diagnostic logs)
  • 9. PII / sensitive-data policy
  • 10. Health probes contract
  • Alternatives Considered
  • Sink
  • Instrumentation
  • Workspace topology
  • Distributed tracing
  • Sampling
  • Audit logs
  • Rationale
  • Consequences
  • WAF Pillar Impact
  • Previous approach (V2)
  • References
  • Related ADRs
Previousjson:api RESTful API spec (cursor pagination, URI-path versioning) and Async REST pattern for the HTTP leg of Trilateral APIs
NextReporting data store — Azure SQL Database projection populated from event stores; React dashboards over BFF; PowerBI as external BI integration only
Edit on GitHubSecurity