resource.go 79 KB

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