-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Azure metadata "compute-name" is lost when resource-detector host.name
attribute is overwritten by other detectors
#12779
Comments
hotst.name
attribute is overwritten by other detectorshost.name
attribute is overwritten by other detectors
@mx-psi can you take a look as the owner of |
Also note that Azure Compute Name is not always the same as the VM Hostname. Here is an example where hostname is changed after VM is created, notice that they are different.
Although OTEL resources are well defined w/ semantic conventions and one can argue that we don't need to introduce other attributes to persist the Azure metadata, but this example here shows that name for a compute is not always the same as hostname.. based on this, instead of my initial suggestion of |
IMO the problem here is that the semantics of @dloucasfx could you open an issue/PR over at https://github.com/open-telemetry/opentelemetry-specification to discuss adding |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Describe the bug
The "Azure resource detector" stores the compute name in the
host.name
attribute Ref..The
host.name
attribute is not unique to the "Azure resource detector" and can be overwritten by other detectors, for valid reasons; for instance, customer wants the FQDN representation forhost.name
(see repro steps below) whereas Azure detector is setting thehost.name
to the compute name (which is different).This is all well and good until your code wants to use the original value set by Azure detector, at this point, the compute name fetched from Azure metadata is lost.
In our case, our code expects and uses the compute name to build the Azure Unique ID dimension, so it uses the
host.name
attribute Ref.. , but because user has configured their resourcedetection processor to gethost.name
in FQDN format , we end up with the wrong Azure Unique IDSteps to reproduce
Use the following resourcedetection processor in your pipeline in order to get
host.name
in the FQDN formatWhat did you expect to see?
host.name
is getting set correctly to FQDNtest-az-es.az.splunk.com
and expect that
azure_resource_id azure_resource_id
is equal to (not the compute name at the end of the string)What did you see instead?
azure_resource_id azure_resource_id
is set toWhat version did you use?
Version: latest
What config did you use?
Suggested Solution and other thoughts
Introduce cloud specific attributes for example
cloud.host.name
andcloud.host.id
(if we want to only fix azure, then we can introduceazure.host.name
azure.host.id
) to persist the data parsed from the cloud metadata and maintain the flexibility for user to overwritehost.name
with FQDN if they wish.Also note that this applies to other cloud providers, example AWS, GCP, but at the moment, this edge case won't impact them as I am not aware of any code using the
host.name
like Azure is doingThe text was updated successfully, but these errors were encountered: