setting-up-cloudwatch-observability

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Setting Up CloudWatch Application Observability

设置CloudWatch Application Observability

Scope: First-time setup of a CloudWatch Application Observability Space — from creation through first traces flowing. For using a Space that is already set up (queries, dashboards, alerts, evaluations), route to aws-observability.
Works best with the AWS MCP server — enables running AWS CLI commands directly. All guidance also works with standard AWS CLI access (
aws cloudwatchomni ...
).
范围: CloudWatch Application Observability Space的首次设置——从创建到第一条追踪流动。对于使用已经设置好的Space(查询、仪表板、告警、评估),请路由到aws-observability。
最佳搭配 AWS MCP服务器——可直接运行AWS CLI命令。所有指南也适用于标准AWS CLI访问(
aws cloudwatchomni ...
)。

Concepts

概念

TermWhat it is
DomainThe identity boundary. Carries the authorization provider (IAM or Identity Center) and owns the endpoint URL customers reach Omni through. One per account, or one shared across an AWS Organization.
SpaceA workspace holding telemetry, in exactly one account and one Region. Created under a Domain. At most one per account per Region. Region rule: under an IAM-only Domain a Space may sit in a Region other than the Domain's; under an Identity Center Domain the Space must be in the Domain's own Region — Identity Center plus Spaces in several Regions needs the org-scoped Domain.
Access grantAttaches a principal — person, group, IAM identity, or async workload — to one Space at a permission level. The only way anyone reaches data through a Space — it does not restrict the source CloudWatch log groups, which stay readable under their own IAM.
Access ProfileA named boundary for async workloads (alerts, integrations, agents) that act without a person in the loop. It is only a named container:
create-access-profile
takes a Space, a name, and a description and nothing else — no permission, action, or scope input. It does something only once two separate sets of grants exist (what the profile may do; which workloads may assume it) and a workload names it.
DatasetWhat queries run against. Telemetry arrives through the CloudWatch OTLP endpoints, or by forwarding what is already in CloudWatch log groups.
Setup order from nothing: Domain → Space → grants → telemetry in → instrumentation. "Telemetry in" (a collector exporting to CloudWatch's OTLP endpoints, plus dataset forwarding for what is already in CloudWatch) is its own step, separate from instrumenting the workloads. Access Profiles are conditional, not a step in the sequence — only when async workloads (alerts, integrations, agents) are involved. Whenever you give this sequence, also say that instrumentation or forwarding started before a Space exists appears to succeed while delivering telemetry nowhere the customer can see — a customer who checks Omni first reads a working, empty Space as a failure. For the concept relationships and the full arc, see
references/cloudwatch-omni/app-basics.md
.
This is a routing skill. Classify the user's setup request and delegate to the correct reference. References live under
references/cloudwatch-omni/
(CloudWatch Omni); this skill has no CloudWatch setup content, so it has no
references/cloudwatch/
folder — CloudWatch onboarding (Application Signals) lives in aws-observability.
User intentReference
Understand what Omni is, its concepts, or where to start
references/cloudwatch-omni/app-basics.md
Instrument an AI agent (ADOT, OpenInference, framework detection, trace verification), or deploy an agent to production and get traces flowing to CloudWatch — env vars per platform (AgentCore, Lambda, or other platforms such as ECS/EC2/EKS), routing spans to a custom trace log group, IAM permissions needed, ADOT version requirements
references/cloudwatch-omni/omni-agents-instrumentation/omni-agents-instrumentation.md
(§ Production deployment for the deploy case)
Per-framework OpenInference guide (LangChain, LangGraph, Strands, CrewAI, OpenAI Agents, Vercel AI) once the agent framework is known
references/cloudwatch-omni/omni-agents-instrumentation/openinference-framework-guide.md
, then the matching
references/cloudwatch-omni/omni-agents-instrumentation/instrument-<framework>.md
Instrument an application (ADOT SDK on EC2/ECS/EKS/Lambda — Python, Node.js, Java, .NET)
references/cloudwatch-omni/instrumentation/instrumentation.md
Emit a custom application or agent metric so it is queryable in Omni (why OTLP and not
PutMetricData
/EMF)
references/cloudwatch-omni/instrumentation/instrumentation.md
(§ Custom metrics)
Create an account-scoped Space or Domain
references/cloudwatch-omni/spaces-and-domains.md
Whether a Space can be in a different Region from its Domain
references/cloudwatch-omni/spaces-and-domains.md
(Prerequisites → Region rules)
The AgentCore evaluation role that
create-space
asks for — what it is, whether to create one
references/cloudwatch-omni/spaces-and-domains.md
(Step 3 → Also resolve the AgentCore evaluation role)
A Space that was created successfully but returns an authorization error when used
references/cloudwatch-omni/spaces-and-domains.md
(Troubleshooting → If the Space was created but cannot be used) — a space access role trust-policy problem, not a grant problem
Create a Domain shared across an AWS Organization
references/cloudwatch-omni/org-domains.md
Configure access grants for people or IAM identities or alerts
references/cloudwatch-omni/access-grants.md
Bound an alert, integration, or agent with an Access Profile
references/cloudwatch-omni/access-profiles.md
Deploy an OTel Collector so an instrumented app has somewhere to export to (EC2/ECS/EKS) — it exports to CloudWatch's own per-signal OTLP endpoints
references/cloudwatch-omni/instrumentation/collector.md
Enable Transaction Search so traces reach a Space (spans land in
aws/spans
only once it is on — per account, per Region)
references/cloudwatch-omni/instrumentation/collector.md
(Step 1)
Forward telemetry already in CloudWatch into the Dataset
references/cloudwatch-omni/data-forwarding-and-centralization.md
Send your application's own telemetry from Azure (the logs/metrics/traces your service emits, via the CloudWatch agent on an Azure VM/AKS)
references/cloudwatch-omni/azure-ingestion/azure-ingestion.md
(intent triage), then
references/cloudwatch-omni/azure-ingestion/custom-telemetry.md
(the CloudWatch-agent-on-VM/AKS procedure)
Connect Slack to a Space for the first time
references/cloudwatch-omni/slack-integration.md
Register a custom MCP tool server (HTTP or stdio) and choose its authentication
references/cloudwatch-omni/custom-mcp-integration.md
术语含义
Domain身份边界。承载授权提供方(IAM或Identity Center),并拥有客户访问Omni的端点URL。每个账户一个,或在AWS Organization中共享一个。
Space一个工作区,保存遥测数据,位于一个账户和一个区域。在Domain下创建。每个账户每个区域最多一个。区域规则:在仅IAM的Domain下,Space可以位于Domain所在区域之外的区域;在Identity Center Domain下,Space必须位于Domain自身的区域——Identity Center加多个区域的Space需要组织级Domain。
Access grant将主体——人、组、IAM身份或异步工作负载——以某个权限级别附加到一个Space。这是任何人通过Space访问数据的唯一方式——它不限制源CloudWatch日志组,这些日志组在其自身IAM下仍然可读。
Access Profile为异步工作负载(告警、集成、代理)定义的命名边界,这些工作负载在没有人工参与的情况下运行。它只是一个命名容器:
create-access-profile
接受一个Space、一个名称和一个描述,没有别的——没有权限、操作或范围输入。只有存在两套独立的授权(配置文件可以做什么;哪些工作负载可以承担它)并且工作负载指定了它,它才会起作用。
Dataset查询所针对的数据集。遥测数据通过CloudWatch OTLP端点到达,或通过转发CloudWatch日志组中已有的内容到达。
从零开始的设置顺序:Domain → Space → grants → 遥测导入 → 插桩。 “遥测导入”(一个collector导出到CloudWatch的OTLP端点,加上对CloudWatch中已有数据的dataset转发)是独立的一步,与对工作负载进行插桩分开。Access Profiles是有条件的,不是顺序中的一步——仅当涉及异步工作负载(告警、集成、代理)时。每当你给出这个顺序时,还要说明在Space存在之前开始的插桩或转发看似成功,却将遥测数据送到客户看不到的地方——先检查Omni的客户会将一个正常工作的空Space视为失败。关于概念关系和完整流程,请参阅
references/cloudwatch-omni/app-basics.md
。
这是一个路由skill。对用户的设置请求进行分类,并委托给正确的参考文档。参考文档位于
references/cloudwatch-omni/
(CloudWatch Omni)下;此skill没有CloudWatch设置内容,因此没有
references/cloudwatch/
文件夹——CloudWatch onboarding(Application Signals)位于aws-observability中。
用户意图参考文档
理解什么是Omni、其概念或从何处开始
references/cloudwatch-omni/app-basics.md
对AI代理进行插桩(ADOT、OpenInference、框架检测、追踪验证),或将代理部署到生产环境并让追踪流入CloudWatch——各平台的环境变量(AgentCore、Lambda或其他平台如ECS/EC2/EKS),将span路由到自定义追踪日志组,所需的IAM权限,ADOT版本要求
references/cloudwatch-omni/omni-agents-instrumentation/omni-agents-instrumentation.md
(部署场景见§ 生产部署)
按框架的OpenInference指南(LangChain、LangGraph、Strands、CrewAI、OpenAI Agents、Vercel AI),一旦确定了代理框架
references/cloudwatch-omni/omni-agents-instrumentation/openinference-framework-guide.md
,然后是对应的
references/cloudwatch-omni/omni-agents-instrumentation/instrument-<framework>.md
对应用程序进行插桩(EC2/ECS/EKS/Lambda上的ADOT SDK——Python、Node.js、Java、.NET)
references/cloudwatch-omni/instrumentation/instrumentation.md
发出自定义应用程序或代理指标,使其在Omni中可查询(为什么是OTLP而不是
PutMetricData
/EMF)
references/cloudwatch-omni/instrumentation/instrumentation.md
(§ 自定义指标)
创建账户级Space或Domain
references/cloudwatch-omni/spaces-and-domains.md
Space是否可以位于与其Domain不同的区域
references/cloudwatch-omni/spaces-and-domains.md
(前提条件 → 区域规则)
create-space
要求的AgentCore评估角色——它是什么,是否要创建
references/cloudwatch-omni/spaces-and-domains.md
(步骤3 → 还要解决AgentCore评估角色)
创建成功但使用时返回授权错误的Space
references/cloudwatch-omni/spaces-and-domains.md
(故障排查 → 如果Space已创建但无法使用)——这是space访问角色信任策略问题,不是授权问题
创建跨AWS Organization共享的Domain
references/cloudwatch-omni/org-domains.md
为人、IAM身份或告警配置访问授权
references/cloudwatch-omni/access-grants.md
使用Access Profile绑定告警、集成或代理
references/cloudwatch-omni/access-profiles.md
部署OTel Collector,使插桩后的应用有导出目标(EC2/ECS/EKS)——它导出到CloudWatch自己的按信号OTLP端点
references/cloudwatch-omni/instrumentation/collector.md
启用Transaction Search,使追踪到达Space(只有启用后span才会落入
aws/spans
——每个账户、每个区域)
references/cloudwatch-omni/instrumentation/collector.md
(步骤1)
将CloudWatch中已有的遥测数据转发到Dataset
references/cloudwatch-omni/data-forwarding-and-centralization.md
从Azure发送应用程序自身的遥测数据(服务发出的日志/指标/追踪,通过Azure VM/AKS上的CloudWatch代理)
references/cloudwatch-omni/azure-ingestion/azure-ingestion.md
(意图分流),然后是
references/cloudwatch-omni/azure-ingestion/custom-telemetry.md
(CloudWatch代理在VM/AKS上的过程)
首次将Slack连接到Space
references/cloudwatch-omni/slack-integration.md
注册自定义MCP工具服务器(HTTP或stdio)并选择其认证方式
references/cloudwatch-omni/custom-mcp-integration.md

Routing Rules

路由规则

  1. If the user is asking what Omni is, what a Domain or Space or grant means, where to start, or the end-to-end order of steps from nothing — rather than asking to perform one setup step — route to
    references/cloudwatch-omni/app-basics.md
    and answer the sequence from its "Setup order" section (not from a single procedure file such as
    collector.md
    , which covers one step). It also carries the boundary against aws-observability. A question about one concept's rules — a Space's Region relative to its Domain, the roles
    create-space
    needs — belongs to the procedure file for that concept (
    spaces-and-domains.md
    ), which the routing table names.
  2. If the request is about instrumenting an AI agent project (adding OTel to a framework such as LangChain, LangGraph, Strands, CrewAI, OpenAI Agents, or Vercel AI), route to
    references/cloudwatch-omni/omni-agents-instrumentation/omni-agents-instrumentation.md
    .
  3. If the request is about instrumenting a general application (a service on EC2, ECS, EKS, or Lambda in Python, Node.js, Java, or .NET — not an AI-agent framework), route to
    references/cloudwatch-omni/instrumentation/instrumentation.md
    .
  4. If an instrumentation, ADOT, or collector request names neither Omni or a Space, nor Application Signals, ServiceEvents, or the
    amazon-cloudwatch-observability
    add-on, probe the target Region before choosing:
    aws cloudwatchomni list-spaces --region <region>
    . A Space exists → this skill,
    references/cloudwatch-omni/instrumentation/instrumentation.md
    . No Space → the customer has not adopted Omni; route to aws-observability's Application Signals onboarding reference. If the probe errors with an unknown service, that is the CLI model, not evidence Omni is absent — fall back to the customer's wording and ask only if still inconclusive.
  5. If the request is about Space/Domain creation or configuration, route to the matching setup reference. An authorization error that appears the moment a just-created Space is used is part of this — it is a space access role trust-policy problem (
    create-space
    never verifies the role can be assumed), so route to
    references/cloudwatch-omni/spaces-and-domains.md
    → "If the Space was created but cannot be used", not to the access-grants reference.
  6. If the user asks about getting telemetry to a destination — telemetry not yet reaching CloudWatch — deploy an OTel Collector on EC2/ECS/EKS so an instrumented workload has somewhere to send OTLP, and wire the app's
    OTEL_EXPORTER_OTLP_ENDPOINT
    to it:
    references/cloudwatch-omni/instrumentation/collector.md
    . The collector exports straight to CloudWatch's own per-signal OTLP endpoints. If instead the telemetry is already in CloudWatch log groups and needs forwarding into the Dataset, route to
    references/cloudwatch-omni/data-forwarding-and-centralization.md
    .
  7. If the request is about getting Azure telemetry into CloudWatch, route to
    references/cloudwatch-omni/azure-ingestion/azure-ingestion.md
    and decide by intent. If the customer wants the telemetry their own application produces (the logs/metrics/traces from their code), that is supported via the CloudWatch agent on an Azure VM or AKS cluster — follow the reference. If they want telemetry their Azure resources emit on their own (the Azure equivalent of AWS VPC flow logs / Route 53 logs), that is not available — say so and do not attempt a setup.
  8. If the user asks to connect, enable, or authorize Slack for a Space for the first time (including granting the operator permission to use it), route to
    references/cloudwatch-omni/slack-integration.md
    . Using Slack after it is connected (posting findings to a channel, mentioning the assistant, or searching Slack) happens in Slack and the console and is not covered by these skills; Slack as an alert notification target is covered by aws-observability's Omni alerts reference.
  9. If the user wants Application Signals, ServiceEvents, or Dynamic Instrumentation, STOP and route to aws-observability — those are CloudWatch features and are out of scope for Omni instrumentation.
  10. If the user already has a working Space and is asking about queries/dashboards/alerts, STOP and route to aws-observability.
  11. If the user asks to register their own MCP tool server, connect a custom MCP server, set up MCP authentication, or choose an auth type for an MCP server (including an OAuth-protected one), route to
    references/cloudwatch-omni/custom-mcp-integration.md
    . For an OAuth-protected server the choice is one of the two OAuth2 types — client credentials for machine-to-machine, authorization code when a user must consent.
  12. If the user asks to connect GitHub, link a GitHub organization or repositories, or enrich the application map from source code: CloudWatch Omni has no GitHub integration. Say so plainly and stop — do not walk through a setup. Do not offer a substitute: the Application Signals GitHub Action and the CloudWatch Logs GitHub audit-log source are separate CloudWatch features, not a way to connect GitHub to Omni, and a custom MCP server is not a GitHub integration. A GitHub-related feature found in public documentation is not evidence of an Omni GitHub integration.
  13. If the request names neither product — "add observability to my API", "how should I begin monitoring my workload", with no mention of Omni, a Space, a Domain, or of a CloudWatch feature — do not assume either one. Which product a customer wants to set up is their intent, not something the account's current state tells you, so ask, framed product versus product: CloudWatch Omni (Application/Agent Observability — Domains, Spaces, grants, a Dataset) or CloudWatch (log groups, alarms, Log Insights, Application Signals). In the same message, explain the boundary so they can choose — it is setup versus use: creating or configuring a Domain, Space, grant, or Access Profile, getting telemetry flowing for the first time, and instrumenting an application or agent for Omni are first-time Omni setup and belong here; querying telemetry, building dashboards, and configuring alerts are day-to-day use, and — together with anything about Application Signals, X-Ray, synthetics, or CloudWatch alarms — belong to aws-observability. Do not start walking through Domain or Space creation until they confirm Omni; having asked, stop and wait.
  1. 如果用户在问什么是Omni、Domain、Space或grant的含义、从何处开始,或从零开始的端到端步骤顺序——而不是要求执行某个设置步骤——则路由到
    references/cloudwatch-omni/app-basics.md
    ,并从其“设置顺序”部分回答顺序(而不是从单个过程文件如
    collector.md
    ,那只涵盖一个步骤)。它还承载着与aws-observability的边界。关于某个概念规则的问题——Space相对于其Domain的区域、
    create-space
    需要的角色——属于该概念的过程文件(
    spaces-and-domains.md
    ),路由表已指明。
  2. 如果请求是关于对AI代理项目进行插桩(将OTel添加到LangChain、LangGraph、Strands、CrewAI、OpenAI Agents或Vercel AI等框架),路由到
    references/cloudwatch-omni/omni-agents-instrumentation/omni-agents-instrumentation.md
    。
  3. 如果请求是关于对通用应用程序进行插桩(在EC2、ECS、EKS或Lambda上的Python、Node.js、Java或.NET服务——不是AI代理框架),路由到
    references/cloudwatch-omni/instrumentation/instrumentation.md
    。
  4. 如果插桩、ADOT或collector请求既未提及Omni或Space,也未提及Application Signals、ServiceEvents或
    amazon-cloudwatch-observability
    插件,在选择前探测目标区域:
    aws cloudwatchomni list-spaces --region <region>
    。如果存在Space → 使用此skill的
    references/cloudwatch-omni/instrumentation/instrumentation.md
    。如果不存在Space → 客户尚未采用Omni;路由到aws-observability的Application Signals接入指南。如果探测报错“未知服务”,那是CLI模型问题,不是Omni不存在的证据——回退到客户的措辞,仅在仍不确定时才询问。
  5. 如果请求是关于Space/Domain的创建或配置,路由到对应的设置参考。刚刚创建的Space在使用时立即出现的授权错误属于此类——这是space访问角色信任策略问题(
    create-space
    从不验证角色是否可被承担),因此路由到
    references/cloudwatch-omni/spaces-and-domains.md
    → “如果Space已创建但无法使用”,而不是访问授权参考。
  6. 如果用户询问将遥测数据送至目的地——遥测数据尚未到达CloudWatch——在EC2/ECS/EKS上部署OTel Collector,使插桩后的工作负载有地方发送OTLP,并将应用程序的
    OTEL_EXPORTER_OTLP_ENDPOINT
    连接到它:
    references/cloudwatch-omni/instrumentation/collector.md
    。collector直接导出到CloudWatch自己的按信号OTLP端点。如果遥测数据已经在CloudWatch日志组中并且需要转发到Dataset,则路由到
    references/cloudwatch-omni/data-forwarding-and-centralization.md
    。
  7. 如果请求是关于将Azure遥测数据接入CloudWatch,路由到
    references/cloudwatch-omni/azure-ingestion/azure-ingestion.md
    并根据意图决定。如果客户想要其应用程序自身产生的遥测数据(其代码产生的日志/指标/追踪),这可以通过Azure VM或AKS集群上的CloudWatch代理支持——按照参考执行。如果他们想要其Azure资源自行发出的遥测数据(相当于AWS VPC流日志/Route 53日志的Azure版本),这是不可用的——如实告知,不要尝试设置。
  8. 如果用户要求首次连接、启用或授权Slack到Space(包括授予操作者使用它的权限),路由到
    references/cloudwatch-omni/slack-integration.md
    。连接后使用Slack(将发现发布到频道、提及助手或搜索Slack)发生在Slack和控制台中,不包含在这些skills中;Slack作为告警通知目标由aws-observability的Omni告警参考涵盖。
  9. 如果用户想要Application Signals、ServiceEvents或Dynamic Instrumentation,停止并路由到aws-observability——这些是CloudWatch功能,不在Omni插桩范围内。
  10. 如果用户已经有了可用的Space,并询问查询/仪表板/告警,停止并路由到aws-observability。
  11. 如果用户要求注册自己的MCP工具服务器、连接自定义MCP服务器、设置MCP认证,或为MCP服务器选择认证类型(包括受OAuth保护的),路由到
    references/cloudwatch-omni/custom-mcp-integration.md
    。对于受OAuth保护的服务器,选择是两种OAuth2类型之一——机器对机器使用客户端凭证,用户必须同意时使用授权码。
  12. 如果用户要求连接GitHub、关联GitHub组织或仓库,或从源代码丰富应用程序地图:CloudWatch Omni没有GitHub集成。 直接说明并停止——不要进行设置。不要提供替代方案:Application Signals GitHub Action和CloudWatch Logs GitHub审计日志源是独立的CloudWatch功能,不是将GitHub连接到Omni的方式,自定义MCP服务器也不是GitHub集成。在公开文档中发现的GitHub相关功能不是Omni GitHub集成的证据。
  13. 如果请求未提及任何一个产品——“为我的API添加可观测性”、“我应该如何开始监控我的工作负载”,没有提到Omni、Space、Domain或任何CloudWatch功能——不要假设是哪一个。客户想要设置哪个产品是他们自己的意图,不是账户当前状态能告诉你的,因此要问,以产品对产品的方式询问:CloudWatch Omni(Application/Agent Observability——Domains、Spaces、grants、Dataset)还是CloudWatch(log groups、alarms、Log Insights、Application Signals)。在同一消息中解释边界,以便他们选择——这是设置与使用的区别:创建或配置Domain、Space、grant或Access Profile、首次让遥测流动、以及为Omni插桩应用程序或代理属于首次Omni设置,归于此;查询遥测、构建仪表板、配置告警属于日常使用,并且——连同任何关于Application Signals、X-Ray、synthetics或CloudWatch alarms的内容——属于aws-observability。在客户确认Omni之前,不要开始讲解Domain或Space创建;问过之后,停止并等待。