Update functions detector readme (#2533)

This commit is contained in:
Jeremy Voss
2024-05-22 10:45:10 -07:00
committed by GitHub
parent f4f3042f85
commit c28f9b837f

View File

@ -9,6 +9,7 @@ OpenTelemetry Resource detectors for Azure
This library contains OpenTelemetry `Resource Detectors <https://opentelemetry.io/docs/specs/otel/resource/sdk/#detecting-resource-information-from-the-environment>`_ for the following Azure resources:
* `Azure App Service <https://azure.microsoft.com/en-us/products/app-service>`_
* `Azure Virtual Machines <https://azure.microsoft.com/en-us/products/virtual-machines>`_
* `Azure Functions (Experimental) <https://azure.microsoft.com/en-us/products/functions>`_
Installation
------------
@ -60,16 +61,6 @@ The Azure App Service Resource Detector sets the following Resource Attributes:
* ``service.instance.id`` set to the value of the ``WEBSITE_INSTANCE_ID`` environment variable.
* ``azure.app.service.stamp`` set to the value of the ``WEBSITE_HOME_STAMPNAME`` environment variable.
The Azure Functions Resource Detector sets the following Resource Attributes:
* ``service.name`` set to the value of the ``WEBSITE_SITE_NAME`` environment variable.
* ``process.id`` set to the process ID collected from the running process.
* ``cloud.platform`` set to ``azure_functions``.
* ``cloud.provider`` set to ``azure``.
* ``cloud.resource_id`` set using the ``WEBSITE_RESOURCE_GROUP``, ``WEBSITE_OWNER_NAME``, and ``WEBSITE_SITE_NAME`` environment variables.
* ``cloud.region`` set to the value of the ``REGION_NAME`` environment variable.
* ``faas.instance`` set to the value of the ``WEBSITE_INSTANCE_ID`` environment variable.
* ``faas.max_memory`` set to the value of the ``WEBSITE_MEMORY_LIMIT_MB`` environment variable.
The Azure VM Resource Detector sets the following Resource Attributes according to the response from the `Azure Metadata Service <https://learn.microsoft.com/azure/virtual-machines/instance-metadata-service?tabs=windows>`_:
* ``azure.vm.scaleset.name`` set to the value of the ``vmScaleSetName`` field.
* ``azure.vm.sku`` set to the value of the ``sku`` field.
@ -84,6 +75,16 @@ The Azure VM Resource Detector sets the following Resource Attributes according
* ``os.version`` set to the value of the ``version`` field.
* ``service.instance.id`` set to the value of the ``vmId`` field.
The Azure Functions Resource Detector is currently experimental. It sets the following Resource Attributes:
* ``service.name`` set to the value of the ``WEBSITE_SITE_NAME`` environment variable.
* ``process.id`` set to the process ID collected from the running process.
* ``cloud.platform`` set to ``azure_functions``.
* ``cloud.provider`` set to ``azure``.
* ``cloud.resource_id`` set using the ``WEBSITE_RESOURCE_GROUP``, ``WEBSITE_OWNER_NAME``, and ``WEBSITE_SITE_NAME`` environment variables.
* ``cloud.region`` set to the value of the ``REGION_NAME`` environment variable.
* ``faas.instance`` set to the value of the ``WEBSITE_INSTANCE_ID`` environment variable.
* ``faas.max_memory`` set to the value of the ``WEBSITE_MEMORY_LIMIT_MB`` environment variable.
For more information, see the `Semantic Conventions for Cloud Resource Attributes <https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/cloud/>`_.
References