Amazon ECS
Container metrics
Run the agent as a sidecar (or in a DaemonSet-style service) in the task. Its ecs receiver reads the task metadata endpoint v4 (ECS_CONTAINER_METADATA_URI_V4, set by ECS) and reports per container CPU, memory and network with aws.ecs.* resource attributes:
aws.ecs.cluster.arnaws.ecs.task.arn,aws.ecs.task.family,aws.ecs.task.revisioncontainer.id,container.name
modules:
ecs:
enabled: trueThe task metadata endpoint does not expose the service name. To see services in the entity explorer, set aws.ecs.service.name (and optionally aws.ecs.service.arn) through OTEL_RESOURCE_ATTRIBUTES on the task definition.
Entities
The worker derives three entity kinds from those resource attributes, each nested under its owner (see GET /v1/projects/{prj}/infra/entities?kind=ecs.task and the entity health routes):
Kind | Keyed by | Parent |
|---|---|---|
|
| — |
|
| its cluster |
|
| its service (else its cluster) |
aws.ecs.task.revision is an identity attribute, so a new deployment is recorded in the task's entity_history. A task with no service (for example a standalone RunTask) hangs directly under its cluster. The container of the task remains a container entity as on any host.
Serverless (Fargate)
Fargate tasks that run the OTel Lambda-style faas.* instrumentation also appear in the serverless explorer (serverless.md); otherwise use the ECS entities and the container metrics above.