Skip to content

Add semantic conventions for Azure subscription ID and resource group#3722

Open
kathiehuang wants to merge 2 commits into
open-telemetry:mainfrom
kathiehuang:add-azure-semantic-conventions
Open

Add semantic conventions for Azure subscription ID and resource group#3722
kathiehuang wants to merge 2 commits into
open-telemetry:mainfrom
kathiehuang:add-azure-semantic-conventions

Conversation

@kathiehuang
Copy link
Copy Markdown

@kathiehuang kathiehuang commented May 14, 2026

Fixes #3697
Fixes #3708

Changes

Adds two Azure resource conventions that are already used in practice by the OpenTelemetry collector-contrib azurevm resource detector but were not formally defined:

  • azure.resourcegroup.name (new attribute): The name of the Azure resource group the resource belongs to.

  • cloud.account.id (updated note + example): Documents that for Azure, this attribute maps to the subscription ID, and adds a UUID-format example.

Naming note: azure.resourcegroup.name uses a single-token resourcegroup rather than the semconv underscore form azure.resource_group.name. This intentionally matches the name already emitted by the azurevm detector in collector-contrib. The semconv form would be azure.resource_group.name.

Important

Pull requests acceptance are subject to the triage process as described in Issue and PR Triage Management.
PRs that do not follow the guidance above, may be automatically rejected and closed.

Merge requirement checklist

@github-actions
Copy link
Copy Markdown

This PR contains changes to area(s) that do not have an active SIG/project and will be auto-closed:

  • azure
  • cloud

Such changes may be rejected or put on hold until a new SIG/project is established.

Please refer to the Semantic Convention Areas
document to see the current active SIGs and also to learn how to kick start a new one.

@github-actions github-actions Bot closed this May 14, 2026
@kathiehuang
Copy link
Copy Markdown
Author

@lmolkova @MikeGoldsmith @thompson-tomo @trask

Hi all - I saw you had contributed to the Azure semantic conventions in the past. This PR formalizes two Azure attributes that are already emitted in practice by the azurevm resource detector in opentelemetry-collector-contrib but have no official spec definition:

I was wondering if it would be possible to reopen this PR and get a review. Thank you!

@MikeGoldsmith
Copy link
Copy Markdown
Member

Hi @kathiehuang — sorry for the slow reply.

I think what you've proposed looks good from a technical view.

One thing worth noting is the attribute key azure.resourcegroup.name uses a single-token "resourcegroup", whereas the semconv convention for multi-word segments is underscore (e.g. cloud.availability_zone, cloud.resource_id, aws.lambda.invoked_arn). The "by-convention" form would be azure.resource_group.name. Picking the current form matches the existing collector-contrib usage - picking the conventional form would force a rename for consumers. I think it's worth calling out the choice explicitly in the PR description so reviewers can see you've considered it.

The actual blocker isn't technical — the auto-close was triggered by the lack of an active SIG for the azure and cloud areas, per the bot message. I have reopen access, so I can reopen this PR and help move it forward. Apologies again for the delayed response.

@MikeGoldsmith MikeGoldsmith reopened this May 27, 2026
Copy link
Copy Markdown
Member

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I've noted a few things but the only thing to do is combine the two changelog entries.

Comment thread .chloggen/add-azure-semantic-conventions.yaml Outdated
| <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>` |

**[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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these notes are good to help indicate what to expect per cloud provider.

Comment thread docs/registry/attributes/azure.md
@github-actions github-actions Bot added enhancement New feature or request area:azure labels May 27, 2026
@kathiehuang kathiehuang force-pushed the add-azure-semantic-conventions branch from aea121a to 27d3b84 Compare May 27, 2026 17:52
@github-actions
Copy link
Copy Markdown

This PR contains changes to area(s) that do not have an active SIG/project and will be auto-closed:

  • azure
  • cloud

Such changes may be rejected or put on hold until a new SIG/project is established.

Please refer to the Semantic Convention Areas
document to see the current active SIGs and also to learn how to kick start a new one.

@github-actions github-actions Bot closed this May 27, 2026
@trask trask reopened this May 28, 2026
@MikeGoldsmith MikeGoldsmith marked this pull request as ready for review May 28, 2026 08:31
@MikeGoldsmith MikeGoldsmith requested review from a team as code owners May 28, 2026 08:31
@MikeGoldsmith
Copy link
Copy Markdown
Member

Thanks @trask 👍🏻

@MikeGoldsmith MikeGoldsmith self-assigned this May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for subscription id in Azure Add support for resource groups in Azure

3 participants