View Source OpenTelemetry.SemConv.Incubating.CloudAttributes (OpenTelemetry.SemConv v1.27.0)
OpenTelemetry Semantic Conventions for Cloud attributes.
Summary
Functions
The cloud account ID the resource is assigned to.
Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.
The cloud platform in use.
Name of the cloud provider.
The geographical region the resource is running.
Cloud 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)
Types
@type cloud_platform_values() :: %{
alibaba_cloud_ecs: :alibaba_cloud_ecs,
alibaba_cloud_fc: :alibaba_cloud_fc,
alibaba_cloud_openshift: :alibaba_cloud_openshift,
aws_ec2: :aws_ec2,
aws_ecs: :aws_ecs,
aws_eks: :aws_eks,
aws_lambda: :aws_lambda,
aws_elastic_beanstalk: :aws_elastic_beanstalk,
aws_app_runner: :aws_app_runner,
aws_openshift: :aws_openshift,
azure_vm: :azure_vm,
azure_container_apps: :azure_container_apps,
azure_container_instances: :azure_container_instances,
azure_aks: :azure_aks,
azure_functions: :azure_functions,
azure_app_service: :azure_app_service,
azure_openshift: :azure_openshift,
gcp_bare_metal_solution: :gcp_bare_metal_solution,
gcp_compute_engine: :gcp_compute_engine,
gcp_cloud_run: :gcp_cloud_run,
gcp_kubernetes_engine: :gcp_kubernetes_engine,
gcp_cloud_functions: :gcp_cloud_functions,
gcp_app_engine: :gcp_app_engine,
gcp_openshift: :gcp_openshift,
ibm_cloud_openshift: :ibm_cloud_openshift,
tencent_cloud_cvm: :tencent_cloud_cvm,
tencent_cloud_eks: :tencent_cloud_eks,
tencent_cloud_scf: :tencent_cloud_scf
}
The cloud platform in use.
Enum Values
:alibaba_cloud_ecs
e - Alibaba Cloud Elastic Compute Service:alibaba_cloud_fc
e - Alibaba Cloud Function Compute:alibaba_cloud_openshift
e - Red Hat OpenShift on Alibaba Cloud:aws_ec2
e - AWS Elastic Compute Cloud:aws_ecs
e - AWS Elastic Container Service:aws_eks
e - AWS Elastic Kubernetes Service:aws_lambda
e - AWS Lambda:aws_elastic_beanstalk
e - AWS Elastic Beanstalk:aws_app_runner
e - AWS App Runner:aws_openshift
e - Red Hat OpenShift on AWS (ROSA):azure_vm
e - Azure Virtual Machines:azure_container_apps
e - Azure Container Apps:azure_container_instances
e - Azure Container Instances:azure_aks
e - Azure Kubernetes Service:azure_functions
e - Azure Functions:azure_app_service
e - Azure App Service:azure_openshift
e - Azure Red Hat OpenShift:gcp_bare_metal_solution
e - Google Bare Metal Solution (BMS):gcp_compute_engine
e - Google Cloud Compute Engine (GCE):gcp_cloud_run
e - Google Cloud Run:gcp_kubernetes_engine
e - Google Cloud Kubernetes Engine (GKE):gcp_cloud_functions
e - Google Cloud Functions (GCF):gcp_app_engine
e - Google Cloud App Engine (GAE):gcp_openshift
e - Red Hat OpenShift on Google Cloud:ibm_cloud_openshift
e - Red Hat OpenShift on IBM Cloud:tencent_cloud_cvm
e - Tencent Cloud Cloud Virtual Machine (CVM):tencent_cloud_eks
e - Tencent Cloud Elastic Kubernetes Service (EKS):tencent_cloud_scf
e - Tencent Cloud Serverless Cloud Function (SCF)
@type cloud_provider_values() :: %{
alibaba_cloud: :alibaba_cloud,
aws: :aws,
azure: :azure,
gcp: :gcp,
heroku: :heroku,
ibm_cloud: :ibm_cloud,
tencent_cloud: :tencent_cloud
}
Name of the cloud provider.
Enum Values
Functions
@spec cloud_account_id() :: :"cloud.account.id"
The cloud account ID the resource is assigned to.
Value type
Value must be of type atom() | String.t()
.
Examples
["111111111111", "opentelemetry"]
iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_account_id()
:"cloud.account.id"
?CLOUD_ACCOUNT_ID.
'cloud.account.id'
@spec cloud_availability_zone() :: :"cloud.availability_zone"
Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.
Value type
Value must be of type atom() | String.t()
.
Notes
Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
Examples
["us-east-1c"]
iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_availability_zone()
:"cloud.availability_zone"
?CLOUD_AVAILABILITY_ZONE.
'cloud.availability_zone'
@spec cloud_platform() :: :"cloud.platform"
The cloud platform in use.
Notes
The prefix of the service SHOULD match the one specified in cloud.provider
.
iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform()
:"cloud.platform"
iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform_values().alibaba_cloud_ecs
:alibaba_cloud_ecs
iex> %{OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform() => OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform_values().alibaba_cloud_ecs}
%{:"cloud.platform" => :alibaba_cloud_ecs}
?CLOUD_PLATFORM.
'cloud.platform'
?CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_ECS.
'alibaba_cloud_ecs'
#{?CLOUD_PLATFORM => ?CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_ECS}.
#{'cloud.platform' => 'alibaba_cloud_ecs'}
@spec cloud_platform_values() :: cloud_platform_values()
@spec cloud_provider() :: :"cloud.provider"
Name of the cloud provider.
iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider()
:"cloud.provider"
iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider_values().alibaba_cloud
:alibaba_cloud
iex> %{OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider() => OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider_values().alibaba_cloud}
%{:"cloud.provider" => :alibaba_cloud}
?CLOUD_PROVIDER.
'cloud.provider'
?CLOUD_PROVIDER_VALUES_ALIBABA_CLOUD.
'alibaba_cloud'
#{?CLOUD_PROVIDER => ?CLOUD_PROVIDER_VALUES_ALIBABA_CLOUD}.
#{'cloud.provider' => 'alibaba_cloud'}
@spec cloud_provider_values() :: cloud_provider_values()
@spec cloud_region() :: :"cloud.region"
The geographical region the resource is running.
Value type
Value must be of type atom() | String.t()
.
Notes
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.
Examples
["us-central1", "us-east-1"]
iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_region()
:"cloud.region"
?CLOUD_REGION.
'cloud.region'
@spec cloud_resource_id() :: :"cloud.resource_id"
Cloud 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)
Value type
Value must be of type atom() | String.t()
.
Notes
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/<SUBSCIPTION_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.
Examples
["arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function", "//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID", "/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>"]
iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_resource_id()
:"cloud.resource_id"
?CLOUD_RESOURCE_ID.
'cloud.resource_id'