aws-observability
aws/agent-toolkit-for-aws
利用 CloudWatch(日志洞察、指标、警报、仪表板、EMF)、X-Ray、CloudTrail 和 ADOT 构建、配置、调试和优化 AWS 可观测性。 涵盖 Log Insights 查询语法(字段、过滤器、统计、解析、模式、连接、子查询)、告警配置(指标、复合告警、异常检测、缺失数据处理)、仪表板设计、自定义指标(PutMetricData、EMF、指标过滤器), X-Ray 追踪(ADOT、采样规则、注释与元数据的区别)、ADOT 收集器配置以及 CloudT
...展开全部关于aws-observability
AWS 可观测性提供了跨指标、日志和追踪的领域专业知识,用于在 AWS 上构建、配置、调试和优化可观测性。 该服务涵盖 CloudWatch 平台功能——日志洞察 (Logs Insights)、指标 (Metrics)、警报 (Alarms)、仪表板 (Dashboards) 和 EMF——以及 X-Ray 追踪、CloudTrail 运维审计和 AWS Distro for OpenTelemetry (ADOT) 收集器。 具体内容包括 Log Insights 查询语法(字段、过滤器、统计信息、解析、模式、连接、子查询)、 告警配置(指标、复合告警、异常检测、缺失数据处理)、仪表盘设计、通过 PutMetricData 设置自定义指标、EMF 及指标过滤器,此外还包括 X-Ray 采样规则以及注释与元数据的区别。
当任务提及 CloudWatch、Log Insights、告警、INSUFFICIENT_DATA、仪表盘、自定义指标、EMF、X-Ray、追踪、采样、CloudTrail、“谁删除了”、 ADOT、OpenTelemetry、可观测性、监控、合成监控、金丝雀部署,或警报行为故障排除时,请使用此技能。本技能明确不涵盖应用程序日志配置、容器日志驱动程序或安全威胁检测。 该技能与 AWS MCP 服务器配合使用效果最佳,该服务器允许代理直接运行 CLI 命令、查询 CloudWatch 并验证配置,不过所有指导内容也适用于标准的 AWS CLI 访问。
该技能采用路由表形式组织,将每个用户需求映射到特定的参考文件:log-insights.md 用于查询,alarms.md 用于告警配置和默认设置,metrics.md 用于自定义指标和 EMF,tracing.md 用于 X-Ray 和 ADOT,dashboards.md 用于小部件设计及跨账户/区域共享,troubleshooting.md(开头列出了五种最常见的解决方法),synthetics.md 用于金丝雀测试约束和常见故障,cloudtrail.md 用于通过 S3 和 Athena 进行运维审计。 其中包含两个可直接使用的资源:alarm-template.ts(一个用于 Lambda 监控的最佳实践 CDK 模板,包含告警和仪表盘)以及 otel-config.yaml(一个用于 X-Ray 追踪和 CloudWatch EMF 指标的 ADOT 收集器配置文件)。 由于参考文件中包含会随时间变化的运行时版本、配额值和功能矩阵,本指南建议在生产环境中使用这些值之前,先对照最新的 AWS 文档核对对精度要求较高的数值。
常见问题
该技能涵盖哪些 AWS 服务?
它涵盖 CloudWatch(日志洞察、指标、警报、仪表盘、EMF)、X-Ray 追踪、CloudTrail 运维审计,以及跨指标、日志和追踪的 ADOT(OpenTelemetry)收集器。
何时不应使用此技能?
请勿将其用于应用程序日志配置、容器日志驱动程序或安全威胁检测。这些领域明确不在本技能的适用范围内。
使用该技能是否需要 AWS MCP 服务器?
不需要。虽然配合 AWS MCP 服务器使用效果最佳(该服务器支持直接运行 CLI 命令并验证配置),但所有指导内容同样适用于标准 AWS CLI 访问。
如果警报卡在 INSUFFICIENT_DATA 状态,该去哪里排查?
请从 troubleshooting.md 开始,该文档首先列出了五种最常见的解决方法;同时请查阅 alarms.md 以获取配置详情,包括针对指标、复合和异常检测警报的缺失数据处理方案。
是否包含现成的模板?
是的。它提供了 `alarm-template.ts`——一个用于 Lambda 监控(包含警报和仪表盘)的最佳实践 CDK 模板,以及 `otel-config.yaml`——一个用于 X-Ray 跟踪和 CloudWatch EMF 指标的 ADOT 收集器配置文件。
所有文件
11个文件references/alarms.md10.9KB 查看references/log-insights.md 6.9KB 查看 references/tracing.md 8.9 KB 查看 assets/alarm-template.ts 3.9KB 查看 references/cloudtrail.md 3.9 KB 查看 references/metrics.md7.4KB 查看 references/troubleshooting.md 6.7KB 查看 assets/otel-config.yaml 1.4KB 查看 references/dashboards.md 5.8KB 查看references/synthetics.md 6.5KB 查看 SKILL.md 4.1 KB 查看Overview
Domain expertise for AWS observability across metrics, logs, and traces, covering the full lifecycle: enabling/onboarding a service to Application Signals using ADOT (AWS Distro for OpenTelemetry) auto-instrumentation SDKs and ServiceEvents — making the service show up in Application Signals — on EC2, ECS, EKS, and Lambda in Python, Node.js, Java, and .NET.
Works best with the AWS MCP server — enables running CLI commands, querying CloudWatch, and validating configurations directly. All guidance also works with standard AWS CLI access.
Note: Reference files contain specific runtime versions, quota values, and feature matrices that may change. When precision matters (e.g., deploying to production, choosing a runtime, or checking a quota), confirm values against current AWS documentation rather than relying solely on the values in these files.
Routing
| User need | Action |
|---|---|
| Enabling/onboarding a service to Application Signals (auto-instrumentation) | Read application-signals-onboarding.md |
| Propagating ServiceEvents git/deployment metadata through CI/CD | Read application-signals-cicd-metadata.md |
| Per-platform/per-language enablement steps | Read the matching references/appsignals-guides/<platform>-<language>.md (e.g. eks-python.md) |
| Writing Log Insights queries | Read log-insights.md |
| Configuring alarms (metric, composite, anomaly) | Read alarms.md |
| Publishing custom metrics or using EMF | Read metrics.md |
| Setting up X-Ray tracing or ADOT | Read tracing.md |
| Building dashboards | Read dashboards.md |
| Debugging observability issues | Read troubleshooting.md — starts with the 5 most common fixes |
| Debugging canary failures | Read synthetics.md — see Common failures table |
| CloudTrail operational auditing | Read cloudtrail.md |
| Setting up Lambda monitoring with CDK | Use alarm-template.ts as a starting point |
| Creating synthetic canaries | Read synthetics.md |
| Configuring ADOT collector | Use otel-config.yaml as a starting point |
| Debugging a running service with breakpoints/snapshots — Dynamic Instrumentation (modifies live services and capture live data) | Read dynamic-instrumentation.md in full before acting. Confirm with the user before any create/delete, and narrate before significant actions: observation → hypothesis → proposed action → expected result. Diagnosing running-service root cause from source/code inspection. Source inspection alone identifies hypotheses, not confirmed root causes. Keep suspected causes tentative until runtime evidence confirms them. |
| Spans multiple areas | Read the most specific reference first, then consult others as needed |
Files
| File | Content |
|---|---|
| application-signals-onboarding.md | Enable Application Signals auto-instrumentation: EKS add-on, CloudWatch Agent IAM, OTLP endpoints, ServiceEvents env vars, Dynamic Instrumentation — two-tier scope by platform/language |
| application-signals-cicd-metadata.md | ServiceEvents git & deployment metadata propagation through CI/CD (the 5 OTEL_AWS_SERVICE_EVENTS_* vars) |
references/appsignals-guides/ (e.g. eks-python.md) | 16 per-platform × per-language enablement guides (EC2/ECS/EKS/Lambda × Python/Node.js/Java/.NET) |
| alarms.md | Metric, composite, anomaly detection alarms — configuration, constraints, recommended defaults |
| log-insights.md | Complete query syntax, commands, functions, known issues, reusable query library |
| metrics.md | Custom metrics, EMF spec, metric filters, high-resolution, retention |
| tracing.md | X-Ray → ADOT migration, sampling rules, annotations vs metadata, collector config |
| dashboards.md | Widget types, cross-account/region, dynamic labels, sharing |
| troubleshooting.md | Error → cause → fix for all observability services |
| cloudtrail.md | Operational auditing, event types, S3+Athena queries |
| synthetics.md | Canary runtime/blueprint constraints, VPC networking, common failures |
| alarm-template.ts | Best-practice CDK Lambda monitoring (alarms + dashboard) |
| otel-config.yaml | ADOT collector config for X-Ray traces + CloudWatch EMF metrics |
| dynamic-instrumentation.md | Dynamic Instrumentation debugging loop — breakpoints/probes on live code, snapshot capture + correlation analysis, create/delete gating, snapshot PII handling. Runs via scripts/di_instrumentation.py + scripts/di_snapshots.py. |





首页
