ECS and Fargate — collector sidecar
On Fargate you cannot run a node agent, so the collector goes in the task as a second container. Your app talks to it over localhost and only the collector holds the key.Two things worth copying:
essential: false so a collector crash does not kill the task,
and the key delivered through secrets from Secrets Manager rather than a plain
environment variable readable by anyone with ecs:DescribeTaskDefinition.Lambda — the ADOT layer
EC2 — collector as a systemd service
ecs detector for ec2 and adding
the hostmetrics receiver for CPU, memory, disk and network.
Managed services
Instrumentation only covers services you deploy. For RDS, ELB, SQS and Lambda platform metrics, use the CloudFormation stack on the Infrastructure → AWS page of your dashboard, which sets up a CloudWatch metric stream into the same ingress.Metric streams do not cross regions — an account spanning
us-east-1 and us-east-2
needs the stack deployed in both.