diff --git a/.chloggen/add-azure-semantic-conventions.yaml b/.chloggen/add-azure-semantic-conventions.yaml new file mode 100644 index 0000000000..2f250d0dbc --- /dev/null +++ b/.chloggen/add-azure-semantic-conventions.yaml @@ -0,0 +1,7 @@ +change_type: enhancement + +component: azure + +note: Add `azure.resourcegroup.name` attribute for the name of the Azure resource group the resource belongs to and document that `cloud.account.id` maps to the Azure subscription ID. + +issues: [3697, 3708] diff --git a/docs/registry/attributes/azure.md b/docs/registry/attributes/azure.md index 36011b484e..8701058f27 100644 --- a/docs/registry/attributes/azure.md +++ b/docs/registry/attributes/azure.md @@ -3,10 +3,21 @@ # Azure +- [General Azure Attributes](#general-azure-attributes) - [Azure Client Library Attributes](#azure-client-library-attributes) - [Azure Cosmos DB Attributes](#azure-cosmos-db-attributes) - [Deprecated Azure Attributes](#deprecated-azure-attributes) +## General Azure Attributes + +This section defines generic attributes for Azure services. + +**Attributes:** + +| Key | Stability | Value Type | Description | Example Values | +| --- | --- | --- | --- | --- | +| `azure.resourcegroup.name` | ![Development](https://img.shields.io/badge/-development-blue) | string | The name of the Azure [resource group](https://learn.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal) the resource belongs to. | `my-resource-group`; `rg-myapp-prod` | + ## Azure Client Library Attributes This section defines generic attributes used by Azure Client Libraries. diff --git a/docs/registry/attributes/cloud.md b/docs/registry/attributes/cloud.md index 68a72c17cf..559dfd8269 100644 --- a/docs/registry/attributes/cloud.md +++ b/docs/registry/attributes/cloud.md @@ -11,20 +11,22 @@ A cloud environment (e.g. GCP, Azure, AWS). | Key | Stability | Value Type | Description | Example Values | | --- | --- | --- | --- | --- | -| `cloud.account.id` | ![Development](https://img.shields.io/badge/-development-blue) | string | The cloud account ID the resource is assigned to. | `111111111111`; `opentelemetry` | -| `cloud.availability_zone` | ![Development](https://img.shields.io/badge/-development-blue) | string | Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. [1] | `us-east-1c` | -| `cloud.platform` | ![Development](https://img.shields.io/badge/-development-blue) | string | The cloud platform in use. [2] | `akamai_cloud.compute`; `alibaba_cloud_ecs`; `alibaba_cloud_fc` | +| `cloud.account.id` | ![Development](https://img.shields.io/badge/-development-blue) | string | The cloud account ID the resource is assigned to. [1] | `111111111111`; `opentelemetry`; `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | +| `cloud.availability_zone` | ![Development](https://img.shields.io/badge/-development-blue) | string | Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. [2] | `us-east-1c` | +| `cloud.platform` | ![Development](https://img.shields.io/badge/-development-blue) | string | The cloud platform in use. [3] | `akamai_cloud.compute`; `alibaba_cloud_ecs`; `alibaba_cloud_fc` | | `cloud.provider` | ![Development](https://img.shields.io/badge/-development-blue) | string | Name of the cloud provider. | `akamai_cloud`; `alibaba_cloud`; `aws` | -| `cloud.region` | ![Development](https://img.shields.io/badge/-development-blue) | string | The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. [3] | `us-central1`; `us-east-1` | -| `cloud.resource_id` | ![Development](https://img.shields.io/badge/-development-blue) | string | Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP) [4] | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/` | +| `cloud.region` | ![Development](https://img.shields.io/badge/-development-blue) | string | The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. [4] | `us-central1`; `us-east-1` | +| `cloud.resource_id` | ![Development](https://img.shields.io/badge/-development-blue) | string | Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP) [5] | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/` | -**[1] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud. +**[1] `cloud.account.id`:** For Azure, this is the subscription ID. -**[2] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`. +**[2] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud. -**[3] `cloud.region`:** Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). +**[3] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`. -**[4] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup, +**[4] `cloud.region`:** Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). + +**[5] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup, so it may be necessary to set `cloud.resource_id` as a span attribute instead. The exact value to use for `cloud.resource_id` depends on the cloud provider. diff --git a/docs/registry/entities/cloud.md b/docs/registry/entities/cloud.md index 829174fd60..f69e393f0f 100644 --- a/docs/registry/entities/cloud.md +++ b/docs/registry/entities/cloud.md @@ -19,20 +19,22 @@ | Role | Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values | | --- | --- | --- | --- | --- | --- | --- | -| Other | [`cloud.account.id`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The cloud account ID the resource is assigned to. | `111111111111`; `opentelemetry` | -| Other | [`cloud.availability_zone`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. [1] | `us-east-1c` | -| Other | [`cloud.platform`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The cloud platform in use. [2] | `akamai_cloud.compute`; `alibaba_cloud_ecs`; `alibaba_cloud_fc` | +| Other | [`cloud.account.id`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The cloud account ID the resource is assigned to. [1] | `111111111111`; `opentelemetry`; `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | +| Other | [`cloud.availability_zone`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. [2] | `us-east-1c` | +| Other | [`cloud.platform`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The cloud platform in use. [3] | `akamai_cloud.compute`; `alibaba_cloud_ecs`; `alibaba_cloud_fc` | | Other | [`cloud.provider`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Name of the cloud provider. | `akamai_cloud`; `alibaba_cloud`; `aws` | -| Other | [`cloud.region`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. [3] | `us-central1`; `us-east-1` | -| Other | [`cloud.resource_id`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP) [4] | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/` | +| Other | [`cloud.region`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. [4] | `us-central1`; `us-east-1` | +| Other | [`cloud.resource_id`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP) [5] | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/` | -**[1] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud. +**[1] `cloud.account.id`:** For Azure, this is the subscription ID. -**[2] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`. +**[2] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud. -**[3] `cloud.region`:** Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). +**[3] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`. -**[4] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup, +**[4] `cloud.region`:** Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). + +**[5] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup, so it may be necessary to set `cloud.resource_id` as a span attribute instead. The exact value to use for `cloud.resource_id` depends on the cloud provider. diff --git a/docs/resource/cloud.md b/docs/resource/cloud.md index 532d4dd5e4..2471b94dc2 100644 --- a/docs/resource/cloud.md +++ b/docs/resource/cloud.md @@ -19,20 +19,22 @@ | Role | Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values | | --- | --- | --- | --- | --- | --- | --- | -| Other | [`cloud.account.id`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The cloud account ID the resource is assigned to. | `111111111111`; `opentelemetry` | -| Other | [`cloud.availability_zone`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. [1] | `us-east-1c` | -| Other | [`cloud.platform`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The cloud platform in use. [2] | `akamai_cloud.compute`; `alibaba_cloud_ecs`; `alibaba_cloud_fc` | +| Other | [`cloud.account.id`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The cloud account ID the resource is assigned to. [1] | `111111111111`; `opentelemetry`; `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | +| Other | [`cloud.availability_zone`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. [2] | `us-east-1c` | +| Other | [`cloud.platform`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The cloud platform in use. [3] | `akamai_cloud.compute`; `alibaba_cloud_ecs`; `alibaba_cloud_fc` | | Other | [`cloud.provider`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Name of the cloud provider. | `akamai_cloud`; `alibaba_cloud`; `aws` | -| Other | [`cloud.region`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. [3] | `us-central1`; `us-east-1` | -| Other | [`cloud.resource_id`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP) [4] | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/` | +| Other | [`cloud.region`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. [4] | `us-central1`; `us-east-1` | +| Other | [`cloud.resource_id`](/docs/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP) [5] | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/` | -**[1] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud. +**[1] `cloud.account.id`:** For Azure, this is the subscription ID. -**[2] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`. +**[2] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud. -**[3] `cloud.region`:** Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). +**[3] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`. -**[4] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup, +**[4] `cloud.region`:** Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). + +**[5] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup, so it may be necessary to set `cloud.resource_id` as a span attribute instead. The exact value to use for `cloud.resource_id` depends on the cloud provider. diff --git a/model/azure/registry.yaml b/model/azure/registry.yaml index b3d9d15485..3605392a2a 100644 --- a/model/azure/registry.yaml +++ b/model/azure/registry.yaml @@ -1,4 +1,18 @@ groups: + - id: registry.azure + type: attribute_group + display_name: General Azure Attributes + brief: > + This section defines generic attributes for Azure services. + attributes: + - id: azure.resourcegroup.name + type: string + stability: development + brief: > + The name of the Azure + [resource group](https://learn.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal) + the resource belongs to. + examples: ["my-resource-group", "rg-myapp-prod"] - id: registry.azure.client.sdk type: attribute_group display_name: Azure Client Library Attributes diff --git a/model/cloud/registry.yaml b/model/cloud/registry.yaml index 1c1eaba941..1f9a53d218 100644 --- a/model/cloud/registry.yaml +++ b/model/cloud/registry.yaml @@ -60,7 +60,9 @@ groups: stability: development brief: > The cloud account ID the resource is assigned to. - examples: ['111111111111', 'opentelemetry'] + note: > + For Azure, this is the subscription ID. + examples: ['111111111111', 'opentelemetry', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'] - id: cloud.region type: string stability: development