Cloud

Status: Development

type: cloud

Description: A cloud environment (e.g. GCP, Azure, AWS)

AttributeTypeDescriptionExamplesRequirement LevelStability
cloud.account.idstringThe cloud account ID the resource is assigned to.111111111111; opentelemetryRecommendedDevelopment
cloud.availability_zonestringCloud 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-1cRecommendedDevelopment
cloud.platformstringThe cloud platform in use. [2]alibaba_cloud_ecs; alibaba_cloud_fc; alibaba_cloud_openshiftRecommendedDevelopment
cloud.providerstringName of the cloud provider.alibaba_cloud; aws; azureRecommendedDevelopment
cloud.regionstringThe geographical region the resource is running. [3]us-central1; us-east-1RecommendedDevelopment
cloud.resource_idstringCloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on AWS, a fully qualified resource ID on Azure, a full resource name 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>RecommendedDevelopment

[1] cloud.availability_zone: Availability zones are called “zones” on Alibaba Cloud and Google Cloud.

[2] cloud.platform: The prefix of the service SHOULD match the one specified in cloud.provider.

[3] cloud.region: Refer to your provider’s docs to see the available regions, for example Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or Tencent Cloud regions.

[4] 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. The following well-known definitions MUST be used if you set this attribute and they apply:

  • AWS Lambda: The function ARN. Take care not to use the “invoked ARN” directly but replace any alias suffix with the resolved function version, as the same runtime instance may be invocable with multiple different aliases.
  • GCP: The URI of the resource
  • Azure: The Fully Qualified Resource ID of the invoked function, not the function app, having the form /subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>. This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share a TracerProvider.

cloud.platform has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
alibaba_cloud_ecsAlibaba Cloud Elastic Compute ServiceDevelopment
alibaba_cloud_fcAlibaba Cloud Function ComputeDevelopment
alibaba_cloud_openshiftRed Hat OpenShift on Alibaba CloudDevelopment
aws_app_runnerAWS App RunnerDevelopment
aws_ec2AWS Elastic Compute CloudDevelopment
aws_ecsAWS Elastic Container ServiceDevelopment
aws_eksAWS Elastic Kubernetes ServiceDevelopment
aws_elastic_beanstalkAWS Elastic BeanstalkDevelopment
aws_lambdaAWS LambdaDevelopment
aws_openshiftRed Hat OpenShift on AWS (ROSA)Development
azure_aksAzure Kubernetes ServiceDevelopment
azure_app_serviceAzure App ServiceDevelopment
azure_container_appsAzure Container AppsDevelopment
azure_container_instancesAzure Container InstancesDevelopment
azure_functionsAzure FunctionsDevelopment
azure_openshiftAzure Red Hat OpenShiftDevelopment
azure_vmAzure Virtual MachinesDevelopment
gcp_app_engineGoogle Cloud App Engine (GAE)Development
gcp_bare_metal_solutionGoogle Bare Metal Solution (BMS)Development
gcp_cloud_functionsGoogle Cloud Functions (GCF)Development
gcp_cloud_runGoogle Cloud RunDevelopment
gcp_compute_engineGoogle Cloud Compute Engine (GCE)Development
gcp_kubernetes_engineGoogle Cloud Kubernetes Engine (GKE)Development
gcp_openshiftRed Hat OpenShift on Google CloudDevelopment
ibm_cloud_openshiftRed Hat OpenShift on IBM CloudDevelopment
oracle_cloud_computeCompute on Oracle Cloud Infrastructure (OCI)Development
oracle_cloud_okeKubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)Development
tencent_cloud_cvmTencent Cloud Cloud Virtual Machine (CVM)Development
tencent_cloud_eksTencent Cloud Elastic Kubernetes Service (EKS)Development
tencent_cloud_scfTencent Cloud Serverless Cloud Function (SCF)Development

cloud.provider has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
alibaba_cloudAlibaba CloudDevelopment
awsAmazon Web ServicesDevelopment
azureMicrosoft AzureDevelopment
gcpGoogle Cloud PlatformDevelopment
herokuHeroku Platform as a ServiceDevelopment
ibm_cloudIBM CloudDevelopment
oracle_cloudOracle Cloud Infrastructure (OCI)Development
tencent_cloudTencent CloudDevelopment