Build Visibility for Codex on Amazon Bedrock with OpenTelemetry and Amazon CloudWatch
Amazon Web Services
AWS published a post explaining how to gain visibility into Codex usage on Amazon Bedrock by routing OpenTelemetry metrics from local Codex clients through a local collector to Amazon CloudWatch. The solution enriches metrics with organizational attributes from AWS IAM Identity Center and provides a dashboard for monitoring adoption, consumption, reliability, and cost.
The AWS Machine Learning Blog published a post on enabling observability for OpenAI Codex coding agents that use Amazon Bedrock as the model provider. Developers run Codex locally, and it emits OpenTelemetry (OTel) metrics. These metrics are sent to a collector running on each developer workstation, which enriches them with organizational context (user, team, department, cost center) and forwards them to Amazon CloudWatch using AWS Signature Version 4. The reference deployment includes a CloudWatch dashboard with rolling 24-hour totals for active users, conversation turns, API requests, and token usage, plus views by model, user, team, and more. The post describes the architecture, implementation steps (enabling CloudWatch OTel capabilities, deploying the dashboard, generating per-developer configuration, configuring Codex, and validating the flow), and governance considerations such as metric cardinality control and phased rollout. It distinguishes usage telemetry from billing-grade cost data, recommending AWS Cost and Usage Reports (CUR) 2.0 for financial tracking.
- Abbreviations
- OTel = OpenTelemetry — OpenTelemetry
- IAM = Identity and Access Management — Управление доступом и идентификацией
- API = Application Programming Interface — Программный интерфейс приложения
- OTLP = OpenTelemetry Protocol — Протокол OpenTelemetry
- SigV4 = AWS Signature Version 4 — AWS Signature Version 4
- CUR = Cost and Usage Reports — Отчеты о затратах и использовании
- PromQL = Prometheus Query Language — Язык запросов Prometheus
- CloudFormation = AWS CloudFormation — AWS CloudFormation
- ECS = Elastic Container Service — Эластичный сервис контейнеров
- VPC = Virtual Private Cloud — Виртуальное частное облако
- SNS = Simple Notification Service — Простой сервис уведомлений
Source: AWS ML blog —
original
