AWS Fargate
Required AWS Fargate Attributes
The following cost calculation tags are required for traces originating from AWS Fargate tasks.
Always Required Fields
These fields are always required for AWS Fargate cost calculation:
| Attribute Name | Example Value | Allowed Values |
|---|---|---|
cloud.platform | aws_ecs | aws_ecs |
aws.ecs.launchtype | fargate | fargate |
aws.ecs.task.arn | arn:aws:ecs:us-east-1:123456789:task/cluster/taskid | Valid ECS task ARN |
aws.ecs.task.cpu | 1024 | CPU units (1024 = 1 vCPU) |
aws.ecs.task.memory | 2048 | Memory in MiB |
Optional Fields
These fields are extracted if present but are not required for cost calculation:
| Attribute Name | Example Value | Allowed Values | Default |
|---|---|---|---|
os.type | linux | linux, windows | linux |
aws.ecs.task.cpu_architecture | X86_64 | X86_64, ARM64 | X86_64 |
aws.ecs.task.capacity_provider | FARGATE | FARGATE, FARGATE_SPOT | FARGATE |
Cost Calculation
Fargate charges separately for vCPU and memory. Beakpoint calculates cost based on span duration:
cost = (cpu_units / 1024) × vCPU_hourly_rate × duration_hours
+ (memory_MiB / 1024) × memory_hourly_rate × duration_hours
The region is extracted from the task ARN. When multiple spans overlap on the same task (identified by aws.ecs.task.arn), costs are proportionally shared using a time-sharing algorithm. Spans on different tasks are priced independently.
Example Configuration
Set these as OpenTelemetry resource attributes in your application:
OTEL_RESOURCE_ATTRIBUTES: "cloud.platform=aws_ecs,aws.ecs.launchtype=fargate,aws.ecs.task.arn=arn:aws:ecs:us-east-1:123456789:task/my-cluster/abc123,aws.ecs.task.cpu=1024,aws.ecs.task.memory=2048,os.type=linux,aws.ecs.task.cpu_architecture=X86_64,aws.ecs.task.capacity_provider=FARGATE"