Skip to content

Conversation

@yiyuan-he
Copy link
Contributor

What does this pull request do?

Adds functionality for ECS resource detection to AWS resource detector gem. It is similar to the implementation for Python.

Related Issues

#34

@yiyuan-he yiyuan-he changed the title feat: contribute aws ecs resource detector feat: contribute aws ecs resource detector [WIP] Apr 10, 2025
@yiyuan-he yiyuan-he force-pushed the contribute-ecs-resource-detector branch from b07b5d5 to ec5c117 Compare April 10, 2025 21:34
@yiyuan-he yiyuan-he changed the title feat: contribute aws ecs resource detector [WIP] feat: contribute aws ecs resource detector Apr 10, 2025
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

Thank you for this PR! I need more time to get deeper into this and run some E2E tests to complete my review. If you know of any AWS ECS experts who are able to help validate things, we'd love their assistance reviewing as well.

logs_attributes = get_logs_resource(container_metadata)
resource_attributes.merge!(logs_attributes)
rescue StandardError => e
OpenTelemetry.logger.debug("ECS resource detection failed: #{e.message}")
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about using the OpenTelemetry.handle_error API for the rescues in this file rather than a debug-level log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Kayla - the suggestion sounds good to me. I'll update the error handling to use this API instead.

I don't know of any AWS ECS experts in the upstream community. However, I can reach out to an ECS expert from my team and have them help take a look.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds great, thank you!

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

Thanks, @yiyuan-he!

@kaylareopelle kaylareopelle merged commit 337f543 into open-telemetry:main Apr 25, 2025
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants