CloudWatch alarm stays `INSUFFICIENT_DATA` for an Auto Scaling group's instances
IntermediateTroubleshootingTracing, OpenTelemetry and CloudWatch
Answer
Likely causes → The alarm's dimensions don't match published ones (e.g. alarm on InstanceId + AutoScalingGroupName but agent publishes only InstanceId), or append_dimensions / aggregation_dimensions weren't configured.
Diagnose →
aws cloudwatch list-metrics --namespace CWAgent --metric-name mem_used_percent
Fix → Add "append_dimensions": {"AutoScalingGroupName": "${aws:AutoScalingGroupName}"} and "aggregation_dimensions": [["AutoScalingGroupName"]]; alarm on the ASG dimension.
Prevent → Set TreatMissingData deliberately on every alarm.
More on Tracing, OpenTelemetry and CloudWatch
Traces show only the frontend span; downstream services start new tracesIntermediateTraces break at the API gateway / ingress controllerIntermediateNo traces at all arrive; the app logs `Failed to export spans. The request could not be executed. Full error message: Failed to connect to localhost/127.0.0.1:4317`BeginnerSDK error `Unimplemented` / `404 Not Found` when exporting to the collectorIntermediateOTel collector logs `Exporting failed. Will retry the request after interval. {"kind": "exporter", "data_type": "traces", "name": "otlp", "error": "rpc error: code = Unavailable desc = connection error"}`IntermediateCollector logs `Dropping data because sending_queue is full`Advanced