[Resources.AWS] Add host.image.id for EC2 - #5110
Conversation
Add `host.image.id` to the AWS EC2 resource detector. Contributes to open-telemetry#1516.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5110 +/- ##
==========================================
- Coverage 77.97% 77.90% -0.08%
==========================================
Files 477 477
Lines 20395 20396 +1
==========================================
- Hits 15904 15890 -14
- Misses 4491 4506 +15 Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds the recommended host.image.id resource attribute to the AWS EC2 detector using the AMI ID from the instance identity document.
Changes:
- Deserializes and emits the EC2
imageId. - Updates semantic conventions, tests, documentation, and changelog.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
test/OpenTelemetry.Resources.AWS.Tests/SampleAWSEC2IdentityDocumentModel.cs |
Adds sample image ID data. |
test/OpenTelemetry.Resources.AWS.Tests/AWSEC2DetectorTests.cs |
Verifies deserialization and emitted attribute. |
src/Shared/AWS/AWSSemanticConventions.Legacy.cs |
Defines the legacy attribute key. |
src/Shared/AWS/AWSSemanticConventions.cs |
Adds the attribute builder method. |
src/Shared/AWS/AWSSemanticConventions.Base.cs |
Adds the base semantic-convention property. |
src/OpenTelemetry.Resources.AWS/README.md |
Documents the new EC2 metadata. |
src/OpenTelemetry.Resources.AWS/Models/AWSEC2IdentityDocumentModel.cs |
Maps the EC2 imageId field. |
src/OpenTelemetry.Resources.AWS/CHANGELOG.md |
Records the behavioral change. |
src/OpenTelemetry.Resources.AWS/AWSEC2Detector.cs |
Emits host.image.id. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pull request dashboard statusWaiting on maintainers · refreshed 2026-09-01 07:14 UTC Merge when ready. Status above doesn't look right?
|
|
LGTM, but I would wait for some review from AWS component owners. |
Contributes to #1516
Changes
Add the recommended
host.image.idattribute to the AWS EC2 resource detector.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)