Chapter 2 of 6 · Architecture

Observability, cost, and operational controls

Runtime assurance 3.5 hours in a non-production POC

Chapter 2 of 6

Architecture at a glance#

Gateway, agent, and tool signals feed payload-free observability, alerting, and cost operations.

The approved request carries W3C trace context through API Management, the agent, the model, and the tool. One non-sensitive correlation ID joins the supported spans, while each span keeps its own result. A tool failure must not become a model failure.

The workbook and alert queries read Application Insights. APIM emits bounded token metrics for a faster usage estimate. Cost Management reports the bill later. The customer-owned APIM repository remains authoritative for gateway policy, and the controlled promotion workflow consumes the temporary smoke result.

Design choices and tradeoffs#

DecisionChosen approachBenefitLimit
Runtime contentExclude prompts, responses, and tool payloads by defaultTrace service behavior without creating a content archiveA diagnostic exception needs separate, time-limited approval
Trace volumeSample at the source, preserve selected traces end to end, and do not sample metricsBound ingestion while keeping joined tracesSampling can miss rare failures
Cost signalUse low-cardinality APIM token metrics for estimates and Cost Management for billingGive operators a fast signal without treating it as an invoiceCounts can be incomplete; billing normally lags 8-24 hours

Architecture guidance#

Session 11

Observability, cost, and operational controls slide deck