Skip to content

Commit c47bcca

Browse files
committed
add semantic conventions for azure subscription id and resource group
1 parent cbb10b6 commit c47bcca

8 files changed

Lines changed: 79 additions & 28 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
change_type: enhancement
2+
3+
component: cloud
4+
5+
note: Document that `cloud.account.id` maps to the Azure subscription ID.
6+
7+
issues: [3708]
8+
9+
subtext:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
change_type: enhancement
2+
3+
component: azure
4+
5+
note: Add `azure.resourcegroup.name` attribute for the name of the Azure resource group the resource belongs to.
6+
7+
issues: [3697]
8+
9+
subtext:

docs/registry/attributes/azure.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,21 @@
33

44
# Azure
55

6+
- [General Azure Attributes](#general-azure-attributes)
67
- [Azure Client Library Attributes](#azure-client-library-attributes)
78
- [Azure Cosmos DB Attributes](#azure-cosmos-db-attributes)
89
- [Deprecated Azure Attributes](#deprecated-azure-attributes)
910

11+
## General Azure Attributes
12+
13+
This section defines generic attributes for Azure services.
14+
15+
**Attributes:**
16+
17+
| Key | Stability | Value Type | Description | Example Values |
18+
| --- | --- | --- | --- | --- |
19+
| <a id="azure-resourcegroup-name" href="#azure-resourcegroup-name">`azure.resourcegroup.name`</a> | ![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` |
20+
1021
## Azure Client Library Attributes
1122

1223
This section defines generic attributes used by Azure Client Libraries.

docs/registry/attributes/cloud.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,22 @@ A cloud environment (e.g. GCP, Azure, AWS).
1111

1212
| Key | Stability | Value Type | Description | Example Values |
1313
| --- | --- | --- | --- | --- |
14-
| <a id="cloud-account-id" href="#cloud-account-id">`cloud.account.id`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The cloud account ID the resource is assigned to. | `111111111111`; `opentelemetry` |
15-
| <a id="cloud-availability-zone" href="#cloud-availability-zone">`cloud.availability_zone`</a> | ![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` |
16-
| <a id="cloud-platform" href="#cloud-platform">`cloud.platform`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The cloud platform in use. [2] | `akamai_cloud.compute`; `alibaba_cloud_ecs`; `alibaba_cloud_fc` |
14+
| <a id="cloud-account-id" href="#cloud-account-id">`cloud.account.id`</a> | ![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` |
15+
| <a id="cloud-availability-zone" href="#cloud-availability-zone">`cloud.availability_zone`</a> | ![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` |
16+
| <a id="cloud-platform" href="#cloud-platform">`cloud.platform`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The cloud platform in use. [3] | `akamai_cloud.compute`; `alibaba_cloud_ecs`; `alibaba_cloud_fc` |
1717
| <a id="cloud-provider" href="#cloud-provider">`cloud.provider`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Name of the cloud provider. | `akamai_cloud`; `alibaba_cloud`; `aws` |
18-
| <a id="cloud-region" href="#cloud-region">`cloud.region`</a> | ![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` |
19-
| <a id="cloud-resource-id" href="#cloud-resource-id">`cloud.resource_id`</a> | ![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/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>` |
18+
| <a id="cloud-region" href="#cloud-region">`cloud.region`</a> | ![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` |
19+
| <a id="cloud-resource-id" href="#cloud-resource-id">`cloud.resource_id`</a> | ![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/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>` |
2020

21-
**[1] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
21+
**[1] `cloud.account.id`:** For Azure, this is the subscription ID.
2222

23-
**[2] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`.
23+
**[2] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
2424

25-
**[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).
25+
**[3] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`.
2626

27-
**[4] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup,
27+
**[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).
28+
29+
**[5] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup,
2830
so it may be necessary to set `cloud.resource_id` as a span attribute instead.
2931

3032
The exact value to use for `cloud.resource_id` depends on the cloud provider.

docs/registry/entities/cloud.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@
1919

2020
| Role | Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
2121
| --- | --- | --- | --- | --- | --- | --- |
22-
| 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` |
23-
| 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` |
24-
| 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` |
22+
| 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` |
23+
| 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` |
24+
| 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` |
2525
| 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` |
26-
| 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` |
27-
| 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/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>` |
26+
| 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` |
27+
| 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/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>` |
2828

29-
**[1] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
29+
**[1] `cloud.account.id`:** For Azure, this is the subscription ID.
3030

31-
**[2] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`.
31+
**[2] `cloud.availability_zone`:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
3232

33-
**[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).
33+
**[3] `cloud.platform`:** The prefix of the service SHOULD match the one specified in `cloud.provider`.
3434

35-
**[4] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup,
35+
**[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).
36+
37+
**[5] `cloud.resource_id`:** On some cloud providers, it may not be possible to determine the full ID at startup,
3638
so it may be necessary to set `cloud.resource_id` as a span attribute instead.
3739

3840
The exact value to use for `cloud.resource_id` depends on the cloud provider.

0 commit comments

Comments
 (0)