Skip to content

Commit a6bf82f

Browse files
authored
[Resources.Azure] Rename deployment.environment to deployment.environment.name (#3366)
1 parent 5dafb36 commit a6bf82f

File tree

4 files changed

+37
-33
lines changed

4 files changed

+37
-33
lines changed

src/OpenTelemetry.Resources.Azure/AppServiceResourceDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal sealed class AppServiceResourceDetector : IResourceDetector
1313
internal static readonly IReadOnlyDictionary<string, string> AppServiceResourceAttributes = new Dictionary<string, string>
1414
{
1515
{ ResourceSemanticConventions.AttributeCloudRegion, ResourceAttributeConstants.AppServiceRegionNameEnvVar },
16-
{ ResourceSemanticConventions.AttributeDeploymentEnvironment, ResourceAttributeConstants.AppServiceSlotNameEnvVar },
16+
{ ResourceSemanticConventions.AttributeDeploymentEnvironmentName, ResourceAttributeConstants.AppServiceSlotNameEnvVar },
1717
{ ResourceSemanticConventions.AttributeHostId, ResourceAttributeConstants.AppServiceHostNameEnvVar },
1818
{ ResourceSemanticConventions.AttributeServiceInstance, ResourceAttributeConstants.AppServiceInstanceIdEnvVar },
1919
{ ResourceAttributeConstants.AzureAppServiceStamp, ResourceAttributeConstants.AppServiceStampNameEnvVar },

src/OpenTelemetry.Resources.Azure/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
* Renamed `deployment.environment` attribute to `deployment.environment.name`
6+
in Azure App Service Resource Detector.
7+
([#3366](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/3366))
8+
59
## 1.13.0-beta.1
610

711
Released 2025-Oct-22

src/OpenTelemetry.Resources.Azure/README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ using var loggerFactory = LoggerFactory.Create(builder =>
4848
});
4949
```
5050

51-
| Attribute | Description |
52-
|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
53-
| azure.app.service.stamp | The specific "stamp" cluster within Azure where the App Service is running, e.g., "waws-prod-sn1-001". |
54-
| cloud.platform | The cloud platform. Here, it's always "azure_app_service". |
55-
| cloud.provider | The cloud service provider. In this context, it's always "azure". |
56-
| cloud.resource_id | The Azure Resource Manager URI uniquely identifying the Azure App Service. Typically in the format "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Web/sites/{siteName}". |
57-
| cloud.region | The Azure region where the App Service is hosted, e.g., "East US", "West Europe", etc. |
58-
| deployment.environment | The deployment slot where the Azure App Service is running, such as "staging", "production", etc. |
59-
| host.id | The primary hostname for the app, excluding any custom hostnames. |
60-
| service.instance.id | The specific instance of the Azure App Service, useful in a scaled-out configuration. |
61-
| service.name | The name of the Azure App Service. |
51+
| Attribute | Description |
52+
|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
53+
| azure.app.service.stamp | The specific "stamp" cluster within Azure where the App Service is running, e.g., "waws-prod-sn1-001". |
54+
| cloud.platform | The cloud platform. Here, it's always "azure_app_service". |
55+
| cloud.provider | The cloud service provider. In this context, it's always "azure". |
56+
| cloud.resource_id | The Azure Resource Manager URI uniquely identifying the Azure App Service. Typically in the format "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Web/sites/{siteName}". |
57+
| cloud.region | The Azure region where the App Service is hosted, e.g., "East US", "West Europe", etc. |
58+
| deployment.environment.name | The deployment slot where the Azure App Service is running, such as "staging", "production", etc. |
59+
| host.id | The primary hostname for the app, excluding any custom hostnames. |
60+
| service.instance.id | The specific instance of the Azure App Service, useful in a scaled-out configuration. |
61+
| service.name | The name of the Azure App Service. |
6262

6363
## VM Resource Detector
6464

@@ -81,19 +81,19 @@ using var meterProvider = Sdk.CreateMeterProviderBuilder()
8181
.Build();
8282
```
8383

84-
| Attribute | Description |
85-
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
86-
| azure.vm.scaleset.name | The name of the Virtual Machine Scale Set if the VM is part of one. |
87-
| cloud.platform | The cloud platform, which is always set to "azure_vm" in this context. |
88-
| cloud.provider | The cloud service provider, which is always set to "azure" in this context. |
89-
| cloud.region | The Azure region where the Virtual Machine is hosted, such as "East US", "West Europe", etc. |
90-
| cloud.resource_id | The Azure Resource Manager URI uniquely identifying the Azure Virtual Machine. It typically follows this format: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/virtualMachines/{vmName}". |
91-
| host.id | A unique identifier for the VM host, for instance, "02aab8a4-74ef-476e-8182-f6d2ba4166a6". |
92-
| host.name | The name of the host machine. |
93-
| host.type | The size of the VM instance, for example, "Standard_D2s_v3". |
94-
| os.type | The type of operating system running on the VM, such as "Linux" or "Windows". |
95-
| os.version | The version of the operating system running on the VM. |
96-
| service.instance.id | An identifier for a specific instance of the service running on the Azure VM, for example, "02aab8a4-74ef-476e-8182-f6d2ba4166a6". |
84+
| Attribute | Description |
85+
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
86+
| azure.vm.scaleset.name | The name of the Virtual Machine Scale Set if the VM is part of one. |
87+
| cloud.platform | The cloud platform, which is always set to "azure_vm" in this context. |
88+
| cloud.provider | The cloud service provider, which is always set to "azure" in this context. |
89+
| cloud.region | The Azure region where the Virtual Machine is hosted, such as "East US", "West Europe", etc. |
90+
| cloud.resource_id | The Azure Resource Manager URI uniquely identifying the Azure Virtual Machine. It typically follows this format: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/virtualMachines/{vmName}". |
91+
| host.id | A unique identifier for the VM host, for instance, "02aab8a4-74ef-476e-8182-f6d2ba4166a6". |
92+
| host.name | The name of the host machine. |
93+
| host.type | The size of the VM instance, for example, "Standard_D2s_v3". |
94+
| os.type | The type of operating system running on the VM, such as "Linux" or "Windows". |
95+
| os.version | The version of the operating system running on the VM. |
96+
| service.instance.id | An identifier for a specific instance of the service running on the Azure VM, for example, "02aab8a4-74ef-476e-8182-f6d2ba4166a6". |
9797

9898
## Azure Container Apps Resource Detector
9999

@@ -116,10 +116,10 @@ using var meterProvider = Sdk.CreateMeterProviderBuilder()
116116
.Build();
117117
```
118118

119-
| Attribute | Description |
120-
|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
121-
| cloud.platform | The cloud platform. Here, it's always "azure_container_apps". |
122-
| cloud.provider | The cloud service provider. In this context, it's always "azure". |
123-
| service.instance.id | Represents the specific instance ID of Azure Container Apps, useful in scaled-out configurations. |
124-
| service.name | The name of the Azure Container Apps or Azure Container Apps job. |
125-
| service.version | The current revision or version of Azure Container Apps, or in case of a Azure Container Apps job - the job execution name. |
119+
| Attribute | Description |
120+
|---------------------|-----------------------------------------------------------------------------------------------------------------------------|
121+
| cloud.platform | The cloud platform. Here, it's always "azure_container_apps". |
122+
| cloud.provider | The cloud service provider. In this context, it's always "azure". |
123+
| service.instance.id | Represents the specific instance ID of Azure Container Apps, useful in scaled-out configurations. |
124+
| service.name | The name of the Azure Container Apps or Azure Container Apps job. |
125+
| service.version | The current revision or version of Azure Container Apps, or in case of a Azure Container Apps job - the job execution name. |

src/Shared/ResourceSemanticConventions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ internal static class ResourceSemanticConventions
5555
public const string AttributeOsType = "os.type";
5656
public const string AttributeOsVersion = "os.version";
5757

58-
public const string AttributeDeploymentEnvironment = "deployment.environment";
58+
public const string AttributeDeploymentEnvironmentName = "deployment.environment.name";
5959
}

0 commit comments

Comments
 (0)