resource.go 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010
  1. // Copyright The OpenTelemetry Authors
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // Code generated from semantic convention specification. DO NOT EDIT.
  15. package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0"
  16. import "go.opentelemetry.io/otel/attribute"
  17. // The web browser in which the application represented by the resource is
  18. // running. The `browser.*` attributes MUST be used only for resources that
  19. // represent applications running in a web browser (regardless of whether
  20. // running on a mobile or desktop device).
  21. const (
  22. // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
  23. // semantic conventions. It represents the array of brand name and version
  24. // separated by a space
  25. //
  26. // Type: string[]
  27. // RequirementLevel: Optional
  28. // Stability: stable
  29. // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99'
  30. // Note: This value is intended to be taken from the [UA client hints
  31. // API](https://wicg.github.io/ua-client-hints/#interface)
  32. // (`navigator.userAgentData.brands`).
  33. BrowserBrandsKey = attribute.Key("browser.brands")
  34. // BrowserPlatformKey is the attribute Key conforming to the
  35. // "browser.platform" semantic conventions. It represents the platform on
  36. // which the browser is running
  37. //
  38. // Type: string
  39. // RequirementLevel: Optional
  40. // Stability: stable
  41. // Examples: 'Windows', 'macOS', 'Android'
  42. // Note: This value is intended to be taken from the [UA client hints
  43. // API](https://wicg.github.io/ua-client-hints/#interface)
  44. // (`navigator.userAgentData.platform`). If unavailable, the legacy
  45. // `navigator.platform` API SHOULD NOT be used instead and this attribute
  46. // SHOULD be left unset in order for the values to be consistent.
  47. // The list of possible values is defined in the [W3C User-Agent Client
  48. // Hints
  49. // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform).
  50. // Note that some (but not all) of these values can overlap with values in
  51. // the [`os.type` and `os.name` attributes](./os.md). However, for
  52. // consistency, the values in the `browser.platform` attribute should
  53. // capture the exact value that the user agent provides.
  54. BrowserPlatformKey = attribute.Key("browser.platform")
  55. // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
  56. // semantic conventions. It represents a boolean that is true if the
  57. // browser is running on a mobile device
  58. //
  59. // Type: boolean
  60. // RequirementLevel: Optional
  61. // Stability: stable
  62. // Note: This value is intended to be taken from the [UA client hints
  63. // API](https://wicg.github.io/ua-client-hints/#interface)
  64. // (`navigator.userAgentData.mobile`). If unavailable, this attribute
  65. // SHOULD be left unset.
  66. BrowserMobileKey = attribute.Key("browser.mobile")
  67. // BrowserUserAgentKey is the attribute Key conforming to the
  68. // "browser.user_agent" semantic conventions. It represents the full
  69. // user-agent string provided by the browser
  70. //
  71. // Type: string
  72. // RequirementLevel: Optional
  73. // Stability: stable
  74. // Examples: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
  75. // AppleWebKit/537.36 (KHTML, '
  76. // 'like Gecko) Chrome/95.0.4638.54 Safari/537.36'
  77. // Note: The user-agent value SHOULD be provided only from browsers that do
  78. // not have a mechanism to retrieve brands and platform individually from
  79. // the User-Agent Client Hints API. To retrieve the value, the legacy
  80. // `navigator.userAgent` API can be used.
  81. BrowserUserAgentKey = attribute.Key("browser.user_agent")
  82. // BrowserLanguageKey is the attribute Key conforming to the
  83. // "browser.language" semantic conventions. It represents the preferred
  84. // language of the user using the browser
  85. //
  86. // Type: string
  87. // RequirementLevel: Optional
  88. // Stability: stable
  89. // Examples: 'en', 'en-US', 'fr', 'fr-FR'
  90. // Note: This value is intended to be taken from the Navigator API
  91. // `navigator.language`.
  92. BrowserLanguageKey = attribute.Key("browser.language")
  93. )
  94. // BrowserBrands returns an attribute KeyValue conforming to the
  95. // "browser.brands" semantic conventions. It represents the array of brand name
  96. // and version separated by a space
  97. func BrowserBrands(val ...string) attribute.KeyValue {
  98. return BrowserBrandsKey.StringSlice(val)
  99. }
  100. // BrowserPlatform returns an attribute KeyValue conforming to the
  101. // "browser.platform" semantic conventions. It represents the platform on which
  102. // the browser is running
  103. func BrowserPlatform(val string) attribute.KeyValue {
  104. return BrowserPlatformKey.String(val)
  105. }
  106. // BrowserMobile returns an attribute KeyValue conforming to the
  107. // "browser.mobile" semantic conventions. It represents a boolean that is true
  108. // if the browser is running on a mobile device
  109. func BrowserMobile(val bool) attribute.KeyValue {
  110. return BrowserMobileKey.Bool(val)
  111. }
  112. // BrowserUserAgent returns an attribute KeyValue conforming to the
  113. // "browser.user_agent" semantic conventions. It represents the full user-agent
  114. // string provided by the browser
  115. func BrowserUserAgent(val string) attribute.KeyValue {
  116. return BrowserUserAgentKey.String(val)
  117. }
  118. // BrowserLanguage returns an attribute KeyValue conforming to the
  119. // "browser.language" semantic conventions. It represents the preferred
  120. // language of the user using the browser
  121. func BrowserLanguage(val string) attribute.KeyValue {
  122. return BrowserLanguageKey.String(val)
  123. }
  124. // A cloud environment (e.g. GCP, Azure, AWS)
  125. const (
  126. // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
  127. // semantic conventions. It represents the name of the cloud provider.
  128. //
  129. // Type: Enum
  130. // RequirementLevel: Optional
  131. // Stability: stable
  132. CloudProviderKey = attribute.Key("cloud.provider")
  133. // CloudAccountIDKey is the attribute Key conforming to the
  134. // "cloud.account.id" semantic conventions. It represents the cloud account
  135. // ID the resource is assigned to.
  136. //
  137. // Type: string
  138. // RequirementLevel: Optional
  139. // Stability: stable
  140. // Examples: '111111111111', 'opentelemetry'
  141. CloudAccountIDKey = attribute.Key("cloud.account.id")
  142. // CloudRegionKey is the attribute Key conforming to the "cloud.region"
  143. // semantic conventions. It represents the geographical region the resource
  144. // is running.
  145. //
  146. // Type: string
  147. // RequirementLevel: Optional
  148. // Stability: stable
  149. // Examples: 'us-central1', 'us-east-1'
  150. // Note: Refer to your provider's docs to see the available regions, for
  151. // example [Alibaba Cloud
  152. // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
  153. // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
  154. // [Azure
  155. // regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/),
  156. // [Google Cloud regions](https://cloud.google.com/about/locations), or
  157. // [Tencent Cloud
  158. // regions](https://intl.cloud.tencent.com/document/product/213/6091).
  159. CloudRegionKey = attribute.Key("cloud.region")
  160. // CloudAvailabilityZoneKey is the attribute Key conforming to the
  161. // "cloud.availability_zone" semantic conventions. It represents the cloud
  162. // regions often have multiple, isolated locations known as zones to
  163. // increase availability. Availability zone represents the zone where the
  164. // resource is running.
  165. //
  166. // Type: string
  167. // RequirementLevel: Optional
  168. // Stability: stable
  169. // Examples: 'us-east-1c'
  170. // Note: Availability zones are called "zones" on Alibaba Cloud and Google
  171. // Cloud.
  172. CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
  173. // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
  174. // semantic conventions. It represents the cloud platform in use.
  175. //
  176. // Type: Enum
  177. // RequirementLevel: Optional
  178. // Stability: stable
  179. // Note: The prefix of the service SHOULD match the one specified in
  180. // `cloud.provider`.
  181. CloudPlatformKey = attribute.Key("cloud.platform")
  182. )
  183. var (
  184. // Alibaba Cloud
  185. CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
  186. // Amazon Web Services
  187. CloudProviderAWS = CloudProviderKey.String("aws")
  188. // Microsoft Azure
  189. CloudProviderAzure = CloudProviderKey.String("azure")
  190. // Google Cloud Platform
  191. CloudProviderGCP = CloudProviderKey.String("gcp")
  192. // IBM Cloud
  193. CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
  194. // Tencent Cloud
  195. CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
  196. )
  197. var (
  198. // Alibaba Cloud Elastic Compute Service
  199. CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
  200. // Alibaba Cloud Function Compute
  201. CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
  202. // Red Hat OpenShift on Alibaba Cloud
  203. CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
  204. // AWS Elastic Compute Cloud
  205. CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
  206. // AWS Elastic Container Service
  207. CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
  208. // AWS Elastic Kubernetes Service
  209. CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
  210. // AWS Lambda
  211. CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
  212. // AWS Elastic Beanstalk
  213. CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
  214. // AWS App Runner
  215. CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
  216. // Red Hat OpenShift on AWS (ROSA)
  217. CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
  218. // Azure Virtual Machines
  219. CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
  220. // Azure Container Instances
  221. CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
  222. // Azure Kubernetes Service
  223. CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
  224. // Azure Functions
  225. CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
  226. // Azure App Service
  227. CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
  228. // Azure Red Hat OpenShift
  229. CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
  230. // Google Cloud Compute Engine (GCE)
  231. CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
  232. // Google Cloud Run
  233. CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
  234. // Google Cloud Kubernetes Engine (GKE)
  235. CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
  236. // Google Cloud Functions (GCF)
  237. CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
  238. // Google Cloud App Engine (GAE)
  239. CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
  240. // Red Hat OpenShift on Google Cloud
  241. CloudPlatformGoogleCloudOpenshift = CloudPlatformKey.String("google_cloud_openshift")
  242. // Red Hat OpenShift on IBM Cloud
  243. CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
  244. // Tencent Cloud Cloud Virtual Machine (CVM)
  245. CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
  246. // Tencent Cloud Elastic Kubernetes Service (EKS)
  247. CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
  248. // Tencent Cloud Serverless Cloud Function (SCF)
  249. CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
  250. )
  251. // CloudAccountID returns an attribute KeyValue conforming to the
  252. // "cloud.account.id" semantic conventions. It represents the cloud account ID
  253. // the resource is assigned to.
  254. func CloudAccountID(val string) attribute.KeyValue {
  255. return CloudAccountIDKey.String(val)
  256. }
  257. // CloudRegion returns an attribute KeyValue conforming to the
  258. // "cloud.region" semantic conventions. It represents the geographical region
  259. // the resource is running.
  260. func CloudRegion(val string) attribute.KeyValue {
  261. return CloudRegionKey.String(val)
  262. }
  263. // CloudAvailabilityZone returns an attribute KeyValue conforming to the
  264. // "cloud.availability_zone" semantic conventions. It represents the cloud
  265. // regions often have multiple, isolated locations known as zones to increase
  266. // availability. Availability zone represents the zone where the resource is
  267. // running.
  268. func CloudAvailabilityZone(val string) attribute.KeyValue {
  269. return CloudAvailabilityZoneKey.String(val)
  270. }
  271. // Resources used by AWS Elastic Container Service (ECS).
  272. const (
  273. // AWSECSContainerARNKey is the attribute Key conforming to the
  274. // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
  275. // Resource Name (ARN) of an [ECS container
  276. // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
  277. //
  278. // Type: string
  279. // RequirementLevel: Optional
  280. // Stability: stable
  281. // Examples:
  282. // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'
  283. AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
  284. // AWSECSClusterARNKey is the attribute Key conforming to the
  285. // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
  286. // [ECS
  287. // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
  288. //
  289. // Type: string
  290. // RequirementLevel: Optional
  291. // Stability: stable
  292. // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
  293. AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
  294. // AWSECSLaunchtypeKey is the attribute Key conforming to the
  295. // "aws.ecs.launchtype" semantic conventions. It represents the [launch
  296. // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  297. // for an ECS task.
  298. //
  299. // Type: Enum
  300. // RequirementLevel: Optional
  301. // Stability: stable
  302. AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
  303. // AWSECSTaskARNKey is the attribute Key conforming to the
  304. // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an
  305. // [ECS task
  306. // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
  307. //
  308. // Type: string
  309. // RequirementLevel: Optional
  310. // Stability: stable
  311. // Examples:
  312. // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b'
  313. AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
  314. // AWSECSTaskFamilyKey is the attribute Key conforming to the
  315. // "aws.ecs.task.family" semantic conventions. It represents the task
  316. // definition family this task definition is a member of.
  317. //
  318. // Type: string
  319. // RequirementLevel: Optional
  320. // Stability: stable
  321. // Examples: 'opentelemetry-family'
  322. AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
  323. // AWSECSTaskRevisionKey is the attribute Key conforming to the
  324. // "aws.ecs.task.revision" semantic conventions. It represents the revision
  325. // for this task definition.
  326. //
  327. // Type: string
  328. // RequirementLevel: Optional
  329. // Stability: stable
  330. // Examples: '8', '26'
  331. AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
  332. )
  333. var (
  334. // ec2
  335. AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
  336. // fargate
  337. AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
  338. )
  339. // AWSECSContainerARN returns an attribute KeyValue conforming to the
  340. // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
  341. // Resource Name (ARN) of an [ECS container
  342. // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
  343. func AWSECSContainerARN(val string) attribute.KeyValue {
  344. return AWSECSContainerARNKey.String(val)
  345. }
  346. // AWSECSClusterARN returns an attribute KeyValue conforming to the
  347. // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS
  348. // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
  349. func AWSECSClusterARN(val string) attribute.KeyValue {
  350. return AWSECSClusterARNKey.String(val)
  351. }
  352. // AWSECSTaskARN returns an attribute KeyValue conforming to the
  353. // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS
  354. // task
  355. // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
  356. func AWSECSTaskARN(val string) attribute.KeyValue {
  357. return AWSECSTaskARNKey.String(val)
  358. }
  359. // AWSECSTaskFamily returns an attribute KeyValue conforming to the
  360. // "aws.ecs.task.family" semantic conventions. It represents the task
  361. // definition family this task definition is a member of.
  362. func AWSECSTaskFamily(val string) attribute.KeyValue {
  363. return AWSECSTaskFamilyKey.String(val)
  364. }
  365. // AWSECSTaskRevision returns an attribute KeyValue conforming to the
  366. // "aws.ecs.task.revision" semantic conventions. It represents the revision for
  367. // this task definition.
  368. func AWSECSTaskRevision(val string) attribute.KeyValue {
  369. return AWSECSTaskRevisionKey.String(val)
  370. }
  371. // Resources used by AWS Elastic Kubernetes Service (EKS).
  372. const (
  373. // AWSEKSClusterARNKey is the attribute Key conforming to the
  374. // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an
  375. // EKS cluster.
  376. //
  377. // Type: string
  378. // RequirementLevel: Optional
  379. // Stability: stable
  380. // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
  381. AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
  382. )
  383. // AWSEKSClusterARN returns an attribute KeyValue conforming to the
  384. // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
  385. // cluster.
  386. func AWSEKSClusterARN(val string) attribute.KeyValue {
  387. return AWSEKSClusterARNKey.String(val)
  388. }
  389. // Resources specific to Amazon Web Services.
  390. const (
  391. // AWSLogGroupNamesKey is the attribute Key conforming to the
  392. // "aws.log.group.names" semantic conventions. It represents the name(s) of
  393. // the AWS log group(s) an application is writing to.
  394. //
  395. // Type: string[]
  396. // RequirementLevel: Optional
  397. // Stability: stable
  398. // Examples: '/aws/lambda/my-function', 'opentelemetry-service'
  399. // Note: Multiple log groups must be supported for cases like
  400. // multi-container applications, where a single application has sidecar
  401. // containers, and each write to their own log group.
  402. AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
  403. // AWSLogGroupARNsKey is the attribute Key conforming to the
  404. // "aws.log.group.arns" semantic conventions. It represents the Amazon
  405. // Resource Name(s) (ARN) of the AWS log group(s).
  406. //
  407. // Type: string[]
  408. // RequirementLevel: Optional
  409. // Stability: stable
  410. // Examples:
  411. // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*'
  412. // Note: See the [log group ARN format
  413. // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
  414. AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
  415. // AWSLogStreamNamesKey is the attribute Key conforming to the
  416. // "aws.log.stream.names" semantic conventions. It represents the name(s)
  417. // of the AWS log stream(s) an application is writing to.
  418. //
  419. // Type: string[]
  420. // RequirementLevel: Optional
  421. // Stability: stable
  422. // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
  423. AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
  424. // AWSLogStreamARNsKey is the attribute Key conforming to the
  425. // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of
  426. // the AWS log stream(s).
  427. //
  428. // Type: string[]
  429. // RequirementLevel: Optional
  430. // Stability: stable
  431. // Examples:
  432. // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
  433. // Note: See the [log stream ARN format
  434. // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
  435. // One log group can contain several log streams, so these ARNs necessarily
  436. // identify both a log group and a log stream.
  437. AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
  438. )
  439. // AWSLogGroupNames returns an attribute KeyValue conforming to the
  440. // "aws.log.group.names" semantic conventions. It represents the name(s) of the
  441. // AWS log group(s) an application is writing to.
  442. func AWSLogGroupNames(val ...string) attribute.KeyValue {
  443. return AWSLogGroupNamesKey.StringSlice(val)
  444. }
  445. // AWSLogGroupARNs returns an attribute KeyValue conforming to the
  446. // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
  447. // Name(s) (ARN) of the AWS log group(s).
  448. func AWSLogGroupARNs(val ...string) attribute.KeyValue {
  449. return AWSLogGroupARNsKey.StringSlice(val)
  450. }
  451. // AWSLogStreamNames returns an attribute KeyValue conforming to the
  452. // "aws.log.stream.names" semantic conventions. It represents the name(s) of
  453. // the AWS log stream(s) an application is writing to.
  454. func AWSLogStreamNames(val ...string) attribute.KeyValue {
  455. return AWSLogStreamNamesKey.StringSlice(val)
  456. }
  457. // AWSLogStreamARNs returns an attribute KeyValue conforming to the
  458. // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
  459. // AWS log stream(s).
  460. func AWSLogStreamARNs(val ...string) attribute.KeyValue {
  461. return AWSLogStreamARNsKey.StringSlice(val)
  462. }
  463. // A container instance.
  464. const (
  465. // ContainerNameKey is the attribute Key conforming to the "container.name"
  466. // semantic conventions. It represents the container name used by container
  467. // runtime.
  468. //
  469. // Type: string
  470. // RequirementLevel: Optional
  471. // Stability: stable
  472. // Examples: 'opentelemetry-autoconf'
  473. ContainerNameKey = attribute.Key("container.name")
  474. // ContainerIDKey is the attribute Key conforming to the "container.id"
  475. // semantic conventions. It represents the container ID. Usually a UUID, as
  476. // for example used to [identify Docker
  477. // containers](https://docs.docker.com/engine/reference/run/#container-identification).
  478. // The UUID might be abbreviated.
  479. //
  480. // Type: string
  481. // RequirementLevel: Optional
  482. // Stability: stable
  483. // Examples: 'a3bf90e006b2'
  484. ContainerIDKey = attribute.Key("container.id")
  485. // ContainerRuntimeKey is the attribute Key conforming to the
  486. // "container.runtime" semantic conventions. It represents the container
  487. // runtime managing this container.
  488. //
  489. // Type: string
  490. // RequirementLevel: Optional
  491. // Stability: stable
  492. // Examples: 'docker', 'containerd', 'rkt'
  493. ContainerRuntimeKey = attribute.Key("container.runtime")
  494. // ContainerImageNameKey is the attribute Key conforming to the
  495. // "container.image.name" semantic conventions. It represents the name of
  496. // the image the container was built on.
  497. //
  498. // Type: string
  499. // RequirementLevel: Optional
  500. // Stability: stable
  501. // Examples: 'gcr.io/opentelemetry/operator'
  502. ContainerImageNameKey = attribute.Key("container.image.name")
  503. // ContainerImageTagKey is the attribute Key conforming to the
  504. // "container.image.tag" semantic conventions. It represents the container
  505. // image tag.
  506. //
  507. // Type: string
  508. // RequirementLevel: Optional
  509. // Stability: stable
  510. // Examples: '0.1'
  511. ContainerImageTagKey = attribute.Key("container.image.tag")
  512. )
  513. // ContainerName returns an attribute KeyValue conforming to the
  514. // "container.name" semantic conventions. It represents the container name used
  515. // by container runtime.
  516. func ContainerName(val string) attribute.KeyValue {
  517. return ContainerNameKey.String(val)
  518. }
  519. // ContainerID returns an attribute KeyValue conforming to the
  520. // "container.id" semantic conventions. It represents the container ID. Usually
  521. // a UUID, as for example used to [identify Docker
  522. // containers](https://docs.docker.com/engine/reference/run/#container-identification).
  523. // The UUID might be abbreviated.
  524. func ContainerID(val string) attribute.KeyValue {
  525. return ContainerIDKey.String(val)
  526. }
  527. // ContainerRuntime returns an attribute KeyValue conforming to the
  528. // "container.runtime" semantic conventions. It represents the container
  529. // runtime managing this container.
  530. func ContainerRuntime(val string) attribute.KeyValue {
  531. return ContainerRuntimeKey.String(val)
  532. }
  533. // ContainerImageName returns an attribute KeyValue conforming to the
  534. // "container.image.name" semantic conventions. It represents the name of the
  535. // image the container was built on.
  536. func ContainerImageName(val string) attribute.KeyValue {
  537. return ContainerImageNameKey.String(val)
  538. }
  539. // ContainerImageTag returns an attribute KeyValue conforming to the
  540. // "container.image.tag" semantic conventions. It represents the container
  541. // image tag.
  542. func ContainerImageTag(val string) attribute.KeyValue {
  543. return ContainerImageTagKey.String(val)
  544. }
  545. // The software deployment.
  546. const (
  547. // DeploymentEnvironmentKey is the attribute Key conforming to the
  548. // "deployment.environment" semantic conventions. It represents the name of
  549. // the [deployment
  550. // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka
  551. // deployment tier).
  552. //
  553. // Type: string
  554. // RequirementLevel: Optional
  555. // Stability: stable
  556. // Examples: 'staging', 'production'
  557. DeploymentEnvironmentKey = attribute.Key("deployment.environment")
  558. )
  559. // DeploymentEnvironment returns an attribute KeyValue conforming to the
  560. // "deployment.environment" semantic conventions. It represents the name of the
  561. // [deployment
  562. // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka
  563. // deployment tier).
  564. func DeploymentEnvironment(val string) attribute.KeyValue {
  565. return DeploymentEnvironmentKey.String(val)
  566. }
  567. // The device on which the process represented by this resource is running.
  568. const (
  569. // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
  570. // conventions. It represents a unique identifier representing the device
  571. //
  572. // Type: string
  573. // RequirementLevel: Optional
  574. // Stability: stable
  575. // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
  576. // Note: The device identifier MUST only be defined using the values
  577. // outlined below. This value is not an advertising identifier and MUST NOT
  578. // be used as such. On iOS (Swift or Objective-C), this value MUST be equal
  579. // to the [vendor
  580. // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
  581. // On Android (Java or Kotlin), this value MUST be equal to the Firebase
  582. // Installation ID or a globally unique UUID which is persisted across
  583. // sessions in your application. More information can be found
  584. // [here](https://developer.android.com/training/articles/user-data-ids) on
  585. // best practices and exact implementation details. Caution should be taken
  586. // when storing personal data or anything which can identify a user. GDPR
  587. // and data protection laws may apply, ensure you do your own due
  588. // diligence.
  589. DeviceIDKey = attribute.Key("device.id")
  590. // DeviceModelIdentifierKey is the attribute Key conforming to the
  591. // "device.model.identifier" semantic conventions. It represents the model
  592. // identifier for the device
  593. //
  594. // Type: string
  595. // RequirementLevel: Optional
  596. // Stability: stable
  597. // Examples: 'iPhone3,4', 'SM-G920F'
  598. // Note: It's recommended this value represents a machine readable version
  599. // of the model identifier rather than the market or consumer-friendly name
  600. // of the device.
  601. DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
  602. // DeviceModelNameKey is the attribute Key conforming to the
  603. // "device.model.name" semantic conventions. It represents the marketing
  604. // name for the device model
  605. //
  606. // Type: string
  607. // RequirementLevel: Optional
  608. // Stability: stable
  609. // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
  610. // Note: It's recommended this value represents a human readable version of
  611. // the device model rather than a machine readable alternative.
  612. DeviceModelNameKey = attribute.Key("device.model.name")
  613. // DeviceManufacturerKey is the attribute Key conforming to the
  614. // "device.manufacturer" semantic conventions. It represents the name of
  615. // the device manufacturer
  616. //
  617. // Type: string
  618. // RequirementLevel: Optional
  619. // Stability: stable
  620. // Examples: 'Apple', 'Samsung'
  621. // Note: The Android OS provides this field via
  622. // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
  623. // iOS apps SHOULD hardcode the value `Apple`.
  624. DeviceManufacturerKey = attribute.Key("device.manufacturer")
  625. )
  626. // DeviceID returns an attribute KeyValue conforming to the "device.id"
  627. // semantic conventions. It represents a unique identifier representing the
  628. // device
  629. func DeviceID(val string) attribute.KeyValue {
  630. return DeviceIDKey.String(val)
  631. }
  632. // DeviceModelIdentifier returns an attribute KeyValue conforming to the
  633. // "device.model.identifier" semantic conventions. It represents the model
  634. // identifier for the device
  635. func DeviceModelIdentifier(val string) attribute.KeyValue {
  636. return DeviceModelIdentifierKey.String(val)
  637. }
  638. // DeviceModelName returns an attribute KeyValue conforming to the
  639. // "device.model.name" semantic conventions. It represents the marketing name
  640. // for the device model
  641. func DeviceModelName(val string) attribute.KeyValue {
  642. return DeviceModelNameKey.String(val)
  643. }
  644. // DeviceManufacturer returns an attribute KeyValue conforming to the
  645. // "device.manufacturer" semantic conventions. It represents the name of the
  646. // device manufacturer
  647. func DeviceManufacturer(val string) attribute.KeyValue {
  648. return DeviceManufacturerKey.String(val)
  649. }
  650. // A serverless instance.
  651. const (
  652. // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
  653. // conventions. It represents the name of the single function that this
  654. // runtime instance executes.
  655. //
  656. // Type: string
  657. // RequirementLevel: Required
  658. // Stability: stable
  659. // Examples: 'my-function', 'myazurefunctionapp/some-function-name'
  660. // Note: This is the name of the function as configured/deployed on the
  661. // FaaS
  662. // platform and is usually different from the name of the callback
  663. // function (which may be stored in the
  664. // [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes)
  665. // span attributes).
  666. //
  667. // For some cloud providers, the above definition is ambiguous. The
  668. // following
  669. // definition of function name MUST be used for this attribute
  670. // (and consequently the span name) for the listed cloud
  671. // providers/products:
  672. //
  673. // * **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
  674. // followed by a forward slash followed by the function name (this form
  675. // can also be seen in the resource JSON for the function).
  676. // This means that a span attribute MUST be used, as an Azure function
  677. // app can host multiple functions that would usually share
  678. // a TracerProvider (see also the `faas.id` attribute).
  679. FaaSNameKey = attribute.Key("faas.name")
  680. // FaaSIDKey is the attribute Key conforming to the "faas.id" semantic
  681. // conventions. It represents the unique ID of the single function that
  682. // this runtime instance executes.
  683. //
  684. // Type: string
  685. // RequirementLevel: Optional
  686. // Stability: stable
  687. // Examples: 'arn:aws:lambda:us-west-2:123456789012:function:my-function'
  688. // Note: On some cloud providers, it may not be possible to determine the
  689. // full ID at startup,
  690. // so consider setting `faas.id` as a span attribute instead.
  691. //
  692. // The exact value to use for `faas.id` depends on the cloud provider:
  693. //
  694. // * **AWS Lambda:** The function
  695. // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  696. // Take care not to use the "invoked ARN" directly but replace any
  697. // [alias
  698. // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
  699. // with the resolved function version, as the same runtime instance may
  700. // be invokable with
  701. // multiple different aliases.
  702. // * **GCP:** The [URI of the
  703. // resource](https://cloud.google.com/iam/docs/full-resource-names)
  704. // * **Azure:** The [Fully Qualified Resource
  705. // ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id)
  706. // of the invoked function,
  707. // *not* the function app, having the form
  708. // `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
  709. // This means that a span attribute MUST be used, as an Azure function
  710. // app can host multiple functions that would usually share
  711. // a TracerProvider.
  712. FaaSIDKey = attribute.Key("faas.id")
  713. // FaaSVersionKey is the attribute Key conforming to the "faas.version"
  714. // semantic conventions. It represents the immutable version of the
  715. // function being executed.
  716. //
  717. // Type: string
  718. // RequirementLevel: Optional
  719. // Stability: stable
  720. // Examples: '26', 'pinkfroid-00002'
  721. // Note: Depending on the cloud provider and platform, use:
  722. //
  723. // * **AWS Lambda:** The [function
  724. // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
  725. // (an integer represented as a decimal string).
  726. // * **Google Cloud Run:** The
  727. // [revision](https://cloud.google.com/run/docs/managing/revisions)
  728. // (i.e., the function name plus the revision suffix).
  729. // * **Google Cloud Functions:** The value of the
  730. // [`K_REVISION` environment
  731. // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
  732. // * **Azure Functions:** Not applicable. Do not set this attribute.
  733. FaaSVersionKey = attribute.Key("faas.version")
  734. // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
  735. // semantic conventions. It represents the execution environment ID as a
  736. // string, that will be potentially reused for other invocations to the
  737. // same function/function version.
  738. //
  739. // Type: string
  740. // RequirementLevel: Optional
  741. // Stability: stable
  742. // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
  743. // Note: * **AWS Lambda:** Use the (full) log stream name.
  744. FaaSInstanceKey = attribute.Key("faas.instance")
  745. // FaaSMaxMemoryKey is the attribute Key conforming to the
  746. // "faas.max_memory" semantic conventions. It represents the amount of
  747. // memory available to the serverless function in MiB.
  748. //
  749. // Type: int
  750. // RequirementLevel: Optional
  751. // Stability: stable
  752. // Examples: 128
  753. // Note: It's recommended to set this attribute since e.g. too little
  754. // memory can easily stop a Java AWS Lambda function from working
  755. // correctly. On AWS Lambda, the environment variable
  756. // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.
  757. FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
  758. )
  759. // FaaSName returns an attribute KeyValue conforming to the "faas.name"
  760. // semantic conventions. It represents the name of the single function that
  761. // this runtime instance executes.
  762. func FaaSName(val string) attribute.KeyValue {
  763. return FaaSNameKey.String(val)
  764. }
  765. // FaaSID returns an attribute KeyValue conforming to the "faas.id" semantic
  766. // conventions. It represents the unique ID of the single function that this
  767. // runtime instance executes.
  768. func FaaSID(val string) attribute.KeyValue {
  769. return FaaSIDKey.String(val)
  770. }
  771. // FaaSVersion returns an attribute KeyValue conforming to the
  772. // "faas.version" semantic conventions. It represents the immutable version of
  773. // the function being executed.
  774. func FaaSVersion(val string) attribute.KeyValue {
  775. return FaaSVersionKey.String(val)
  776. }
  777. // FaaSInstance returns an attribute KeyValue conforming to the
  778. // "faas.instance" semantic conventions. It represents the execution
  779. // environment ID as a string, that will be potentially reused for other
  780. // invocations to the same function/function version.
  781. func FaaSInstance(val string) attribute.KeyValue {
  782. return FaaSInstanceKey.String(val)
  783. }
  784. // FaaSMaxMemory returns an attribute KeyValue conforming to the
  785. // "faas.max_memory" semantic conventions. It represents the amount of memory
  786. // available to the serverless function in MiB.
  787. func FaaSMaxMemory(val int) attribute.KeyValue {
  788. return FaaSMaxMemoryKey.Int(val)
  789. }
  790. // A host is defined as a general computing instance.
  791. const (
  792. // HostIDKey is the attribute Key conforming to the "host.id" semantic
  793. // conventions. It represents the unique host ID. For Cloud, this must be
  794. // the instance_id assigned by the cloud provider. For non-containerized
  795. // Linux systems, the `machine-id` located in `/etc/machine-id` or
  796. // `/var/lib/dbus/machine-id` may be used.
  797. //
  798. // Type: string
  799. // RequirementLevel: Optional
  800. // Stability: stable
  801. // Examples: 'fdbf79e8af94cb7f9e8df36789187052'
  802. HostIDKey = attribute.Key("host.id")
  803. // HostNameKey is the attribute Key conforming to the "host.name" semantic
  804. // conventions. It represents the name of the host. On Unix systems, it may
  805. // contain what the hostname command returns, or the fully qualified
  806. // hostname, or another name specified by the user.
  807. //
  808. // Type: string
  809. // RequirementLevel: Optional
  810. // Stability: stable
  811. // Examples: 'opentelemetry-test'
  812. HostNameKey = attribute.Key("host.name")
  813. // HostTypeKey is the attribute Key conforming to the "host.type" semantic
  814. // conventions. It represents the type of host. For Cloud, this must be the
  815. // machine type.
  816. //
  817. // Type: string
  818. // RequirementLevel: Optional
  819. // Stability: stable
  820. // Examples: 'n1-standard-1'
  821. HostTypeKey = attribute.Key("host.type")
  822. // HostArchKey is the attribute Key conforming to the "host.arch" semantic
  823. // conventions. It represents the CPU architecture the host system is
  824. // running on.
  825. //
  826. // Type: Enum
  827. // RequirementLevel: Optional
  828. // Stability: stable
  829. HostArchKey = attribute.Key("host.arch")
  830. // HostImageNameKey is the attribute Key conforming to the
  831. // "host.image.name" semantic conventions. It represents the name of the VM
  832. // image or OS install the host was instantiated from.
  833. //
  834. // Type: string
  835. // RequirementLevel: Optional
  836. // Stability: stable
  837. // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
  838. HostImageNameKey = attribute.Key("host.image.name")
  839. // HostImageIDKey is the attribute Key conforming to the "host.image.id"
  840. // semantic conventions. It represents the vM image ID. For Cloud, this
  841. // value is from the provider.
  842. //
  843. // Type: string
  844. // RequirementLevel: Optional
  845. // Stability: stable
  846. // Examples: 'ami-07b06b442921831e5'
  847. HostImageIDKey = attribute.Key("host.image.id")
  848. // HostImageVersionKey is the attribute Key conforming to the
  849. // "host.image.version" semantic conventions. It represents the version
  850. // string of the VM image as defined in [Version
  851. // Attributes](README.md#version-attributes).
  852. //
  853. // Type: string
  854. // RequirementLevel: Optional
  855. // Stability: stable
  856. // Examples: '0.1'
  857. HostImageVersionKey = attribute.Key("host.image.version")
  858. )
  859. var (
  860. // AMD64
  861. HostArchAMD64 = HostArchKey.String("amd64")
  862. // ARM32
  863. HostArchARM32 = HostArchKey.String("arm32")
  864. // ARM64
  865. HostArchARM64 = HostArchKey.String("arm64")
  866. // Itanium
  867. HostArchIA64 = HostArchKey.String("ia64")
  868. // 32-bit PowerPC
  869. HostArchPPC32 = HostArchKey.String("ppc32")
  870. // 64-bit PowerPC
  871. HostArchPPC64 = HostArchKey.String("ppc64")
  872. // IBM z/Architecture
  873. HostArchS390x = HostArchKey.String("s390x")
  874. // 32-bit x86
  875. HostArchX86 = HostArchKey.String("x86")
  876. )
  877. // HostID returns an attribute KeyValue conforming to the "host.id" semantic
  878. // conventions. It represents the unique host ID. For Cloud, this must be the
  879. // instance_id assigned by the cloud provider. For non-containerized Linux
  880. // systems, the `machine-id` located in `/etc/machine-id` or
  881. // `/var/lib/dbus/machine-id` may be used.
  882. func HostID(val string) attribute.KeyValue {
  883. return HostIDKey.String(val)
  884. }
  885. // HostName returns an attribute KeyValue conforming to the "host.name"
  886. // semantic conventions. It represents the name of the host. On Unix systems,
  887. // it may contain what the hostname command returns, or the fully qualified
  888. // hostname, or another name specified by the user.
  889. func HostName(val string) attribute.KeyValue {
  890. return HostNameKey.String(val)
  891. }
  892. // HostType returns an attribute KeyValue conforming to the "host.type"
  893. // semantic conventions. It represents the type of host. For Cloud, this must
  894. // be the machine type.
  895. func HostType(val string) attribute.KeyValue {
  896. return HostTypeKey.String(val)
  897. }
  898. // HostImageName returns an attribute KeyValue conforming to the
  899. // "host.image.name" semantic conventions. It represents the name of the VM
  900. // image or OS install the host was instantiated from.
  901. func HostImageName(val string) attribute.KeyValue {
  902. return HostImageNameKey.String(val)
  903. }
  904. // HostImageID returns an attribute KeyValue conforming to the
  905. // "host.image.id" semantic conventions. It represents the vM image ID. For
  906. // Cloud, this value is from the provider.
  907. func HostImageID(val string) attribute.KeyValue {
  908. return HostImageIDKey.String(val)
  909. }
  910. // HostImageVersion returns an attribute KeyValue conforming to the
  911. // "host.image.version" semantic conventions. It represents the version string
  912. // of the VM image as defined in [Version
  913. // Attributes](README.md#version-attributes).
  914. func HostImageVersion(val string) attribute.KeyValue {
  915. return HostImageVersionKey.String(val)
  916. }
  917. // A Kubernetes Cluster.
  918. const (
  919. // K8SClusterNameKey is the attribute Key conforming to the
  920. // "k8s.cluster.name" semantic conventions. It represents the name of the
  921. // cluster.
  922. //
  923. // Type: string
  924. // RequirementLevel: Optional
  925. // Stability: stable
  926. // Examples: 'opentelemetry-cluster'
  927. K8SClusterNameKey = attribute.Key("k8s.cluster.name")
  928. )
  929. // K8SClusterName returns an attribute KeyValue conforming to the
  930. // "k8s.cluster.name" semantic conventions. It represents the name of the
  931. // cluster.
  932. func K8SClusterName(val string) attribute.KeyValue {
  933. return K8SClusterNameKey.String(val)
  934. }
  935. // A Kubernetes Node object.
  936. const (
  937. // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
  938. // semantic conventions. It represents the name of the Node.
  939. //
  940. // Type: string
  941. // RequirementLevel: Optional
  942. // Stability: stable
  943. // Examples: 'node-1'
  944. K8SNodeNameKey = attribute.Key("k8s.node.name")
  945. // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
  946. // semantic conventions. It represents the UID of the Node.
  947. //
  948. // Type: string
  949. // RequirementLevel: Optional
  950. // Stability: stable
  951. // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
  952. K8SNodeUIDKey = attribute.Key("k8s.node.uid")
  953. )
  954. // K8SNodeName returns an attribute KeyValue conforming to the
  955. // "k8s.node.name" semantic conventions. It represents the name of the Node.
  956. func K8SNodeName(val string) attribute.KeyValue {
  957. return K8SNodeNameKey.String(val)
  958. }
  959. // K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
  960. // semantic conventions. It represents the UID of the Node.
  961. func K8SNodeUID(val string) attribute.KeyValue {
  962. return K8SNodeUIDKey.String(val)
  963. }
  964. // A Kubernetes Namespace.
  965. const (
  966. // K8SNamespaceNameKey is the attribute Key conforming to the
  967. // "k8s.namespace.name" semantic conventions. It represents the name of the
  968. // namespace that the pod is running in.
  969. //
  970. // Type: string
  971. // RequirementLevel: Optional
  972. // Stability: stable
  973. // Examples: 'default'
  974. K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
  975. )
  976. // K8SNamespaceName returns an attribute KeyValue conforming to the
  977. // "k8s.namespace.name" semantic conventions. It represents the name of the
  978. // namespace that the pod is running in.
  979. func K8SNamespaceName(val string) attribute.KeyValue {
  980. return K8SNamespaceNameKey.String(val)
  981. }
  982. // A Kubernetes Pod object.
  983. const (
  984. // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
  985. // semantic conventions. It represents the UID of the Pod.
  986. //
  987. // Type: string
  988. // RequirementLevel: Optional
  989. // Stability: stable
  990. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  991. K8SPodUIDKey = attribute.Key("k8s.pod.uid")
  992. // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
  993. // semantic conventions. It represents the name of the Pod.
  994. //
  995. // Type: string
  996. // RequirementLevel: Optional
  997. // Stability: stable
  998. // Examples: 'opentelemetry-pod-autoconf'
  999. K8SPodNameKey = attribute.Key("k8s.pod.name")
  1000. )
  1001. // K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
  1002. // semantic conventions. It represents the UID of the Pod.
  1003. func K8SPodUID(val string) attribute.KeyValue {
  1004. return K8SPodUIDKey.String(val)
  1005. }
  1006. // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
  1007. // semantic conventions. It represents the name of the Pod.
  1008. func K8SPodName(val string) attribute.KeyValue {
  1009. return K8SPodNameKey.String(val)
  1010. }
  1011. // A container in a
  1012. // [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates).
  1013. const (
  1014. // K8SContainerNameKey is the attribute Key conforming to the
  1015. // "k8s.container.name" semantic conventions. It represents the name of the
  1016. // Container from Pod specification, must be unique within a Pod. Container
  1017. // runtime usually uses different globally unique name (`container.name`).
  1018. //
  1019. // Type: string
  1020. // RequirementLevel: Optional
  1021. // Stability: stable
  1022. // Examples: 'redis'
  1023. K8SContainerNameKey = attribute.Key("k8s.container.name")
  1024. // K8SContainerRestartCountKey is the attribute Key conforming to the
  1025. // "k8s.container.restart_count" semantic conventions. It represents the
  1026. // number of times the container was restarted. This attribute can be used
  1027. // to identify a particular container (running or stopped) within a
  1028. // container spec.
  1029. //
  1030. // Type: int
  1031. // RequirementLevel: Optional
  1032. // Stability: stable
  1033. // Examples: 0, 2
  1034. K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
  1035. )
  1036. // K8SContainerName returns an attribute KeyValue conforming to the
  1037. // "k8s.container.name" semantic conventions. It represents the name of the
  1038. // Container from Pod specification, must be unique within a Pod. Container
  1039. // runtime usually uses different globally unique name (`container.name`).
  1040. func K8SContainerName(val string) attribute.KeyValue {
  1041. return K8SContainerNameKey.String(val)
  1042. }
  1043. // K8SContainerRestartCount returns an attribute KeyValue conforming to the
  1044. // "k8s.container.restart_count" semantic conventions. It represents the number
  1045. // of times the container was restarted. This attribute can be used to identify
  1046. // a particular container (running or stopped) within a container spec.
  1047. func K8SContainerRestartCount(val int) attribute.KeyValue {
  1048. return K8SContainerRestartCountKey.Int(val)
  1049. }
  1050. // A Kubernetes ReplicaSet object.
  1051. const (
  1052. // K8SReplicaSetUIDKey is the attribute Key conforming to the
  1053. // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
  1054. // ReplicaSet.
  1055. //
  1056. // Type: string
  1057. // RequirementLevel: Optional
  1058. // Stability: stable
  1059. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1060. K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
  1061. // K8SReplicaSetNameKey is the attribute Key conforming to the
  1062. // "k8s.replicaset.name" semantic conventions. It represents the name of
  1063. // the ReplicaSet.
  1064. //
  1065. // Type: string
  1066. // RequirementLevel: Optional
  1067. // Stability: stable
  1068. // Examples: 'opentelemetry'
  1069. K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
  1070. )
  1071. // K8SReplicaSetUID returns an attribute KeyValue conforming to the
  1072. // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
  1073. // ReplicaSet.
  1074. func K8SReplicaSetUID(val string) attribute.KeyValue {
  1075. return K8SReplicaSetUIDKey.String(val)
  1076. }
  1077. // K8SReplicaSetName returns an attribute KeyValue conforming to the
  1078. // "k8s.replicaset.name" semantic conventions. It represents the name of the
  1079. // ReplicaSet.
  1080. func K8SReplicaSetName(val string) attribute.KeyValue {
  1081. return K8SReplicaSetNameKey.String(val)
  1082. }
  1083. // A Kubernetes Deployment object.
  1084. const (
  1085. // K8SDeploymentUIDKey is the attribute Key conforming to the
  1086. // "k8s.deployment.uid" semantic conventions. It represents the UID of the
  1087. // Deployment.
  1088. //
  1089. // Type: string
  1090. // RequirementLevel: Optional
  1091. // Stability: stable
  1092. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1093. K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
  1094. // K8SDeploymentNameKey is the attribute Key conforming to the
  1095. // "k8s.deployment.name" semantic conventions. It represents the name of
  1096. // the Deployment.
  1097. //
  1098. // Type: string
  1099. // RequirementLevel: Optional
  1100. // Stability: stable
  1101. // Examples: 'opentelemetry'
  1102. K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
  1103. )
  1104. // K8SDeploymentUID returns an attribute KeyValue conforming to the
  1105. // "k8s.deployment.uid" semantic conventions. It represents the UID of the
  1106. // Deployment.
  1107. func K8SDeploymentUID(val string) attribute.KeyValue {
  1108. return K8SDeploymentUIDKey.String(val)
  1109. }
  1110. // K8SDeploymentName returns an attribute KeyValue conforming to the
  1111. // "k8s.deployment.name" semantic conventions. It represents the name of the
  1112. // Deployment.
  1113. func K8SDeploymentName(val string) attribute.KeyValue {
  1114. return K8SDeploymentNameKey.String(val)
  1115. }
  1116. // A Kubernetes StatefulSet object.
  1117. const (
  1118. // K8SStatefulSetUIDKey is the attribute Key conforming to the
  1119. // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
  1120. // StatefulSet.
  1121. //
  1122. // Type: string
  1123. // RequirementLevel: Optional
  1124. // Stability: stable
  1125. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1126. K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
  1127. // K8SStatefulSetNameKey is the attribute Key conforming to the
  1128. // "k8s.statefulset.name" semantic conventions. It represents the name of
  1129. // the StatefulSet.
  1130. //
  1131. // Type: string
  1132. // RequirementLevel: Optional
  1133. // Stability: stable
  1134. // Examples: 'opentelemetry'
  1135. K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
  1136. )
  1137. // K8SStatefulSetUID returns an attribute KeyValue conforming to the
  1138. // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
  1139. // StatefulSet.
  1140. func K8SStatefulSetUID(val string) attribute.KeyValue {
  1141. return K8SStatefulSetUIDKey.String(val)
  1142. }
  1143. // K8SStatefulSetName returns an attribute KeyValue conforming to the
  1144. // "k8s.statefulset.name" semantic conventions. It represents the name of the
  1145. // StatefulSet.
  1146. func K8SStatefulSetName(val string) attribute.KeyValue {
  1147. return K8SStatefulSetNameKey.String(val)
  1148. }
  1149. // A Kubernetes DaemonSet object.
  1150. const (
  1151. // K8SDaemonSetUIDKey is the attribute Key conforming to the
  1152. // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
  1153. // DaemonSet.
  1154. //
  1155. // Type: string
  1156. // RequirementLevel: Optional
  1157. // Stability: stable
  1158. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1159. K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
  1160. // K8SDaemonSetNameKey is the attribute Key conforming to the
  1161. // "k8s.daemonset.name" semantic conventions. It represents the name of the
  1162. // DaemonSet.
  1163. //
  1164. // Type: string
  1165. // RequirementLevel: Optional
  1166. // Stability: stable
  1167. // Examples: 'opentelemetry'
  1168. K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
  1169. )
  1170. // K8SDaemonSetUID returns an attribute KeyValue conforming to the
  1171. // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
  1172. // DaemonSet.
  1173. func K8SDaemonSetUID(val string) attribute.KeyValue {
  1174. return K8SDaemonSetUIDKey.String(val)
  1175. }
  1176. // K8SDaemonSetName returns an attribute KeyValue conforming to the
  1177. // "k8s.daemonset.name" semantic conventions. It represents the name of the
  1178. // DaemonSet.
  1179. func K8SDaemonSetName(val string) attribute.KeyValue {
  1180. return K8SDaemonSetNameKey.String(val)
  1181. }
  1182. // A Kubernetes Job object.
  1183. const (
  1184. // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
  1185. // semantic conventions. It represents the UID of the Job.
  1186. //
  1187. // Type: string
  1188. // RequirementLevel: Optional
  1189. // Stability: stable
  1190. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1191. K8SJobUIDKey = attribute.Key("k8s.job.uid")
  1192. // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
  1193. // semantic conventions. It represents the name of the Job.
  1194. //
  1195. // Type: string
  1196. // RequirementLevel: Optional
  1197. // Stability: stable
  1198. // Examples: 'opentelemetry'
  1199. K8SJobNameKey = attribute.Key("k8s.job.name")
  1200. )
  1201. // K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
  1202. // semantic conventions. It represents the UID of the Job.
  1203. func K8SJobUID(val string) attribute.KeyValue {
  1204. return K8SJobUIDKey.String(val)
  1205. }
  1206. // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
  1207. // semantic conventions. It represents the name of the Job.
  1208. func K8SJobName(val string) attribute.KeyValue {
  1209. return K8SJobNameKey.String(val)
  1210. }
  1211. // A Kubernetes CronJob object.
  1212. const (
  1213. // K8SCronJobUIDKey is the attribute Key conforming to the
  1214. // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
  1215. // CronJob.
  1216. //
  1217. // Type: string
  1218. // RequirementLevel: Optional
  1219. // Stability: stable
  1220. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1221. K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
  1222. // K8SCronJobNameKey is the attribute Key conforming to the
  1223. // "k8s.cronjob.name" semantic conventions. It represents the name of the
  1224. // CronJob.
  1225. //
  1226. // Type: string
  1227. // RequirementLevel: Optional
  1228. // Stability: stable
  1229. // Examples: 'opentelemetry'
  1230. K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
  1231. )
  1232. // K8SCronJobUID returns an attribute KeyValue conforming to the
  1233. // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
  1234. // CronJob.
  1235. func K8SCronJobUID(val string) attribute.KeyValue {
  1236. return K8SCronJobUIDKey.String(val)
  1237. }
  1238. // K8SCronJobName returns an attribute KeyValue conforming to the
  1239. // "k8s.cronjob.name" semantic conventions. It represents the name of the
  1240. // CronJob.
  1241. func K8SCronJobName(val string) attribute.KeyValue {
  1242. return K8SCronJobNameKey.String(val)
  1243. }
  1244. // The operating system (OS) on which the process represented by this resource
  1245. // is running.
  1246. const (
  1247. // OSTypeKey is the attribute Key conforming to the "os.type" semantic
  1248. // conventions. It represents the operating system type.
  1249. //
  1250. // Type: Enum
  1251. // RequirementLevel: Required
  1252. // Stability: stable
  1253. OSTypeKey = attribute.Key("os.type")
  1254. // OSDescriptionKey is the attribute Key conforming to the "os.description"
  1255. // semantic conventions. It represents the human readable (not intended to
  1256. // be parsed) OS version information, like e.g. reported by `ver` or
  1257. // `lsb_release -a` commands.
  1258. //
  1259. // Type: string
  1260. // RequirementLevel: Optional
  1261. // Stability: stable
  1262. // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
  1263. // LTS'
  1264. OSDescriptionKey = attribute.Key("os.description")
  1265. // OSNameKey is the attribute Key conforming to the "os.name" semantic
  1266. // conventions. It represents the human readable operating system name.
  1267. //
  1268. // Type: string
  1269. // RequirementLevel: Optional
  1270. // Stability: stable
  1271. // Examples: 'iOS', 'Android', 'Ubuntu'
  1272. OSNameKey = attribute.Key("os.name")
  1273. // OSVersionKey is the attribute Key conforming to the "os.version"
  1274. // semantic conventions. It represents the version string of the operating
  1275. // system as defined in [Version
  1276. // Attributes](../../resource/semantic_conventions/README.md#version-attributes).
  1277. //
  1278. // Type: string
  1279. // RequirementLevel: Optional
  1280. // Stability: stable
  1281. // Examples: '14.2.1', '18.04.1'
  1282. OSVersionKey = attribute.Key("os.version")
  1283. )
  1284. var (
  1285. // Microsoft Windows
  1286. OSTypeWindows = OSTypeKey.String("windows")
  1287. // Linux
  1288. OSTypeLinux = OSTypeKey.String("linux")
  1289. // Apple Darwin
  1290. OSTypeDarwin = OSTypeKey.String("darwin")
  1291. // FreeBSD
  1292. OSTypeFreeBSD = OSTypeKey.String("freebsd")
  1293. // NetBSD
  1294. OSTypeNetBSD = OSTypeKey.String("netbsd")
  1295. // OpenBSD
  1296. OSTypeOpenBSD = OSTypeKey.String("openbsd")
  1297. // DragonFly BSD
  1298. OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
  1299. // HP-UX (Hewlett Packard Unix)
  1300. OSTypeHPUX = OSTypeKey.String("hpux")
  1301. // AIX (Advanced Interactive eXecutive)
  1302. OSTypeAIX = OSTypeKey.String("aix")
  1303. // SunOS, Oracle Solaris
  1304. OSTypeSolaris = OSTypeKey.String("solaris")
  1305. // IBM z/OS
  1306. OSTypeZOS = OSTypeKey.String("z_os")
  1307. )
  1308. // OSDescription returns an attribute KeyValue conforming to the
  1309. // "os.description" semantic conventions. It represents the human readable (not
  1310. // intended to be parsed) OS version information, like e.g. reported by `ver`
  1311. // or `lsb_release -a` commands.
  1312. func OSDescription(val string) attribute.KeyValue {
  1313. return OSDescriptionKey.String(val)
  1314. }
  1315. // OSName returns an attribute KeyValue conforming to the "os.name" semantic
  1316. // conventions. It represents the human readable operating system name.
  1317. func OSName(val string) attribute.KeyValue {
  1318. return OSNameKey.String(val)
  1319. }
  1320. // OSVersion returns an attribute KeyValue conforming to the "os.version"
  1321. // semantic conventions. It represents the version string of the operating
  1322. // system as defined in [Version
  1323. // Attributes](../../resource/semantic_conventions/README.md#version-attributes).
  1324. func OSVersion(val string) attribute.KeyValue {
  1325. return OSVersionKey.String(val)
  1326. }
  1327. // An operating system process.
  1328. const (
  1329. // ProcessPIDKey is the attribute Key conforming to the "process.pid"
  1330. // semantic conventions. It represents the process identifier (PID).
  1331. //
  1332. // Type: int
  1333. // RequirementLevel: Optional
  1334. // Stability: stable
  1335. // Examples: 1234
  1336. ProcessPIDKey = attribute.Key("process.pid")
  1337. // ProcessParentPIDKey is the attribute Key conforming to the
  1338. // "process.parent_pid" semantic conventions. It represents the parent
  1339. // Process identifier (PID).
  1340. //
  1341. // Type: int
  1342. // RequirementLevel: Optional
  1343. // Stability: stable
  1344. // Examples: 111
  1345. ProcessParentPIDKey = attribute.Key("process.parent_pid")
  1346. // ProcessExecutableNameKey is the attribute Key conforming to the
  1347. // "process.executable.name" semantic conventions. It represents the name
  1348. // of the process executable. On Linux based systems, can be set to the
  1349. // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
  1350. // of `GetProcessImageFileNameW`.
  1351. //
  1352. // Type: string
  1353. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1354. // below.)
  1355. // Stability: stable
  1356. // Examples: 'otelcol'
  1357. ProcessExecutableNameKey = attribute.Key("process.executable.name")
  1358. // ProcessExecutablePathKey is the attribute Key conforming to the
  1359. // "process.executable.path" semantic conventions. It represents the full
  1360. // path to the process executable. On Linux based systems, can be set to
  1361. // the target of `proc/[pid]/exe`. On Windows, can be set to the result of
  1362. // `GetProcessImageFileNameW`.
  1363. //
  1364. // Type: string
  1365. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1366. // below.)
  1367. // Stability: stable
  1368. // Examples: '/usr/bin/cmd/otelcol'
  1369. ProcessExecutablePathKey = attribute.Key("process.executable.path")
  1370. // ProcessCommandKey is the attribute Key conforming to the
  1371. // "process.command" semantic conventions. It represents the command used
  1372. // to launch the process (i.e. the command name). On Linux based systems,
  1373. // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
  1374. // be set to the first parameter extracted from `GetCommandLineW`.
  1375. //
  1376. // Type: string
  1377. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1378. // below.)
  1379. // Stability: stable
  1380. // Examples: 'cmd/otelcol'
  1381. ProcessCommandKey = attribute.Key("process.command")
  1382. // ProcessCommandLineKey is the attribute Key conforming to the
  1383. // "process.command_line" semantic conventions. It represents the full
  1384. // command used to launch the process as a single string representing the
  1385. // full command. On Windows, can be set to the result of `GetCommandLineW`.
  1386. // Do not set this if you have to assemble it just for monitoring; use
  1387. // `process.command_args` instead.
  1388. //
  1389. // Type: string
  1390. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1391. // below.)
  1392. // Stability: stable
  1393. // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
  1394. ProcessCommandLineKey = attribute.Key("process.command_line")
  1395. // ProcessCommandArgsKey is the attribute Key conforming to the
  1396. // "process.command_args" semantic conventions. It represents the all the
  1397. // command arguments (including the command/executable itself) as received
  1398. // by the process. On Linux-based systems (and some other Unixoid systems
  1399. // supporting procfs), can be set according to the list of null-delimited
  1400. // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
  1401. // this would be the full argv vector passed to `main`.
  1402. //
  1403. // Type: string[]
  1404. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1405. // below.)
  1406. // Stability: stable
  1407. // Examples: 'cmd/otecol', '--config=config.yaml'
  1408. ProcessCommandArgsKey = attribute.Key("process.command_args")
  1409. // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
  1410. // semantic conventions. It represents the username of the user that owns
  1411. // the process.
  1412. //
  1413. // Type: string
  1414. // RequirementLevel: Optional
  1415. // Stability: stable
  1416. // Examples: 'root'
  1417. ProcessOwnerKey = attribute.Key("process.owner")
  1418. )
  1419. // ProcessPID returns an attribute KeyValue conforming to the "process.pid"
  1420. // semantic conventions. It represents the process identifier (PID).
  1421. func ProcessPID(val int) attribute.KeyValue {
  1422. return ProcessPIDKey.Int(val)
  1423. }
  1424. // ProcessParentPID returns an attribute KeyValue conforming to the
  1425. // "process.parent_pid" semantic conventions. It represents the parent Process
  1426. // identifier (PID).
  1427. func ProcessParentPID(val int) attribute.KeyValue {
  1428. return ProcessParentPIDKey.Int(val)
  1429. }
  1430. // ProcessExecutableName returns an attribute KeyValue conforming to the
  1431. // "process.executable.name" semantic conventions. It represents the name of
  1432. // the process executable. On Linux based systems, can be set to the `Name` in
  1433. // `proc/[pid]/status`. On Windows, can be set to the base name of
  1434. // `GetProcessImageFileNameW`.
  1435. func ProcessExecutableName(val string) attribute.KeyValue {
  1436. return ProcessExecutableNameKey.String(val)
  1437. }
  1438. // ProcessExecutablePath returns an attribute KeyValue conforming to the
  1439. // "process.executable.path" semantic conventions. It represents the full path
  1440. // to the process executable. On Linux based systems, can be set to the target
  1441. // of `proc/[pid]/exe`. On Windows, can be set to the result of
  1442. // `GetProcessImageFileNameW`.
  1443. func ProcessExecutablePath(val string) attribute.KeyValue {
  1444. return ProcessExecutablePathKey.String(val)
  1445. }
  1446. // ProcessCommand returns an attribute KeyValue conforming to the
  1447. // "process.command" semantic conventions. It represents the command used to
  1448. // launch the process (i.e. the command name). On Linux based systems, can be
  1449. // set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
  1450. // the first parameter extracted from `GetCommandLineW`.
  1451. func ProcessCommand(val string) attribute.KeyValue {
  1452. return ProcessCommandKey.String(val)
  1453. }
  1454. // ProcessCommandLine returns an attribute KeyValue conforming to the
  1455. // "process.command_line" semantic conventions. It represents the full command
  1456. // used to launch the process as a single string representing the full command.
  1457. // On Windows, can be set to the result of `GetCommandLineW`. Do not set this
  1458. // if you have to assemble it just for monitoring; use `process.command_args`
  1459. // instead.
  1460. func ProcessCommandLine(val string) attribute.KeyValue {
  1461. return ProcessCommandLineKey.String(val)
  1462. }
  1463. // ProcessCommandArgs returns an attribute KeyValue conforming to the
  1464. // "process.command_args" semantic conventions. It represents the all the
  1465. // command arguments (including the command/executable itself) as received by
  1466. // the process. On Linux-based systems (and some other Unixoid systems
  1467. // supporting procfs), can be set according to the list of null-delimited
  1468. // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
  1469. // this would be the full argv vector passed to `main`.
  1470. func ProcessCommandArgs(val ...string) attribute.KeyValue {
  1471. return ProcessCommandArgsKey.StringSlice(val)
  1472. }
  1473. // ProcessOwner returns an attribute KeyValue conforming to the
  1474. // "process.owner" semantic conventions. It represents the username of the user
  1475. // that owns the process.
  1476. func ProcessOwner(val string) attribute.KeyValue {
  1477. return ProcessOwnerKey.String(val)
  1478. }
  1479. // The single (language) runtime instance which is monitored.
  1480. const (
  1481. // ProcessRuntimeNameKey is the attribute Key conforming to the
  1482. // "process.runtime.name" semantic conventions. It represents the name of
  1483. // the runtime of this process. For compiled native binaries, this SHOULD
  1484. // be the name of the compiler.
  1485. //
  1486. // Type: string
  1487. // RequirementLevel: Optional
  1488. // Stability: stable
  1489. // Examples: 'OpenJDK Runtime Environment'
  1490. ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
  1491. // ProcessRuntimeVersionKey is the attribute Key conforming to the
  1492. // "process.runtime.version" semantic conventions. It represents the
  1493. // version of the runtime of this process, as returned by the runtime
  1494. // without modification.
  1495. //
  1496. // Type: string
  1497. // RequirementLevel: Optional
  1498. // Stability: stable
  1499. // Examples: '14.0.2'
  1500. ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
  1501. // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
  1502. // "process.runtime.description" semantic conventions. It represents an
  1503. // additional description about the runtime of the process, for example a
  1504. // specific vendor customization of the runtime environment.
  1505. //
  1506. // Type: string
  1507. // RequirementLevel: Optional
  1508. // Stability: stable
  1509. // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
  1510. ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
  1511. )
  1512. // ProcessRuntimeName returns an attribute KeyValue conforming to the
  1513. // "process.runtime.name" semantic conventions. It represents the name of the
  1514. // runtime of this process. For compiled native binaries, this SHOULD be the
  1515. // name of the compiler.
  1516. func ProcessRuntimeName(val string) attribute.KeyValue {
  1517. return ProcessRuntimeNameKey.String(val)
  1518. }
  1519. // ProcessRuntimeVersion returns an attribute KeyValue conforming to the
  1520. // "process.runtime.version" semantic conventions. It represents the version of
  1521. // the runtime of this process, as returned by the runtime without
  1522. // modification.
  1523. func ProcessRuntimeVersion(val string) attribute.KeyValue {
  1524. return ProcessRuntimeVersionKey.String(val)
  1525. }
  1526. // ProcessRuntimeDescription returns an attribute KeyValue conforming to the
  1527. // "process.runtime.description" semantic conventions. It represents an
  1528. // additional description about the runtime of the process, for example a
  1529. // specific vendor customization of the runtime environment.
  1530. func ProcessRuntimeDescription(val string) attribute.KeyValue {
  1531. return ProcessRuntimeDescriptionKey.String(val)
  1532. }
  1533. // A service instance.
  1534. const (
  1535. // ServiceNameKey is the attribute Key conforming to the "service.name"
  1536. // semantic conventions. It represents the logical name of the service.
  1537. //
  1538. // Type: string
  1539. // RequirementLevel: Required
  1540. // Stability: stable
  1541. // Examples: 'shoppingcart'
  1542. // Note: MUST be the same for all instances of horizontally scaled
  1543. // services. If the value was not specified, SDKs MUST fallback to
  1544. // `unknown_service:` concatenated with
  1545. // [`process.executable.name`](process.md#process), e.g.
  1546. // `unknown_service:bash`. If `process.executable.name` is not available,
  1547. // the value MUST be set to `unknown_service`.
  1548. ServiceNameKey = attribute.Key("service.name")
  1549. // ServiceNamespaceKey is the attribute Key conforming to the
  1550. // "service.namespace" semantic conventions. It represents a namespace for
  1551. // `service.name`.
  1552. //
  1553. // Type: string
  1554. // RequirementLevel: Optional
  1555. // Stability: stable
  1556. // Examples: 'Shop'
  1557. // Note: A string value having a meaning that helps to distinguish a group
  1558. // of services, for example the team name that owns a group of services.
  1559. // `service.name` is expected to be unique within the same namespace. If
  1560. // `service.namespace` is not specified in the Resource then `service.name`
  1561. // is expected to be unique for all services that have no explicit
  1562. // namespace defined (so the empty/unspecified namespace is simply one more
  1563. // valid namespace). Zero-length namespace string is assumed equal to
  1564. // unspecified namespace.
  1565. ServiceNamespaceKey = attribute.Key("service.namespace")
  1566. // ServiceInstanceIDKey is the attribute Key conforming to the
  1567. // "service.instance.id" semantic conventions. It represents the string ID
  1568. // of the service instance.
  1569. //
  1570. // Type: string
  1571. // RequirementLevel: Optional
  1572. // Stability: stable
  1573. // Examples: '627cc493-f310-47de-96bd-71410b7dec09'
  1574. // Note: MUST be unique for each instance of the same
  1575. // `service.namespace,service.name` pair (in other words
  1576. // `service.namespace,service.name,service.instance.id` triplet MUST be
  1577. // globally unique). The ID helps to distinguish instances of the same
  1578. // service that exist at the same time (e.g. instances of a horizontally
  1579. // scaled service). It is preferable for the ID to be persistent and stay
  1580. // the same for the lifetime of the service instance, however it is
  1581. // acceptable that the ID is ephemeral and changes during important
  1582. // lifetime events for the service (e.g. service restarts). If the service
  1583. // has no inherent unique ID that can be used as the value of this
  1584. // attribute it is recommended to generate a random Version 1 or Version 4
  1585. // RFC 4122 UUID (services aiming for reproducible UUIDs may also use
  1586. // Version 5, see RFC 4122 for more recommendations).
  1587. ServiceInstanceIDKey = attribute.Key("service.instance.id")
  1588. // ServiceVersionKey is the attribute Key conforming to the
  1589. // "service.version" semantic conventions. It represents the version string
  1590. // of the service API or implementation.
  1591. //
  1592. // Type: string
  1593. // RequirementLevel: Optional
  1594. // Stability: stable
  1595. // Examples: '2.0.0'
  1596. ServiceVersionKey = attribute.Key("service.version")
  1597. )
  1598. // ServiceName returns an attribute KeyValue conforming to the
  1599. // "service.name" semantic conventions. It represents the logical name of the
  1600. // service.
  1601. func ServiceName(val string) attribute.KeyValue {
  1602. return ServiceNameKey.String(val)
  1603. }
  1604. // ServiceNamespace returns an attribute KeyValue conforming to the
  1605. // "service.namespace" semantic conventions. It represents a namespace for
  1606. // `service.name`.
  1607. func ServiceNamespace(val string) attribute.KeyValue {
  1608. return ServiceNamespaceKey.String(val)
  1609. }
  1610. // ServiceInstanceID returns an attribute KeyValue conforming to the
  1611. // "service.instance.id" semantic conventions. It represents the string ID of
  1612. // the service instance.
  1613. func ServiceInstanceID(val string) attribute.KeyValue {
  1614. return ServiceInstanceIDKey.String(val)
  1615. }
  1616. // ServiceVersion returns an attribute KeyValue conforming to the
  1617. // "service.version" semantic conventions. It represents the version string of
  1618. // the service API or implementation.
  1619. func ServiceVersion(val string) attribute.KeyValue {
  1620. return ServiceVersionKey.String(val)
  1621. }
  1622. // The telemetry SDK used to capture data recorded by the instrumentation
  1623. // libraries.
  1624. const (
  1625. // TelemetrySDKNameKey is the attribute Key conforming to the
  1626. // "telemetry.sdk.name" semantic conventions. It represents the name of the
  1627. // telemetry SDK as defined above.
  1628. //
  1629. // Type: string
  1630. // RequirementLevel: Optional
  1631. // Stability: stable
  1632. // Examples: 'opentelemetry'
  1633. TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
  1634. // TelemetrySDKLanguageKey is the attribute Key conforming to the
  1635. // "telemetry.sdk.language" semantic conventions. It represents the
  1636. // language of the telemetry SDK.
  1637. //
  1638. // Type: Enum
  1639. // RequirementLevel: Optional
  1640. // Stability: stable
  1641. TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
  1642. // TelemetrySDKVersionKey is the attribute Key conforming to the
  1643. // "telemetry.sdk.version" semantic conventions. It represents the version
  1644. // string of the telemetry SDK.
  1645. //
  1646. // Type: string
  1647. // RequirementLevel: Optional
  1648. // Stability: stable
  1649. // Examples: '1.2.3'
  1650. TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
  1651. // TelemetryAutoVersionKey is the attribute Key conforming to the
  1652. // "telemetry.auto.version" semantic conventions. It represents the version
  1653. // string of the auto instrumentation agent, if used.
  1654. //
  1655. // Type: string
  1656. // RequirementLevel: Optional
  1657. // Stability: stable
  1658. // Examples: '1.2.3'
  1659. TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version")
  1660. )
  1661. var (
  1662. // cpp
  1663. TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
  1664. // dotnet
  1665. TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
  1666. // erlang
  1667. TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
  1668. // go
  1669. TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
  1670. // java
  1671. TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
  1672. // nodejs
  1673. TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
  1674. // php
  1675. TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
  1676. // python
  1677. TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
  1678. // ruby
  1679. TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
  1680. // webjs
  1681. TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
  1682. // swift
  1683. TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
  1684. )
  1685. // TelemetrySDKName returns an attribute KeyValue conforming to the
  1686. // "telemetry.sdk.name" semantic conventions. It represents the name of the
  1687. // telemetry SDK as defined above.
  1688. func TelemetrySDKName(val string) attribute.KeyValue {
  1689. return TelemetrySDKNameKey.String(val)
  1690. }
  1691. // TelemetrySDKVersion returns an attribute KeyValue conforming to the
  1692. // "telemetry.sdk.version" semantic conventions. It represents the version
  1693. // string of the telemetry SDK.
  1694. func TelemetrySDKVersion(val string) attribute.KeyValue {
  1695. return TelemetrySDKVersionKey.String(val)
  1696. }
  1697. // TelemetryAutoVersion returns an attribute KeyValue conforming to the
  1698. // "telemetry.auto.version" semantic conventions. It represents the version
  1699. // string of the auto instrumentation agent, if used.
  1700. func TelemetryAutoVersion(val string) attribute.KeyValue {
  1701. return TelemetryAutoVersionKey.String(val)
  1702. }
  1703. // Resource describing the packaged software running the application code. Web
  1704. // engines are typically executed using process.runtime.
  1705. const (
  1706. // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
  1707. // semantic conventions. It represents the name of the web engine.
  1708. //
  1709. // Type: string
  1710. // RequirementLevel: Required
  1711. // Stability: stable
  1712. // Examples: 'WildFly'
  1713. WebEngineNameKey = attribute.Key("webengine.name")
  1714. // WebEngineVersionKey is the attribute Key conforming to the
  1715. // "webengine.version" semantic conventions. It represents the version of
  1716. // the web engine.
  1717. //
  1718. // Type: string
  1719. // RequirementLevel: Optional
  1720. // Stability: stable
  1721. // Examples: '21.0.0'
  1722. WebEngineVersionKey = attribute.Key("webengine.version")
  1723. // WebEngineDescriptionKey is the attribute Key conforming to the
  1724. // "webengine.description" semantic conventions. It represents the
  1725. // additional description of the web engine (e.g. detailed version and
  1726. // edition information).
  1727. //
  1728. // Type: string
  1729. // RequirementLevel: Optional
  1730. // Stability: stable
  1731. // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
  1732. // 2.2.2.Final'
  1733. WebEngineDescriptionKey = attribute.Key("webengine.description")
  1734. )
  1735. // WebEngineName returns an attribute KeyValue conforming to the
  1736. // "webengine.name" semantic conventions. It represents the name of the web
  1737. // engine.
  1738. func WebEngineName(val string) attribute.KeyValue {
  1739. return WebEngineNameKey.String(val)
  1740. }
  1741. // WebEngineVersion returns an attribute KeyValue conforming to the
  1742. // "webengine.version" semantic conventions. It represents the version of the
  1743. // web engine.
  1744. func WebEngineVersion(val string) attribute.KeyValue {
  1745. return WebEngineVersionKey.String(val)
  1746. }
  1747. // WebEngineDescription returns an attribute KeyValue conforming to the
  1748. // "webengine.description" semantic conventions. It represents the additional
  1749. // description of the web engine (e.g. detailed version and edition
  1750. // information).
  1751. func WebEngineDescription(val string) attribute.KeyValue {
  1752. return WebEngineDescriptionKey.String(val)
  1753. }
  1754. // Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's
  1755. // concepts.
  1756. const (
  1757. // OtelScopeNameKey is the attribute Key conforming to the
  1758. // "otel.scope.name" semantic conventions. It represents the name of the
  1759. // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
  1760. //
  1761. // Type: string
  1762. // RequirementLevel: Optional
  1763. // Stability: stable
  1764. // Examples: 'io.opentelemetry.contrib.mongodb'
  1765. OtelScopeNameKey = attribute.Key("otel.scope.name")
  1766. // OtelScopeVersionKey is the attribute Key conforming to the
  1767. // "otel.scope.version" semantic conventions. It represents the version of
  1768. // the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
  1769. //
  1770. // Type: string
  1771. // RequirementLevel: Optional
  1772. // Stability: stable
  1773. // Examples: '1.0.0'
  1774. OtelScopeVersionKey = attribute.Key("otel.scope.version")
  1775. )
  1776. // OtelScopeName returns an attribute KeyValue conforming to the
  1777. // "otel.scope.name" semantic conventions. It represents the name of the
  1778. // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
  1779. func OtelScopeName(val string) attribute.KeyValue {
  1780. return OtelScopeNameKey.String(val)
  1781. }
  1782. // OtelScopeVersion returns an attribute KeyValue conforming to the
  1783. // "otel.scope.version" semantic conventions. It represents the version of the
  1784. // instrumentation scope - (`InstrumentationScope.Version` in OTLP).
  1785. func OtelScopeVersion(val string) attribute.KeyValue {
  1786. return OtelScopeVersionKey.String(val)
  1787. }
  1788. // Span attributes used by non-OTLP exporters to represent OpenTelemetry
  1789. // Scope's concepts.
  1790. const (
  1791. // OtelLibraryNameKey is the attribute Key conforming to the
  1792. // "otel.library.name" semantic conventions. It represents the deprecated,
  1793. // use the `otel.scope.name` attribute.
  1794. //
  1795. // Type: string
  1796. // RequirementLevel: Optional
  1797. // Stability: deprecated
  1798. // Examples: 'io.opentelemetry.contrib.mongodb'
  1799. OtelLibraryNameKey = attribute.Key("otel.library.name")
  1800. // OtelLibraryVersionKey is the attribute Key conforming to the
  1801. // "otel.library.version" semantic conventions. It represents the
  1802. // deprecated, use the `otel.scope.version` attribute.
  1803. //
  1804. // Type: string
  1805. // RequirementLevel: Optional
  1806. // Stability: deprecated
  1807. // Examples: '1.0.0'
  1808. OtelLibraryVersionKey = attribute.Key("otel.library.version")
  1809. )
  1810. // OtelLibraryName returns an attribute KeyValue conforming to the
  1811. // "otel.library.name" semantic conventions. It represents the deprecated, use
  1812. // the `otel.scope.name` attribute.
  1813. func OtelLibraryName(val string) attribute.KeyValue {
  1814. return OtelLibraryNameKey.String(val)
  1815. }
  1816. // OtelLibraryVersion returns an attribute KeyValue conforming to the
  1817. // "otel.library.version" semantic conventions. It represents the deprecated,
  1818. // use the `otel.scope.version` attribute.
  1819. func OtelLibraryVersion(val string) attribute.KeyValue {
  1820. return OtelLibraryVersionKey.String(val)
  1821. }