cloud_attributes.h 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. /*
  6. * DO NOT EDIT, this is an Auto-generated file from:
  7. * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
  8. */
  9. #pragma once
  10. #include "opentelemetry/common/macros.h"
  11. #include "opentelemetry/version.h"
  12. OPENTELEMETRY_BEGIN_NAMESPACE
  13. namespace semconv
  14. {
  15. namespace cloud
  16. {
  17. /**
  18. The cloud account ID the resource is assigned to.
  19. */
  20. static constexpr const char *kCloudAccountId = "cloud.account.id";
  21. /**
  22. Cloud regions often have multiple, isolated locations known as zones to increase availability.
  23. Availability zone represents the zone where the resource is running. <p> Availability zones are
  24. called "zones" on Alibaba Cloud and Google Cloud.
  25. */
  26. static constexpr const char *kCloudAvailabilityZone = "cloud.availability_zone";
  27. /**
  28. The cloud platform in use.
  29. <p>
  30. The prefix of the service SHOULD match the one specified in @code cloud.provider @endcode.
  31. */
  32. static constexpr const char *kCloudPlatform = "cloud.platform";
  33. /**
  34. Name of the cloud provider.
  35. */
  36. static constexpr const char *kCloudProvider = "cloud.provider";
  37. /**
  38. The geographical region within a cloud provider. When associated with a resource, this attribute
  39. specifies the region where the resource operates. When calling services or APIs deployed on a
  40. cloud, this attribute identifies the region where the called destination is deployed. <p> Refer to
  41. your provider's docs to see the available regions, for example <a
  42. href="https://www.alibabacloud.com/help/doc-detail/40654.htm">Alibaba Cloud regions</a>, <a
  43. href="https://aws.amazon.com/about-aws/global-infrastructure/regions_az/">AWS regions</a>, <a
  44. href="https://azure.microsoft.com/global-infrastructure/geographies/">Azure regions</a>, <a
  45. href="https://cloud.google.com/about/locations">Google Cloud regions</a>, or <a
  46. href="https://www.tencentcloud.com/document/product/213/6091">Tencent Cloud regions</a>.
  47. */
  48. static constexpr const char *kCloudRegion = "cloud.region";
  49. /**
  50. Cloud provider-specific native identifier of the monitored cloud resource (e.g. an <a
  51. href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> on AWS,
  52. a <a href="https://learn.microsoft.com/rest/api/resources/resources/get-by-id">fully qualified
  53. resource ID</a> on Azure, a <a href="https://google.aip.dev/122#full-resource-names">full resource
  54. name</a> on GCP) <p> On some cloud providers, it may not be possible to determine the full ID at
  55. startup, so it may be necessary to set @code cloud.resource_id @endcode as a span attribute
  56. instead. <p> The exact value to use for @code cloud.resource_id @endcode depends on the cloud
  57. provider. The following well-known definitions MUST be used if you set this attribute and they
  58. apply: <ul> <li><strong>AWS Lambda:</strong> The function <a
  59. href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a>. Take
  60. care not to use the "invoked ARN" directly but replace any <a
  61. href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">alias suffix</a>
  62. with the resolved function version, as the same runtime instance may be invocable with
  63. multiple different aliases.</li>
  64. <li><strong>GCP:</strong> The <a
  65. href="https://cloud.google.com/iam/docs/full-resource-names">URI of the resource</a></li>
  66. <li><strong>Azure:</strong> The <a
  67. href="https://docs.microsoft.com/rest/api/resources/resources/get-by-id">Fully Qualified Resource
  68. ID</a> of the invoked function, <em>not</em> the function app, having the form
  69. @code
  70. /subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>
  71. @endcode. This means that a span attribute MUST be used, as an Azure function app can host
  72. multiple functions that would usually share a TracerProvider.</li>
  73. </ul>
  74. */
  75. static constexpr const char *kCloudResourceId = "cloud.resource_id";
  76. namespace CloudPlatformValues
  77. {
  78. /**
  79. Alibaba Cloud Elastic Compute Service
  80. */
  81. static constexpr const char *kAlibabaCloudEcs = "alibaba_cloud_ecs";
  82. /**
  83. Alibaba Cloud Function Compute
  84. */
  85. static constexpr const char *kAlibabaCloudFc = "alibaba_cloud_fc";
  86. /**
  87. Red Hat OpenShift on Alibaba Cloud
  88. */
  89. static constexpr const char *kAlibabaCloudOpenshift = "alibaba_cloud_openshift";
  90. /**
  91. AWS Elastic Compute Cloud
  92. */
  93. static constexpr const char *kAwsEc2 = "aws_ec2";
  94. /**
  95. AWS Elastic Container Service
  96. */
  97. static constexpr const char *kAwsEcs = "aws_ecs";
  98. /**
  99. AWS Elastic Kubernetes Service
  100. */
  101. static constexpr const char *kAwsEks = "aws_eks";
  102. /**
  103. AWS Lambda
  104. */
  105. static constexpr const char *kAwsLambda = "aws_lambda";
  106. /**
  107. AWS Elastic Beanstalk
  108. */
  109. static constexpr const char *kAwsElasticBeanstalk = "aws_elastic_beanstalk";
  110. /**
  111. AWS App Runner
  112. */
  113. static constexpr const char *kAwsAppRunner = "aws_app_runner";
  114. /**
  115. Red Hat OpenShift on AWS (ROSA)
  116. */
  117. static constexpr const char *kAwsOpenshift = "aws_openshift";
  118. /**
  119. Azure Virtual Machines
  120. */
  121. static constexpr const char *kAzureVm = "azure_vm";
  122. /**
  123. Azure Container Apps
  124. */
  125. static constexpr const char *kAzureContainerApps = "azure_container_apps";
  126. /**
  127. Azure Container Instances
  128. */
  129. static constexpr const char *kAzureContainerInstances = "azure_container_instances";
  130. /**
  131. Azure Kubernetes Service
  132. */
  133. static constexpr const char *kAzureAks = "azure_aks";
  134. /**
  135. Azure Functions
  136. */
  137. static constexpr const char *kAzureFunctions = "azure_functions";
  138. /**
  139. Azure App Service
  140. */
  141. static constexpr const char *kAzureAppService = "azure_app_service";
  142. /**
  143. Azure Red Hat OpenShift
  144. */
  145. static constexpr const char *kAzureOpenshift = "azure_openshift";
  146. /**
  147. Google Bare Metal Solution (BMS)
  148. */
  149. static constexpr const char *kGcpBareMetalSolution = "gcp_bare_metal_solution";
  150. /**
  151. Google Cloud Compute Engine (GCE)
  152. */
  153. static constexpr const char *kGcpComputeEngine = "gcp_compute_engine";
  154. /**
  155. Google Cloud Run
  156. */
  157. static constexpr const char *kGcpCloudRun = "gcp_cloud_run";
  158. /**
  159. Google Cloud Kubernetes Engine (GKE)
  160. */
  161. static constexpr const char *kGcpKubernetesEngine = "gcp_kubernetes_engine";
  162. /**
  163. Google Cloud Functions (GCF)
  164. */
  165. static constexpr const char *kGcpCloudFunctions = "gcp_cloud_functions";
  166. /**
  167. Google Cloud App Engine (GAE)
  168. */
  169. static constexpr const char *kGcpAppEngine = "gcp_app_engine";
  170. /**
  171. Red Hat OpenShift on Google Cloud
  172. */
  173. static constexpr const char *kGcpOpenshift = "gcp_openshift";
  174. /**
  175. Red Hat OpenShift on IBM Cloud
  176. */
  177. static constexpr const char *kIbmCloudOpenshift = "ibm_cloud_openshift";
  178. /**
  179. Compute on Oracle Cloud Infrastructure (OCI)
  180. */
  181. static constexpr const char *kOracleCloudCompute = "oracle_cloud_compute";
  182. /**
  183. Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)
  184. */
  185. static constexpr const char *kOracleCloudOke = "oracle_cloud_oke";
  186. /**
  187. Tencent Cloud Cloud Virtual Machine (CVM)
  188. */
  189. static constexpr const char *kTencentCloudCvm = "tencent_cloud_cvm";
  190. /**
  191. Tencent Cloud Elastic Kubernetes Service (EKS)
  192. */
  193. static constexpr const char *kTencentCloudEks = "tencent_cloud_eks";
  194. /**
  195. Tencent Cloud Serverless Cloud Function (SCF)
  196. */
  197. static constexpr const char *kTencentCloudScf = "tencent_cloud_scf";
  198. } // namespace CloudPlatformValues
  199. namespace CloudProviderValues
  200. {
  201. /**
  202. Alibaba Cloud
  203. */
  204. static constexpr const char *kAlibabaCloud = "alibaba_cloud";
  205. /**
  206. Amazon Web Services
  207. */
  208. static constexpr const char *kAws = "aws";
  209. /**
  210. Microsoft Azure
  211. */
  212. static constexpr const char *kAzure = "azure";
  213. /**
  214. Google Cloud Platform
  215. */
  216. static constexpr const char *kGcp = "gcp";
  217. /**
  218. Heroku Platform as a Service
  219. */
  220. static constexpr const char *kHeroku = "heroku";
  221. /**
  222. IBM Cloud
  223. */
  224. static constexpr const char *kIbmCloud = "ibm_cloud";
  225. /**
  226. Oracle Cloud Infrastructure (OCI)
  227. */
  228. static constexpr const char *kOracleCloud = "oracle_cloud";
  229. /**
  230. Tencent Cloud
  231. */
  232. static constexpr const char *kTencentCloud = "tencent_cloud";
  233. } // namespace CloudProviderValues
  234. } // namespace cloud
  235. } // namespace semconv
  236. OPENTELEMETRY_END_NAMESPACE