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

[processor/resourcedetection]: Populate "aws.ecs.task.id" property for ECS Tasks (#8274) #29602

Merged
merged 4 commits into from
Dec 12, 2023
Merged

[processor/resourcedetection]: Populate "aws.ecs.task.id" property for ECS Tasks (#8274) #29602

merged 4 commits into from
Dec 12, 2023

Conversation

mkielar
Copy link
Contributor

@mkielar mkielar commented Dec 1, 2023

Description:
The resourcedetection processor now populates aws.ecs.task.id property (in addition to other aws.ecs.task.*
properties). This simplifies configuration of awsemfexporter, which internally searches for aws.ecs.task.id
property when using TaskId placeholder in loggroup / logstream name template.

Link to tracking Issue: #8274

Testing: ECS Task ARNs come in two versions. In the old one, the last part of the ARN contains only the task/<task-id>. In the new one, it contains task/cluster-name/task-id. Implementation and Unit Tests have been added to handle both cases.

Documentation: README.md now also mentions aws.ecs.task.id as inferred property for ECS.

@mkielar mkielar requested a review from a team December 1, 2023 10:31
Copy link

linux-foundation-easycla bot commented Dec 1, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Dec 1, 2023
@mkielar mkielar changed the title fixes(#8274): Populate property for ECS Tasks [processor/resourcedetection]: Populate property for ECS Tasks (#8274) Dec 1, 2023
@mkielar mkielar changed the title [processor/resourcedetection]: Populate property for ECS Tasks (#8274) [processor/resourcedetection]: Populate "aws.ecs.task.id" property for ECS Tasks (#8274) Dec 1, 2023
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated code is out of date, please run "make generate" and commit the changes in this PR.

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aws.ecs.task.id is not specified in the semantic conventions https://github.com/open-telemetry/semantic-conventions/blob/v1.23.1/docs/resource/cloud-provider/aws/ecs.md. While this is not a hard requirement, it would greatly help in reviewing this PR and ensuring the value on this attributes matches what the awsefmexporter and other present or future components expect. Would you be willing to file a PR on semantic-conventions first?

mkielar added a commit to mkielar/semantic-conventions that referenced this pull request Dec 9, 2023
Added `aws.ecs.task.id`, to reflect changes introduced by [#29062][pr]
Also, fixed description for `aws.ecs.task.arn`, as it does not reflect
TaskDefinition ARN (as was incorrectly stated), but the ARN of the
running ECS Task.

[pr]: open-telemetry/opentelemetry-collector-contrib#29602
mkielar added a commit to mkielar/semantic-conventions that referenced this pull request Dec 9, 2023
Added `aws.ecs.task.id`, to reflect changes introduced by [#29062][pr]
Also, fixed description for `aws.ecs.task.arn`, as it does not reflect
TaskDefinition ARN (as was incorrectly stated), but the ARN of the
running ECS Task.

[pr]: open-telemetry/opentelemetry-collector-contrib#29602
mkielar added a commit to mkielar/semantic-conventions that referenced this pull request Dec 9, 2023
Added `aws.ecs.task.id`, to reflect changes introduced by [#29062][pr]
Also, fixed description for `aws.ecs.task.arn`, as it does not reflect
TaskDefinition ARN (as was incorrectly stated), but the ARN of the
running ECS Task.

[pr]: open-telemetry/opentelemetry-collector-contrib#29602
@mx-psi
Copy link
Member

mx-psi commented Dec 11, 2023

Can you add a changelog note? You can use make chlog-new to generate a new one from the template (edit: you did, right before my comment 😄 )

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would like someone from AWS (@bryan-aguilar ? @Aneurysm9 ?) to take a look at this before we merge

Copy link
Contributor

@bryan-aguilar bryan-aguilar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for filing the semantic conventions PR also.

@mx-psi mx-psi merged commit 22f9b4e into open-telemetry:main Dec 12, 2023
83 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 12, 2023
@mkielar mkielar deleted the resourcedetection-ecs-task-id branch December 15, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/resourcedetection Resource detection processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants