Tier9AI logoTier9AI

Chapter 07

Observability for Customer-Facing AI

Connect distributed traces, customer health pages, usage metrics, service objectives, and actionable alerts across an AI workflow.

Peter Olson

8 min read

An AI response can fail even when every process is running. Retrieval can return the wrong documents, a provider can throttle requests, a queue can add minutes of delay, or the answer can omit a required citation. Traditional uptime is necessary, but it is not enough.

Observability should connect technical health, AI behavior, customer experience, and usage without turning sensitive prompts into telemetry. Begin with the questions operators and customers need answered, then design traces, metrics, logs, health views, and alerts around them.

Trace the complete unit of work

Distributed tracing follows one operation across an API, queue, worker, retrieval service, model provider, integration, and callback. Propagate a trace or correlation context through synchronous calls and message envelopes. Add spans for meaningful boundaries rather than every helper function.

Useful span attributes include tenant-safe identifiers, operation type, model and configuration version, retrieval count, queue time, provider region, retry count, token counts, and outcome category. Do not put raw prompts, customer records, access tokens, or unrestricted model output into broadly accessible telemetry.

A trace should help answer where time was spent and which dependency changed the result. It should also connect to application logs and the release manifest so an operator can move from an alert to the exact version and sanitized failure detail.

Separate reliability from usage

Reliability metrics describe whether the service works: request success, latency, queue age, dependency errors, retrieval failures, and completed jobs. Usage metrics describe how customers use it: active tenants, workflows started, features adopted, documents processed, tokens consumed, approvals requested, or human handoffs.

Keep them separate in the data model even when they share a dashboard. A sudden drop in model calls may mean a reliability incident, lower customer demand, a product change, or successful caching. Context prevents the wrong conclusion.

Track cost drivers near usage: input and output tokens, model tier, accelerator time, storage, and external API calls. Allocate them by tenant and workflow where contracts and privacy permit. Cost per successful outcome is often more useful than cost per raw request.

Define SLIs, SLOs, and SLAs deliberately

A service-level indicator (SLI) is a measurement such as the proportion of eligible jobs completed successfully within two minutes. A service-level objective (SLO) is the internal target for that indicator. A service-level agreement (SLA) is a customer commitment with business or contractual consequences.

Do not copy infrastructure uptime directly into an SLA if the customer's workflow can be unusable while the API returns 200. Define success from the user journey: accepted work reaches a terminal state, authorized retrieval completes, or a customer notification is delivered within the agreed window.

Use error budgets to guide release and reliability decisions. Exclude maintenance or invalid requests only when the definition is explicit and customer expectations support it. Keep the calculation reproducible.

Build customer-facing health without leaking internals

A customer health page can show service availability, integration connection state, recent sync time, queued jobs, incidents affecting that tenant, and known remediation steps. It should not reveal other customers, internal hostnames, security-sensitive dependency details, or raw errors.

An external status page should communicate broad service impact and updates. An authenticated in-product page can provide tenant-specific detail. Neither replaces internal dashboards; they are different views for different decisions.

Alert on action, not curiosity

Alert when a human must act soon: an SLO burn, sustained queue growth, loss of a critical dependency, expiring credentials, repeated authorization failures, or missing telemetry. Route alerts to an owner with a runbook and useful context.

Prefer symptoms close to customer impact over every low-level fluctuation. Group related signals and use severity based on scope and urgency. An alert that fires constantly without action trains the team to ignore the next real incident.

Each page should open a tested incident-management path with an owner and current evidence.

Common failure modes

  • Declaring the service healthy because pods are running while work is stuck in a queue.
  • Logging full prompts and responses to make debugging easier.
  • Using high-cardinality customer or request values as unbounded metric labels.
  • Mixing product adoption and reliability metrics into one ambiguous number.
  • Defining an SLA from what is easy to measure rather than what customers experience.
  • Publishing internal or cross-tenant details on a health page.
  • Paging on noisy infrastructure signals with no named response action.

Implementation checklist

  • Define the customer journey and its success and latency indicators.
  • Propagate trace context through APIs, queues, workers, models, and webhooks.
  • Correlate sanitized logs, traces, metrics, and release versions.
  • Separate reliability, usage, cost, and AI-quality measurements.
  • Set internal SLOs before making external SLA commitments.
  • Create internal dashboards and appropriately scoped customer health views.
  • Add actionable alerts with owners, severity, and runbook links.
  • Test telemetry during dependency failure, backlog, and partial rollout.
  • Set retention and access controls for observability data.

Measurable signals

Track end-to-end success and latency, time to first useful result, queue age, provider failure rate, retrieval and citation failures, SLO attainment and burn, alert precision, time to acknowledge, tenant health freshness, feature adoption, unit cost per successful workflow, and telemetry coverage. Periodically sample whether traces actually contain enough context to diagnose a representative failure.

Further reading