Amazon Bedrock

Amazon Bedrock monitoring for generative AI on AWS

by Obseria · AI and LLMs
  • OpenTelemetry
  • AI Observability
  • AI and LLMs
Category
AI and LLMs
Key metrics
10
Ready-made
5 dashboards & alerts
Setup
3 steps
Standard
OTLP

Trace every Bedrock call from your application with OpenTelemetry and add the CloudWatch metrics for Bedrock, so Obseria shows model, tokens, latency, throttles and errors next to the rest of your AWS stack.

Two views, one place

Application traces show which request called which model; CloudWatch metrics show invocations, latency, throttles and tokens per model across the account.

Grouped by model ID

Bedrock reports the full model ID, so spend and latency group cleanly when several Claude, Llama or other model versions run side by side.

Part of your AWS picture

Bedrock calls appear in the same traces as Lambda, ECS, RDS and API Gateway, with cost next to performance.

Obseria interface

Obseria apps and capabilities: observability, APM, infrastructure and integrations
Obseria home dashboard with service health, open problems, SLO compliance and ingestion
Obseria trace explorer with span list and span attributes

Ready the moment data arrives

  • Bedrock overview: invocations, latency, errors per model
  • Input and output tokens per model ID and service
  • Alert on throttled invocations
  • Alert on rising server errors or latency
  • Bedrock calls inside Lambda and ECS traces

Amazon Bedrock signals Obseria monitors

InvokeModel and Converse

Calls through the bedrock-runtime client become spans with model ID, token usage and latency.

Streaming invocations

Streamed responses are traced until the stream completes, so the duration reflects the user wait.

CloudWatch metrics for Bedrock

Invocations, latency, client and server errors, throttles and token counts per model from the AWS/Bedrock namespace.

Models from several providers

Anthropic Claude, Meta Llama, Amazon models and others appear side by side, grouped by their model ID.

Serverless and container callers

Lambda functions, ECS tasks and EKS pods that call Bedrock are linked to the model calls they make.

Multiple accounts and regions

Connect several AWS accounts and regions to compare Bedrock usage across environments.

The Amazon Bedrock signals that matter

Obseria collects these values automatically and shows them in ready-made dashboards and alerts.

MetricUnitWhat it tells you
Invocations{request}CloudWatch: number of model invocation requests per model, the base for throughput.
InvocationLatencymsCloudWatch: latency of invocations per model, measured by the service.
InvocationClientErrors{request}CloudWatch: invocations that failed with client-side errors, such as validation or access issues.
InvocationServerErrors{request}CloudWatch: invocations that failed with server-side errors.
InvocationThrottles{request}CloudWatch: throttled invocations, a direct sign that quotas are reached.
InputTokenCount{token}CloudWatch: input tokens per model, the main driver of prompt cost.
OutputTokenCount{token}CloudWatch: output tokens per model, the main driver of response time.
gen_ai.client.operation.durationsOpenTelemetry: duration of each Bedrock call as seen by your application, including network time.
gen_ai.client.token.usage{token}OpenTelemetry: tokens per call, split into input and output, linked to the calling service.
gen_ai.request.modelSpan attribute with the full Bedrock model ID used for the call.

Set up Amazon Bedrock monitoring in minutes

  1. 1

    Connect your AWS account

    Connect the account with a read-only IAM role in the Obseria AWS integration, so CloudWatch metrics for Bedrock flow in without an agent.

  2. 2

    Instrument the Bedrock client

    Add traceloop-sdk and opentelemetry-instrumentation-bedrock and call Traceloop.init before the bedrock-runtime client is created.

  3. 3

    Point the exporter at Obseria

    Set TRACELOOP_BASE_URL and TRACELOOP_HEADERS to your Obseria OTLP endpoint and token, plus TRACELOOP_TRACE_CONTENT=false to keep prompts local.

Example configuration · PYTHON
# pip install boto3 traceloop-sdk opentelemetry-instrumentation-bedrock
#
# Environment (set in your deployment):
#   TRACELOOP_BASE_URL=${OBSERIA_OTLP_ENDPOINT}
#   TRACELOOP_HEADERS=Authorization=Bearer%20${OBSERIA_TOKEN}
#   TRACELOOP_TRACE_CONTENT=false   # keep prompts and responses out of spans
#   OTEL_SERVICE_NAME=claims-summarizer
from traceloop.sdk import Traceloop

# Initialize before the bedrock-runtime client is created.
Traceloop.init(app_name="claims-summarizer", disable_batch=False)

import boto3

bedrock = boto3.client("bedrock-runtime", region_name="us-east-1")
response = bedrock.converse(
    modelId="anthropic.claude-3-5-sonnet-20240620-v1:0",
    messages=[{"role": "user", "content": [{"text": "Summarize this claim."}]}],
)
# Spans carry the full model ID, token usage and latency per call.

