open-telemetry / open-telemetry/opentelemetry-java-contrib

Resource attribute cloud.platform is being wrongly set for ECS on EC2

Open
#1,547 4 comments 1 reaction 2 assignees View on GitHub

@srprash is already working on this.

Since Aug 4, 2025.

bug component:aws-resources
Dominant language
Java
Stars
269
Forks
196
Avg merge
2d 7h
Merged PRs (30d)
38

Description

Component(s)

aws-resources

What happened?

Description

When deploying an application using ECS on EC2, the resource attribute cloud.platform is being set as aws_ec2 instead of aws_ecs

Steps to Reproduce

  1. Instrument the application using the OTel Java Agent 2.9.0
  2. Deploy to AWS ECS using EC2

Deploy an application in AWS ECS using EC2. Also

Expected Result

The resource attribute should have

  1. The cloud.platform set as aws_ecs
  2. Have all of the Amazon ECS Attributes set as well

Actual Result

  1. The cloud.platform set as aws_ec2
  2. None of the Amazon ECS Attributes are set
Component version

2.9.0

Log output

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.