opentelemetry-java-contrib icon indicating copy to clipboard operation
opentelemetry-java-contrib copied to clipboard

Azure resource providers

Open zeitlinger opened this issue 1 year ago • 2 comments

Fixes #1214

Testing:

Has not been tested in a real setup yet - but all implementations are based on the existing resource providers in other languages.

Documentation:

done

Outstanding items

Owner

Need component owners. I can be one of them.

Host image attributes

VM seems to support host.image related attributes

  • host.image.id =
  • host.image.name =
  • host.image.version = <exactVersion>

(from https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service?tabs=linux)

            "imageReference": {
                "id": "",
                "offer": "UbuntuServer",
                "publisher": "Canonical",
                "sku": "16.04.0-LTS",
                "version": "latest",
                "communityGalleryImageId": "/CommunityGalleries/testgallery/Images/1804Gen2/Versions/latest",
                "sharedGalleryImageId": "/SharedGalleries/1P/Images/gen2/Versions/latest",
                "exactVersion": "1.1686127202.30113"
            },

does that make sense?

Stop VM detector fast

Right now, the VM detector has a timeout of 1s - which means that it will block the startup process by 1s if we're not running in an Azure VM. How can we avoid that?

INFO: AzureVmResourceProvider.createResource took 1388 ms

An idea is to look for the /etc/resolv.conf file on linux - and some special registry key on windows.

Is that really the best option?

zeitlinger avatar Mar 14 '24 14:03 zeitlinger

@trask here's my first attempt - can you help with testing?

zeitlinger avatar Mar 14 '24 14:03 zeitlinger

@trask can you check?

zeitlinger avatar Aug 12 '24 09:08 zeitlinger

@breedx-splk please check again

zeitlinger avatar Dec 12 '24 12:12 zeitlinger

@breedx-splk please check again

Still looking good to me....though it would have been nice not to have a bunch of extra new additional code to review after an approval. 😅

breedx-splk avatar Dec 13 '24 00:12 breedx-splk

@breedx-splk please check again

Still looking good to me....though it would have been nice not to have a bunch of extra new additional code to review after an approval. 😅

sorry - the PR was created before the new semconv policy - didn't spot that before

zeitlinger avatar Dec 13 '24 08:12 zeitlinger

@breedx-splk should work now

zeitlinger avatar Dec 13 '24 09:12 zeitlinger

@breedx-splk leftover from last year - can you check? :smile:

zeitlinger avatar Jan 13 '25 10:01 zeitlinger