Skip to content

Conversation

@paulojmdias
Copy link
Member

Description

This PR fixes the value being set for the host.name resource attribute in Azure environments using Virtual Machine Scale Sets (VMSS).

Previously, the compute.name field was being used for both host.name and azure.vm.name. While this value is equal for traditional Azure VMs, for VMSS, it seems more accurate to use the value of compute.osProfile.computerName.

To address this, the processor now retrieves the host.name value from the Instance Metadata Service (IMDS) field compute.osProfile.computerName.

Link to tracking issue

Fixes #43959

Testing

Updated tests accordingly.

… VM Name for setting `host.name` in Azure

Signed-off-by: Paulo Dias <[email protected]>
Signed-off-by: Paulo Dias <[email protected]>
@paulojmdias
Copy link
Member Author

/label waiting-for-code-owners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[processor/resourcedetection/internal/azure] HostName incorrectly set for VMs in Virtual Machine Scale Sets (VMSS)

2 participants