opensite-ai/opensite-skills / aws-observability
aws-observability
UnverifiedBuilds, configures, debugs, and optimizes AWS observability - operator-symptom questions and detecting Omni vs classic CloudWatch. CloudWatch on an already-reporting service: Log Insights, metric/composite/anomaly alarms, custom metrics/EMF, dashboards, X-Ray/ADOT tracing, canaries, CloudTrail, Dynamic Instrumentation (live breakpoints/snapshots), the Application Signals service map, and fleet health views. CloudWatch Omni on an existing Space: SQL over logs and traces, PromQL over metrics, Omni dashboards, Omni alerts, context graph for root cause, programmatic/IaC access (API/SDK/CLI/CloudFormation), driving Omni from a coding agent or skills, and evaluating AI agent quality from traces - on-demand and online scoring of live traffic, readback, custom evaluators. For first-time setup - creating an Omni Space, granting access, ingestion, or ADOT instrumentation for Application Signals (ServiceEvents, CI/CD metadata) or Omni - use setting-up-cloudwatch-observability. Not for app logging or threat detection.
scripts/cloudwatch/di_app_signals_client.py
View on GitHub"""The application-signals boto3 client seam for the dynamic-instrumentation tools.
WHY THIS EXISTS (import-cycle removal)
This module is the LEAF that owns ``get_application_signals_client()``. Previously the seam
lived in ``di_instrumentation`` (the CLI entry point), so the operation modules reached it via
``di_crud_tools/di_status_tools -> di_gateway -> di_instrumentation`` — an import cycle back
into the entry script, which forced every op module to be imported lazily. A client seam is a
leaf concern (it depends only on ``di_session``/``di_region``), so it belongs in its own leaf
module. With it here, ``di_gateway`` imports DOWN into this module and nothing imports back
into ``di_instrumentation``: the cycle is gone. This mirrors how ``di_session`` / ``di_region``
already factor out the shared client-construction policy.
``boto3``/``botocore`` are imported lazily (inside ``di_session.build_client``), so importing
this module never requires boto3 — which is what lets the build env (which omits boto3) import
``di_instrumentation`` for the ``APPLICATION_SIGNALS_API_VERSION`` constant. (Running
``--print-contract`` is a separate matter: it resolves the op functions and so does pull in
``botocore`` via the op modules — only the bare module import is boto3-free.)
"""
# The application-signals instrumentation API version the operations were authored against; the
# public SDK serves it. Surfaced (informationally) by di_instrumentation --print-contract.
APPLICATION_SIGNALS_API_VERSION = "2024-04-15"
# Minimum boto3/botocore that ships the DI operations in the public model. Surfaced only in the
# fail-fast upgrade message — the actual gate is operation presence (see _MIN_DI_OPERATION).
MIN_BOTO3_VERSION = "1.43.35"
# Canary operation: if the installed SDK's application-signals model lacks this, the whole DI
# surface is missing and we should tell the caller to upgrade rather than fail mid-operation.
_MIN_DI_OPERATION = "CreateInstrumentationConfiguration"
_application_signals_client = None
def get_application_signals_client():
"""Return a lazily-built `application-signals` client from the installed boto3.
The `di_gateway` module imports this symbol. Region resolves from --region/AWS_REGION/
AWS_DEFAULT_REGION (default us-east-1); AWS_PROFILE is honored for credentials only. The DI
operations ship in the public SDK as of boto3 1.43.35 (MIN_BOTO3_VERSION), so this is an
ordinary client — no bundled model, no data-loader manipulation. If the installed SDK
predates the DI operations we raise a clear upgrade error instead of letting an
`AttributeError` surface deep inside an operation.
"""
global _application_signals_client
if _application_signals_client is not None:
return _application_signals_client
from di_session import build_client
client = build_client("application-signals")
if _MIN_DI_OPERATION not in client.meta.service_model.operation_names:
raise RuntimeError(
"The installed AWS SDK does not expose the Dynamic Instrumentation operations "
f"(missing {_MIN_DI_OPERATION!r} on the application-signals model). Upgrade to "
f"boto3/botocore >= {MIN_BOTO3_VERSION}: pip install --upgrade "
f"'boto3>={MIN_BOTO3_VERSION}'."
)
_application_signals_client = client
return _application_signals_client
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |