open-telemetry / opentelemetry-java-contrib

https://opentelemetry.io
Apache License 2.0
164 stars 129 forks source link

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

Open robenie-cwt opened 1 week ago

robenie-cwt commented 1 week ago

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

trask commented 1 week ago

cc @wangzlei @srprash