Skip to main content

AWS Fargate

Required AWS Fargate Attributes​

To calculate costs for AWS Fargate tasks, provide these tags as OpenTelemetry resource attributes.

Always Required Fields​

These fields must be present for cost calculation:

Attribute NameExample ValueAllowed Values
cloud.platformaws_ecsaws_ecs
aws.ecs.launchtypefargatefargate
aws.ecs.task.arnarn:aws:ecs:us-east-1:123456789:task/cluster/taskidValid ECS task ARN
aws.ecs.task.cpu1024CPU units (1024 = 1 vCPU)
aws.ecs.task.memory2048Memory in MiB

Optional Fields​

Include these to refine cost calculations; they're not required:

Attribute NameExample ValueAllowed ValuesDefault
os.typelinuxlinux, windowslinux
aws.ecs.task.cpu_architectureX86_64X86_64, ARM64X86_64
aws.ecs.task.capacity_providerFARGATEFARGATE, FARGATE_SPOTFARGATE

Required for CUR Cost Finalization​

Costs calculated from the tags above are provisional — estimated from list prices. To convert provisional costs to actual billed costs, connect your AWS Cost and Usage Report (CUR). Beakpoint matches spans to CUR line items using this additional tag:

Attribute NameExample ValueAllowed Values
cloud.resource_idarn:aws:ecs:us-east-1:123456789012:task/my-cluster/abc123The full ECS task ARN
Must be a resource attribute

Set cloud.resource_id as an OpenTelemetry resource attribute, not a span-level attribute. Span-level values will not match CUR data and costs will remain provisional. AWS X-Ray traces have automatic promotion, but don't rely on it.

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 execute concurrently on the same task, Beakpoint allocates the task cost proportionally based on each span's duration. Each task's cost is computed 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"