---
name: configure-aws-observability
description: "Investigates a service that already reports to CloudWatch or CloudWatch Omni, then writes the query, alarm, or dashboard for that product. Use when the user wants Log Insights, an X-Ray trace, a CloudWatch alarm, or Omni SQL on traces.default. First-time Space setup is a different task."
license: Apache-2.0
metadata:
  category: debugging
  tags: "aws,cloudwatch,observability"
  author: johnny-bravo
  version: "1.0"
  updated: "2026-11-25"
  status: published
  aliases: "cloudwatch, cloudwatch omni, log insights, x-ray, application signals"
  source_url: "https://github.com/aws/agent-toolkit-for-aws/blob/04afec8286a31958b9e5c5308f8fbf0e98818933/skills/core-skills/aws-observability/SKILL.md"
  source_license: Apache-2.0
  copyright: "Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved."
  original_author: "Amazon Web Services (aws/agent-toolkit-for-aws)"
  modified: "Modified by TheSkillVault on 2026-11-25. Rewritten as a short product-choice and investigation guide. The reference pack, CLI matrices, and first-time setup steps were not copied. Quotas and flags must be checked on the current AWS docs. Not the original file."
  imported_on: "2026-11-25"
---

# Configure AWS observability

CloudWatch and CloudWatch Omni share a name. They are different products. They have different APIs. Enabling Omni does not turn off log groups, metrics, or alarms. Most accounts use both. This skill is for a service that already reports. It does not create the first Space or onboard Application Signals.

Confirm numbers, regions, and CLI flags on the current AWS docs before you treat them as fact. If you cannot open the page, say the value is unchecked.

## When to use
- A service already sends logs, metrics, or traces and someone asks why it is slow or failing.
- The user wants a Log Insights query, a metric alarm, a dashboard, or an X-Ray trace.
- The user names a Space, `traces.default`, an Omni alert, or the context graph.

## When not to use
- Nothing reports yet. Creating a Domain, a Space, a grant, or the first Application Signals onboarding is setup. Say so and stop. Do not invent the onboarding steps.
- The user wants threat detection or a security audit. Use audit-app-security or threat-model-your-app.
- The user wants application log lines written in code. That is a logging change, not this query.

## Which product
Decide before you query. Say which product you picked and why.

CloudWatch words: log group, Log Insights, metric namespace, metric alarm, X-Ray, Application Signals, canary, CloudTrail, Dynamic Instrumentation, flame graph.

Omni words: Space, Domain, Dataset, access grant, `logs.default`, `traces.default`, Omni alert, context graph, evaluator.

PromQL exists on both products. PromQL alone does not pick one. A bare "alarm" is also ambiguous. If a Space is already in the request, treat an alert as Omni. If not, ask which product before you create anything.

A how-to that says "Omni alert" is Omni even when no Space id was given. Do not quietly build a CloudWatch alarm instead.

## Steps
1. Restate the symptom, the service, the Region, and the time window. If the Region is missing, ask. Do not guess it.
2. Pick CloudWatch or Omni from the words above. Tell the user which one you will use.
3. If the request must read live data and the product is still unclear, list Spaces in that Region with the read-only Omni API. A Space in that Region means Omni. An empty list means CloudWatch. Say what the probe returned.
4. If the probe fails because the CLI has no `cloudwatchomni` command, that is an old CLI. It is not proof that Omni is missing. Hand the user the upgrade command. Do not run a package upgrade yourself.
5. For a CloudWatch log question, write a Log Insights query. For a metric symptom, name the metric and the statistic. For a single slow trace, look at the trace, not a fleet average.
6. For Omni logs or traces, query `logs.default` or `traces.default` with an explicit time range. Span duration is `durationNano`. A failed span is a status, not a guess.
7. For an alarm or an alert, ask for the threshold and the evaluation period. Do not invent them. Ask for a notification target only if the user wants to be notified.
8. For a dashboard, name the panels you will save and confirm that set. Do not invent a wall of widgets.
9. Read related resource settings when the symptom is a timeout or a throttle. Telemetry shows the symptom. The cause is often a configured limit.
10. If the live result is empty, still show the query and say that it returned no rows. An empty result is not the whole answer.

## Live changes
Dynamic Instrumentation sets breakpoints on a running service and can capture live values. Confirm with the user before you create or delete a probe. Snapshots can hold private data. Do not paste a snapshot into chat. Do not treat a source reading as a confirmed cause until runtime evidence agrees.

## Gotchas
- Do not put an AWS access key in the repo, the chat, or a command that gets committed. Use the CLI profile already on the machine.
- Do not substitute an X-Ray call for an Omni request. The APIs are not interchangeable.
- A log group mentioned inside an agent-evaluation question is the evaluation source. It is not a signal to switch products.
- Classic custom metrics and usage metrics are not all visible through PromQL. If a metric is missing, say which API you queried.

## Portability
Works with the AWS CLI or any SDK that can sign the same API. Another cloud's logs are a different product. If you use Grafana or another vendor APM instead, keep that tool. Do not add CloudWatch you do not need.

## Example prompt
"This service is already in CloudWatch. Write a Log Insights query for errors in the last hour, and do not invent an alarm threshold."

## Done when
- You named CloudWatch or Omni, and the reason, before any write.
- The query, alarm, or dashboard matches that product.
- Thresholds and periods came from the user, or you asked and stopped.
- No access key was written into git or chat.
- An empty result still includes the query you ran.
- A live probe was not created unless the user agreed.

---
Modified from "aws-observability" in aws/agent-toolkit-for-aws (Apache-2.0). Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. See LICENSE.txt and NOTICE.txt.
