AWS Distro for OpenTelemetry

Create ECS Task Definition for Fargate with ADOT Collector

Create ECS Task Definition for Fargate with ADOT Collector

In this tutorial, we will demonstrate how to create an ECS Task Definition for Fargate with ADOT Collector.




Setup for ECS Fargate

  1. Download the ECS Fargate task definition template from Github.
  2. Fill the following parameters in the task definition templates:
    • {{region}} - the region the data will be sent to
    • {{ecsTaskRoleArn}} - AWSOTTaskRole ARN created in the previous section
    • {{ecsExecutionRoleArn}} - AWSOTTaskExcutionRole ARN created in the previous section
    • command - Assign value to the command variable to select the config file path; the AWS Collector comes with two configs baked in for ECS customers(choose one of them based on your purpose): --config=/etc/ecs/ecs-default-config.yaml - To consume StatsD metrics, OTLP metrics/traces and X-Ray SDK traces (custom application metrics/traces) --config=/etc/ecs/container-insights/otel-task-metrics-config.yaml - To Use StatsD, OTLP, Xray and Container Resource utilization metrics
  3. Follow the ECS Fargate setup instructions to create a task definition using the given template.