Lesson 2 of 7 Operational Excellence and Observability

Monitoring Generative AI, Agents and ML Models

This lesson explains the metrics, logs and traces for Amazon Bedrock, AgentCore and SageMaker AI endpoints, and how Model Monitor detects drift.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the Bedrock and AgentCore signals for latency, throttling, tokens and agent steps.
  • Distinguish the Model Monitor monitoring types.
  • Choose alarms that detect problems in AI workloads.

Amazon Bedrock and agents

Bedrock publishes CloudWatch metrics per model, including invocations, InvocationLatency and time to first token, InvocationThrottles, client and server errors, and input and output token counts, and guardrail metrics show how often content is blocked. Model invocation logs allow quality review of real prompts and responses. AgentCore Observability emits OpenTelemetry traces and metrics for agent sessions, showing each model call, retrieval and tool invocation with its latency, token use and errors in CloudWatch generative AI observability dashboards; AgentCore Evaluations scores agent quality continuously.

SageMaker AI endpoints and model drift

SageMaker AI endpoints publish invocation, model latency, overhead latency, error and instance utilisation metrics. SageMaker Model Monitor captures endpoint traffic and compares it with a baseline: data quality monitoring detects drift in input features, model quality monitoring compares predictions with ground truth labels as they arrive, and bias drift and feature attribution drift monitoring detect changes in fairness and explanations. Violations raise CloudWatch metrics and alarms that can start retraining pipelines.

SignalSource
Slow responses and throttlingBedrock InvocationLatency and InvocationThrottles
Token usage and cost trendsBedrock input and output token metrics
Slow or failing agent stepsAgentCore Observability traces
Input data driftModel Monitor data quality
Accuracy declineModel Monitor model quality with ground truth
Match the pairs

AI monitoring signals

Exam skills 5.3.5

Match each concern with the signal that reveals it.

Log in to try this activity Interactive activities are free with an account.

Alarms and dashboards

  • Alarm on latency percentiles and throttles per model, and act with cross-Region inference or quota increases.
  • Alarm on sudden changes in guardrail interventions, which may signal attacks or prompt regressions.
  • Track token use per team or application to catch runaway costs.
  • Define SLOs for AI features in Application Signals like any other service.
Worked example

A degrading recommendation model

A retailer's recommendation model on a SageMaker AI endpoint has slowly become less effective since a change in product range, and a Bedrock-based shopping assistant is sometimes slow on Mondays.

The team enables data capture and schedules Model Monitor data quality jobs against the training baseline; drift alarms now trigger the retraining pipeline.

For the assistant, alarms on InvocationLatency and InvocationThrottles show Monday throttling, so the team switches to a geographic cross-Region inference profile, and AgentCore Observability traces reveal that a catalogue search tool, not the model, causes most of the remaining latency.

Check yourself

Which Model Monitor type needs ground truth labels?

Show answer

Model quality monitoring, which compares predictions with the actual outcomes once labels are available. Data quality monitoring needs only captured inputs and a baseline.

Exam Tips

Remember for the exam

  • Rising Bedrock latency and throttling: alarm on InvocationLatency and InvocationThrottles.
  • Find which agent step is slow or failing: AgentCore Observability traces.
  • Production inputs drift from training data: Model Monitor data quality monitoring.
  • Accuracy declines with labels arriving later: Model Monitor model quality monitoring.