Why Amazon Bedrock monitoring matters

Amazon Bedrock gives teams access to foundation models from several providers through one AWS API, with IAM, VPC and AWS billing they already know. That convenience moves LLM calls into the core of AWS workloads: Lambda functions summarize documents, ECS services answer customer questions, Step Functions run agent workflows. Each of these depends on model latency, token usage and service quotas. Bedrock monitoring makes those dependencies visible so throttling, slow models and growing token usage do not surprise you in production.

There are two complementary sources. CloudWatch publishes metrics for Bedrock per model, such as invocations, latency, errors, throttles and token counts. They show the account-wide picture but do not tell you which feature or request caused a call. OpenTelemetry instrumentation of the Bedrock runtime client fills that gap: each call becomes a span inside the trace of the request that made it. Obseria combines both.

Signals that matter for AWS Bedrock observability

  • Throughput and throttles: Invocations and InvocationThrottles per model. Throttling means requests hit your quota; it often appears first during batch jobs or traffic peaks.
  • Latency: InvocationLatency from CloudWatch and gen_ai.client.operation.duration from your application. The difference between both includes network time and client-side retries.
  • Errors: InvocationClientErrors point to validation, model access or permission problems, InvocationServerErrors to issues on the service side.
  • Tokens: InputTokenCount and OutputTokenCount per model in CloudWatch, and gen_ai.client.token.usage per service and endpoint from traces.
  • Model ID: gen_ai.request.model carries the full Bedrock model ID, so versions of the same model family can be compared directly.

Common Bedrock problems and how to detect them

Throttling under load

Bedrock applies quotas per model and region. When a batch job or a marketing campaign increases traffic, invocations start to be throttled and SDK retries add latency. An alert on InvocationThrottles catches this early, and the traces show which service generates the load.

Missing model access or permissions

A new model ID in a deployment fails if model access is not enabled in that region or the IAM role lacks permission. Client errors on one model right after a deployment are the signal, and the error span shows the exact message.

Slow responses inside Lambda

Model calls can take a large share of a Lambda function's runtime, which affects timeouts and cost. Traces that show the Bedrock span inside the Lambda invocation make it clear whether to raise timeouts, stream responses or move work to an asynchronous path.

Token growth

Prompts grow as features add context. Input tokens per model in CloudWatch rising week over week, combined with tokens per endpoint from traces, show which feature is responsible.

Prompts, responses and data protection

Requests to Bedrock often carry customer data. OpenLLMetry records prompts and responses on spans by default; set TRACELOOP_TRACE_CONTENT=false to send only model ID, tokens, timing and errors. CloudWatch metrics for Bedrock contain no prompt content. If you decide to store content for debugging or evaluations, Obseria can keep it in full, masked or only as a hash, detects and masks personal data and keeps data in the EU.

Best practices for Bedrock monitoring

  1. Combine CloudWatch metrics for the account view with OpenTelemetry traces for the request view.
  2. Alert on throttles and server errors per model, not only on overall error rate.
  3. Use explicit model IDs in configuration and compare latency and tokens after every model change.
  4. Set service.name and deployment.environment.name on every caller, from Lambda to ECS, to attribute usage.
  5. Keep content capture off by default and enable it only where you need it and are allowed to.

How Obseria helps with Amazon Bedrock monitoring

The Obseria AWS integration collects CloudWatch metrics agentlessly through a read-only IAM role, including the metrics for Bedrock. Application traces from the Bedrock instrumentation arrive over OTLP and connect model calls with the Lambda functions, containers and databases around them. Model Performance compares models by calls, error rate, latency and tokens, and AI Observability adds token cost per model, feature and tenant with budgets and anomaly alerts. When an AI feature slows down, Obseria Intelligence correlates throttles, model latency, deployments and upstream changes and presents the root cause with its chain of evidence. Obseria is an independent product and is not affiliated with AWS.

Learn more

Amazon Bedrock monitoring FAQ

They complement each other. CloudWatch metrics show invocations, latency, errors, throttles and tokens per model for the whole account. OpenTelemetry traces show which service and request made each call. Obseria uses both.

The Bedrock instrumentation traces calls through the bedrock-runtime client, including InvokeModel and Converse, with model ID, token usage and latency.

Only if you allow it. Set TRACELOOP_TRACE_CONTENT=false to export metadata only. CloudWatch metrics never contain prompt content.

Yes. Claude models on Bedrock are traced like any other Bedrock model and grouped by their full model ID. Calls through the Anthropic API directly use the Anthropic instrumentation instead.

Yes. Instrument the function code with the Bedrock instrumentation and send spans to Obseria. The Bedrock call appears as a span inside the Lambda trace.

Start monitoring Amazon Bedrock today

Connect Amazon Bedrock in minutes with OpenTelemetry or the Obseria Agent. Free for 14 days.