Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS ECS detector should detect otel CloudRegion/CloudAccountID/CloudAvailabilityZone/CloudResourceID #4874

Closed

Conversation

andrew-rowson-lseg
Copy link

Some applications rely on the otel non-vendored cloud tags being populated in metrics/traces. For ECS workloads, we can populate these from the data that's already returned from the ECS Metadata API, so this can be used to add to the resource's attributes.

…vailabilityZone/CloudResourceID

Some applications rely on the otel non-vendored cloud tags being populated in metrics/traces. For ECS workloads, we can populate these from the data that's already returned from the ECS Metadata API, so this can be used to add to the resource's attributes.
Copy link

linux-foundation-easycla bot commented Jan 29, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: andrew-rowson-lseg / name: Andrew Rowson (6d4ae22)

@MrAlias
Copy link
Contributor

MrAlias commented Jan 29, 2024

This looks like a duplicate of #4860

@MrAlias MrAlias added the duplicate This issue or pull request already exists label Jan 29, 2024
@andrew-rowson-lseg
Copy link
Author

This looks like a duplicate of #4860

Ah, that PR didn't exist when I originally forked. If it does the same thing, then we should obviously do that one instead.

@mmanciop
Copy link
Contributor

mmanciop commented Jan 30, 2024

In #4860 I did not implement cloud.resource.id though. It's unclear to me whether it should be the Task ARN or the Container ARN. I know for a fact that there is no ECS detector out there for OTEL that has implemented cloud.resource_id, as I have been recently running around adding the other cloud.* tags. I am leaning towards the Task ARN for these reasons (now also represented by this issue). Does anybody have a firm opinion on the matter?

@andrew-rowson-lseg
Copy link
Author

In #4860 I did not implement cloud.resource.id though. It's unclear to me whether it should be the Task ARN or the Container ARN. I know for a fact that there is no ECS detector out there for OTEL that has implemented cloud.resource_id, as I have been recently running around adding the other cloud.* tags. I am leaning towards the Task ARN for these reasons. Does anybody have a firm opinion on the matter?

My pitch is that it should be the containerId, because a task can contain multiple containers which may all be looking to publish otel data. ResourceId feels like it should represent the most granular ID of the metrics/trace/logs reporter. Not firmly wedded to this though!

(I'm unable to open slack in my current context, so apologies, can't see that URL).

@mmanciop
Copy link
Contributor

mmanciop commented Jan 31, 2024

In #4860 I did not implement cloud.resource.id though. It's unclear to me whether it should be the Task ARN or the Container ARN. I know for a fact that there is no ECS detector out there for OTEL that has implemented cloud.resource_id, as I have been recently running around adding the other cloud.* tags. I am leaning towards the Task ARN for these reasons. Does anybody have a firm opinion on the matter?

My pitch is that it should be the containerId, because a task can contain multiple containers which may all be looking to publish otel data. ResourceId feels like it should represent the most granular ID of the metrics/trace/logs reporter. Not firmly wedded to this though!

(I'm unable to open slack in my current context, so apologies, can't see that URL).

The #opentelemetry channel in the CNCF Slack was indeed not the best place to have this discussion.

I opened this issue on the open-telemetry/semantic-conventions to track the discussion. @andrew-rowson-lseg make your voice heard over there :-)

And by containerId, you mean ContainerARN, right?

For reference, using the metadata v4 examples by AWS:

Docker Id (Container Id): "ea32192c8553fbff06c9340478a2ff089b2bb5646fb718b4ee206641c9086d66"
Container ARN: "arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9"
Task ARN: "arn:aws:ecs:us-west-2:111122223333:task/default/8f03e41243824aea923aca126495f665"

@mmanciop
Copy link
Contributor

@andrew-rowson-lseg I am opening a PR for cloud.resource_id in a few mins, care to close this one?

@MrAlias
Copy link
Contributor

MrAlias commented Feb 14, 2024

Closing in favor of #5091

@MrAlias MrAlias closed this Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants