Update cloud metadata query to use host.id#17981
Merged
jmmcorreia merged 2 commits intoelastic:mainfrom Apr 14, 2026
Merged
Conversation
rogercoll
approved these changes
Apr 1, 2026
💚 Build Succeeded
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
-Fixes #15013
The cloud metadata dashboard was design to to use the attribute
cloud.instance.id. In the kube-stack samples, this attribute was being manually added by using thehost.idvalue.However, when reading the content package doc or using any other of the otlp samples in the repo, this value was not being added using a processor, causing the dashboard to fail due to a missing value.
Since all cloud provider detectors in the resourcedetectionprocessor emit the
host.idvalue that is part of the semantic conventions, the proposal here is to rely on that value to simplify the configuration and ensure compatibility in most scenarios.Checklist
changelog.ymlfile.How to test this PR locally
To validate the PR, the AWS EC2 metadata mock was used: https://github.com/aws/amazon-ec2-metadata-mock
Docker command :
docker run -it --rm -p 1338:1338 public.ecr.aws/aws-ec2/amazon-ec2-metadata-mock:v1.13.0Then, otel collector was run with the following config:
The following env variable was also set:
export AWS_EC2_METADATA_SERVICE_ENDPOINT=http://127.0.0.1:1338Related issues