resource.go 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310
  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.21.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 Bare Metal Solution (BMS)
  258. CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
  259. // Google Cloud Compute Engine (GCE)
  260. CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
  261. // Google Cloud Run
  262. CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
  263. // Google Cloud Kubernetes Engine (GKE)
  264. CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
  265. // Google Cloud Functions (GCF)
  266. CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
  267. // Google Cloud App Engine (GAE)
  268. CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
  269. // Red Hat OpenShift on Google Cloud
  270. CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift")
  271. // Red Hat OpenShift on IBM Cloud
  272. CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
  273. // Tencent Cloud Cloud Virtual Machine (CVM)
  274. CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
  275. // Tencent Cloud Elastic Kubernetes Service (EKS)
  276. CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
  277. // Tencent Cloud Serverless Cloud Function (SCF)
  278. CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
  279. )
  280. // CloudAccountID returns an attribute KeyValue conforming to the
  281. // "cloud.account.id" semantic conventions. It represents the cloud account ID
  282. // the resource is assigned to.
  283. func CloudAccountID(val string) attribute.KeyValue {
  284. return CloudAccountIDKey.String(val)
  285. }
  286. // CloudRegion returns an attribute KeyValue conforming to the
  287. // "cloud.region" semantic conventions. It represents the geographical region
  288. // the resource is running.
  289. func CloudRegion(val string) attribute.KeyValue {
  290. return CloudRegionKey.String(val)
  291. }
  292. // CloudResourceID returns an attribute KeyValue conforming to the
  293. // "cloud.resource_id" semantic conventions. It represents the cloud
  294. // provider-specific native identifier of the monitored cloud resource (e.g. an
  295. // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
  296. // on AWS, a [fully qualified resource
  297. // ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id)
  298. // on Azure, a [full resource
  299. // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  300. // on GCP)
  301. func CloudResourceID(val string) attribute.KeyValue {
  302. return CloudResourceIDKey.String(val)
  303. }
  304. // CloudAvailabilityZone returns an attribute KeyValue conforming to the
  305. // "cloud.availability_zone" semantic conventions. It represents the cloud
  306. // regions often have multiple, isolated locations known as zones to increase
  307. // availability. Availability zone represents the zone where the resource is
  308. // running.
  309. func CloudAvailabilityZone(val string) attribute.KeyValue {
  310. return CloudAvailabilityZoneKey.String(val)
  311. }
  312. // Resources used by AWS Elastic Container Service (ECS).
  313. const (
  314. // AWSECSContainerARNKey is the attribute Key conforming to the
  315. // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
  316. // Resource Name (ARN) of an [ECS container
  317. // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
  318. //
  319. // Type: string
  320. // RequirementLevel: Optional
  321. // Stability: stable
  322. // Examples:
  323. // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'
  324. AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
  325. // AWSECSClusterARNKey is the attribute Key conforming to the
  326. // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
  327. // [ECS
  328. // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
  329. //
  330. // Type: string
  331. // RequirementLevel: Optional
  332. // Stability: stable
  333. // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
  334. AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
  335. // AWSECSLaunchtypeKey is the attribute Key conforming to the
  336. // "aws.ecs.launchtype" semantic conventions. It represents the [launch
  337. // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  338. // for an ECS task.
  339. //
  340. // Type: Enum
  341. // RequirementLevel: Optional
  342. // Stability: stable
  343. AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
  344. // AWSECSTaskARNKey is the attribute Key conforming to the
  345. // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an
  346. // [ECS task
  347. // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
  348. //
  349. // Type: string
  350. // RequirementLevel: Optional
  351. // Stability: stable
  352. // Examples:
  353. // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b'
  354. AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
  355. // AWSECSTaskFamilyKey is the attribute Key conforming to the
  356. // "aws.ecs.task.family" semantic conventions. It represents the task
  357. // definition family this task definition is a member of.
  358. //
  359. // Type: string
  360. // RequirementLevel: Optional
  361. // Stability: stable
  362. // Examples: 'opentelemetry-family'
  363. AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
  364. // AWSECSTaskRevisionKey is the attribute Key conforming to the
  365. // "aws.ecs.task.revision" semantic conventions. It represents the revision
  366. // for this task definition.
  367. //
  368. // Type: string
  369. // RequirementLevel: Optional
  370. // Stability: stable
  371. // Examples: '8', '26'
  372. AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
  373. )
  374. var (
  375. // ec2
  376. AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
  377. // fargate
  378. AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
  379. )
  380. // AWSECSContainerARN returns an attribute KeyValue conforming to the
  381. // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
  382. // Resource Name (ARN) of an [ECS container
  383. // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
  384. func AWSECSContainerARN(val string) attribute.KeyValue {
  385. return AWSECSContainerARNKey.String(val)
  386. }
  387. // AWSECSClusterARN returns an attribute KeyValue conforming to the
  388. // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS
  389. // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
  390. func AWSECSClusterARN(val string) attribute.KeyValue {
  391. return AWSECSClusterARNKey.String(val)
  392. }
  393. // AWSECSTaskARN returns an attribute KeyValue conforming to the
  394. // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS
  395. // task
  396. // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
  397. func AWSECSTaskARN(val string) attribute.KeyValue {
  398. return AWSECSTaskARNKey.String(val)
  399. }
  400. // AWSECSTaskFamily returns an attribute KeyValue conforming to the
  401. // "aws.ecs.task.family" semantic conventions. It represents the task
  402. // definition family this task definition is a member of.
  403. func AWSECSTaskFamily(val string) attribute.KeyValue {
  404. return AWSECSTaskFamilyKey.String(val)
  405. }
  406. // AWSECSTaskRevision returns an attribute KeyValue conforming to the
  407. // "aws.ecs.task.revision" semantic conventions. It represents the revision for
  408. // this task definition.
  409. func AWSECSTaskRevision(val string) attribute.KeyValue {
  410. return AWSECSTaskRevisionKey.String(val)
  411. }
  412. // Resources used by AWS Elastic Kubernetes Service (EKS).
  413. const (
  414. // AWSEKSClusterARNKey is the attribute Key conforming to the
  415. // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an
  416. // EKS cluster.
  417. //
  418. // Type: string
  419. // RequirementLevel: Optional
  420. // Stability: stable
  421. // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
  422. AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
  423. )
  424. // AWSEKSClusterARN returns an attribute KeyValue conforming to the
  425. // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
  426. // cluster.
  427. func AWSEKSClusterARN(val string) attribute.KeyValue {
  428. return AWSEKSClusterARNKey.String(val)
  429. }
  430. // Resources specific to Amazon Web Services.
  431. const (
  432. // AWSLogGroupNamesKey is the attribute Key conforming to the
  433. // "aws.log.group.names" semantic conventions. It represents the name(s) of
  434. // the AWS log group(s) an application is writing to.
  435. //
  436. // Type: string[]
  437. // RequirementLevel: Optional
  438. // Stability: stable
  439. // Examples: '/aws/lambda/my-function', 'opentelemetry-service'
  440. // Note: Multiple log groups must be supported for cases like
  441. // multi-container applications, where a single application has sidecar
  442. // containers, and each write to their own log group.
  443. AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
  444. // AWSLogGroupARNsKey is the attribute Key conforming to the
  445. // "aws.log.group.arns" semantic conventions. It represents the Amazon
  446. // Resource Name(s) (ARN) of the AWS log group(s).
  447. //
  448. // Type: string[]
  449. // RequirementLevel: Optional
  450. // Stability: stable
  451. // Examples:
  452. // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*'
  453. // Note: See the [log group ARN format
  454. // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
  455. AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
  456. // AWSLogStreamNamesKey is the attribute Key conforming to the
  457. // "aws.log.stream.names" semantic conventions. It represents the name(s)
  458. // of the AWS log stream(s) an application is writing to.
  459. //
  460. // Type: string[]
  461. // RequirementLevel: Optional
  462. // Stability: stable
  463. // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
  464. AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
  465. // AWSLogStreamARNsKey is the attribute Key conforming to the
  466. // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of
  467. // the AWS log stream(s).
  468. //
  469. // Type: string[]
  470. // RequirementLevel: Optional
  471. // Stability: stable
  472. // Examples:
  473. // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
  474. // Note: See the [log stream ARN format
  475. // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
  476. // One log group can contain several log streams, so these ARNs necessarily
  477. // identify both a log group and a log stream.
  478. AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
  479. )
  480. // AWSLogGroupNames returns an attribute KeyValue conforming to the
  481. // "aws.log.group.names" semantic conventions. It represents the name(s) of the
  482. // AWS log group(s) an application is writing to.
  483. func AWSLogGroupNames(val ...string) attribute.KeyValue {
  484. return AWSLogGroupNamesKey.StringSlice(val)
  485. }
  486. // AWSLogGroupARNs returns an attribute KeyValue conforming to the
  487. // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
  488. // Name(s) (ARN) of the AWS log group(s).
  489. func AWSLogGroupARNs(val ...string) attribute.KeyValue {
  490. return AWSLogGroupARNsKey.StringSlice(val)
  491. }
  492. // AWSLogStreamNames returns an attribute KeyValue conforming to the
  493. // "aws.log.stream.names" semantic conventions. It represents the name(s) of
  494. // the AWS log stream(s) an application is writing to.
  495. func AWSLogStreamNames(val ...string) attribute.KeyValue {
  496. return AWSLogStreamNamesKey.StringSlice(val)
  497. }
  498. // AWSLogStreamARNs returns an attribute KeyValue conforming to the
  499. // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
  500. // AWS log stream(s).
  501. func AWSLogStreamARNs(val ...string) attribute.KeyValue {
  502. return AWSLogStreamARNsKey.StringSlice(val)
  503. }
  504. // Resource used by Google Cloud Run.
  505. const (
  506. // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
  507. // "gcp.cloud_run.job.execution" semantic conventions. It represents the
  508. // name of the Cloud Run
  509. // [execution](https://cloud.google.com/run/docs/managing/job-executions)
  510. // being run for the Job, as set by the
  511. // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
  512. // environment variable.
  513. //
  514. // Type: string
  515. // RequirementLevel: Optional
  516. // Stability: stable
  517. // Examples: 'job-name-xxxx', 'sample-job-mdw84'
  518. GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
  519. // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
  520. // "gcp.cloud_run.job.task_index" semantic conventions. It represents the
  521. // index for a task within an execution as provided by the
  522. // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
  523. // environment variable.
  524. //
  525. // Type: int
  526. // RequirementLevel: Optional
  527. // Stability: stable
  528. // Examples: 0, 1
  529. GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
  530. )
  531. // GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
  532. // "gcp.cloud_run.job.execution" semantic conventions. It represents the name
  533. // of the Cloud Run
  534. // [execution](https://cloud.google.com/run/docs/managing/job-executions) being
  535. // run for the Job, as set by the
  536. // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
  537. // environment variable.
  538. func GCPCloudRunJobExecution(val string) attribute.KeyValue {
  539. return GCPCloudRunJobExecutionKey.String(val)
  540. }
  541. // GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
  542. // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
  543. // for a task within an execution as provided by the
  544. // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
  545. // environment variable.
  546. func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
  547. return GCPCloudRunJobTaskIndexKey.Int(val)
  548. }
  549. // Resources used by Google Compute Engine (GCE).
  550. const (
  551. // GCPGceInstanceNameKey is the attribute Key conforming to the
  552. // "gcp.gce.instance.name" semantic conventions. It represents the instance
  553. // name of a GCE instance. This is the value provided by `host.name`, the
  554. // visible name of the instance in the Cloud Console UI, and the prefix for
  555. // the default hostname of the instance as defined by the [default internal
  556. // DNS
  557. // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
  558. //
  559. // Type: string
  560. // RequirementLevel: Optional
  561. // Stability: stable
  562. // Examples: 'instance-1', 'my-vm-name'
  563. GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name")
  564. // GCPGceInstanceHostnameKey is the attribute Key conforming to the
  565. // "gcp.gce.instance.hostname" semantic conventions. It represents the
  566. // hostname of a GCE instance. This is the full value of the default or
  567. // [custom
  568. // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
  569. //
  570. // Type: string
  571. // RequirementLevel: Optional
  572. // Stability: stable
  573. // Examples: 'my-host1234.example.com',
  574. // 'sample-vm.us-west1-b.c.my-project.internal'
  575. GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
  576. )
  577. // GCPGceInstanceName returns an attribute KeyValue conforming to the
  578. // "gcp.gce.instance.name" semantic conventions. It represents the instance
  579. // name of a GCE instance. This is the value provided by `host.name`, the
  580. // visible name of the instance in the Cloud Console UI, and the prefix for the
  581. // default hostname of the instance as defined by the [default internal DNS
  582. // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
  583. func GCPGceInstanceName(val string) attribute.KeyValue {
  584. return GCPGceInstanceNameKey.String(val)
  585. }
  586. // GCPGceInstanceHostname returns an attribute KeyValue conforming to the
  587. // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
  588. // of a GCE instance. This is the full value of the default or [custom
  589. // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
  590. func GCPGceInstanceHostname(val string) attribute.KeyValue {
  591. return GCPGceInstanceHostnameKey.String(val)
  592. }
  593. // Heroku dyno metadata
  594. const (
  595. // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
  596. // "heroku.release.creation_timestamp" semantic conventions. It represents
  597. // the time and date the release was created
  598. //
  599. // Type: string
  600. // RequirementLevel: Optional
  601. // Stability: stable
  602. // Examples: '2022-10-23T18:00:42Z'
  603. HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
  604. // HerokuReleaseCommitKey is the attribute Key conforming to the
  605. // "heroku.release.commit" semantic conventions. It represents the commit
  606. // hash for the current release
  607. //
  608. // Type: string
  609. // RequirementLevel: Optional
  610. // Stability: stable
  611. // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec'
  612. HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
  613. // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
  614. // semantic conventions. It represents the unique identifier for the
  615. // application
  616. //
  617. // Type: string
  618. // RequirementLevel: Optional
  619. // Stability: stable
  620. // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da'
  621. HerokuAppIDKey = attribute.Key("heroku.app.id")
  622. )
  623. // HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming
  624. // to the "heroku.release.creation_timestamp" semantic conventions. It
  625. // represents the time and date the release was created
  626. func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
  627. return HerokuReleaseCreationTimestampKey.String(val)
  628. }
  629. // HerokuReleaseCommit returns an attribute KeyValue conforming to the
  630. // "heroku.release.commit" semantic conventions. It represents the commit hash
  631. // for the current release
  632. func HerokuReleaseCommit(val string) attribute.KeyValue {
  633. return HerokuReleaseCommitKey.String(val)
  634. }
  635. // HerokuAppID returns an attribute KeyValue conforming to the
  636. // "heroku.app.id" semantic conventions. It represents the unique identifier
  637. // for the application
  638. func HerokuAppID(val string) attribute.KeyValue {
  639. return HerokuAppIDKey.String(val)
  640. }
  641. // A container instance.
  642. const (
  643. // ContainerNameKey is the attribute Key conforming to the "container.name"
  644. // semantic conventions. It represents the container name used by container
  645. // runtime.
  646. //
  647. // Type: string
  648. // RequirementLevel: Optional
  649. // Stability: stable
  650. // Examples: 'opentelemetry-autoconf'
  651. ContainerNameKey = attribute.Key("container.name")
  652. // ContainerIDKey is the attribute Key conforming to the "container.id"
  653. // semantic conventions. It represents the container ID. Usually a UUID, as
  654. // for example used to [identify Docker
  655. // containers](https://docs.docker.com/engine/reference/run/#container-identification).
  656. // The UUID might be abbreviated.
  657. //
  658. // Type: string
  659. // RequirementLevel: Optional
  660. // Stability: stable
  661. // Examples: 'a3bf90e006b2'
  662. ContainerIDKey = attribute.Key("container.id")
  663. // ContainerRuntimeKey is the attribute Key conforming to the
  664. // "container.runtime" semantic conventions. It represents the container
  665. // runtime managing this container.
  666. //
  667. // Type: string
  668. // RequirementLevel: Optional
  669. // Stability: stable
  670. // Examples: 'docker', 'containerd', 'rkt'
  671. ContainerRuntimeKey = attribute.Key("container.runtime")
  672. // ContainerImageNameKey is the attribute Key conforming to the
  673. // "container.image.name" semantic conventions. It represents the name of
  674. // the image the container was built on.
  675. //
  676. // Type: string
  677. // RequirementLevel: Optional
  678. // Stability: stable
  679. // Examples: 'gcr.io/opentelemetry/operator'
  680. ContainerImageNameKey = attribute.Key("container.image.name")
  681. // ContainerImageTagKey is the attribute Key conforming to the
  682. // "container.image.tag" semantic conventions. It represents the container
  683. // image tag.
  684. //
  685. // Type: string
  686. // RequirementLevel: Optional
  687. // Stability: stable
  688. // Examples: '0.1'
  689. ContainerImageTagKey = attribute.Key("container.image.tag")
  690. // ContainerImageIDKey is the attribute Key conforming to the
  691. // "container.image.id" semantic conventions. It represents the runtime
  692. // specific image identifier. Usually a hash algorithm followed by a UUID.
  693. //
  694. // Type: string
  695. // RequirementLevel: Optional
  696. // Stability: stable
  697. // Examples:
  698. // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'
  699. // Note: Docker defines a sha256 of the image id; `container.image.id`
  700. // corresponds to the `Image` field from the Docker container inspect
  701. // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect)
  702. // endpoint.
  703. // K8S defines a link to the container registry repository with digest
  704. // `"imageID": "registry.azurecr.io
  705. // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
  706. // OCI defines a digest of manifest.
  707. ContainerImageIDKey = attribute.Key("container.image.id")
  708. // ContainerCommandKey is the attribute Key conforming to the
  709. // "container.command" semantic conventions. It represents the command used
  710. // to run the container (i.e. the command name).
  711. //
  712. // Type: string
  713. // RequirementLevel: Optional
  714. // Stability: stable
  715. // Examples: 'otelcontribcol'
  716. // Note: If using embedded credentials or sensitive data, it is recommended
  717. // to remove them to prevent potential leakage.
  718. ContainerCommandKey = attribute.Key("container.command")
  719. // ContainerCommandLineKey is the attribute Key conforming to the
  720. // "container.command_line" semantic conventions. It represents the full
  721. // command run by the container as a single string representing the full
  722. // command. [2]
  723. //
  724. // Type: string
  725. // RequirementLevel: Optional
  726. // Stability: stable
  727. // Examples: 'otelcontribcol --config config.yaml'
  728. ContainerCommandLineKey = attribute.Key("container.command_line")
  729. // ContainerCommandArgsKey is the attribute Key conforming to the
  730. // "container.command_args" semantic conventions. It represents the all the
  731. // command arguments (including the command/executable itself) run by the
  732. // container. [2]
  733. //
  734. // Type: string[]
  735. // RequirementLevel: Optional
  736. // Stability: stable
  737. // Examples: 'otelcontribcol, --config, config.yaml'
  738. ContainerCommandArgsKey = attribute.Key("container.command_args")
  739. )
  740. // ContainerName returns an attribute KeyValue conforming to the
  741. // "container.name" semantic conventions. It represents the container name used
  742. // by container runtime.
  743. func ContainerName(val string) attribute.KeyValue {
  744. return ContainerNameKey.String(val)
  745. }
  746. // ContainerID returns an attribute KeyValue conforming to the
  747. // "container.id" semantic conventions. It represents the container ID. Usually
  748. // a UUID, as for example used to [identify Docker
  749. // containers](https://docs.docker.com/engine/reference/run/#container-identification).
  750. // The UUID might be abbreviated.
  751. func ContainerID(val string) attribute.KeyValue {
  752. return ContainerIDKey.String(val)
  753. }
  754. // ContainerRuntime returns an attribute KeyValue conforming to the
  755. // "container.runtime" semantic conventions. It represents the container
  756. // runtime managing this container.
  757. func ContainerRuntime(val string) attribute.KeyValue {
  758. return ContainerRuntimeKey.String(val)
  759. }
  760. // ContainerImageName returns an attribute KeyValue conforming to the
  761. // "container.image.name" semantic conventions. It represents the name of the
  762. // image the container was built on.
  763. func ContainerImageName(val string) attribute.KeyValue {
  764. return ContainerImageNameKey.String(val)
  765. }
  766. // ContainerImageTag returns an attribute KeyValue conforming to the
  767. // "container.image.tag" semantic conventions. It represents the container
  768. // image tag.
  769. func ContainerImageTag(val string) attribute.KeyValue {
  770. return ContainerImageTagKey.String(val)
  771. }
  772. // ContainerImageID returns an attribute KeyValue conforming to the
  773. // "container.image.id" semantic conventions. It represents the runtime
  774. // specific image identifier. Usually a hash algorithm followed by a UUID.
  775. func ContainerImageID(val string) attribute.KeyValue {
  776. return ContainerImageIDKey.String(val)
  777. }
  778. // ContainerCommand returns an attribute KeyValue conforming to the
  779. // "container.command" semantic conventions. It represents the command used to
  780. // run the container (i.e. the command name).
  781. func ContainerCommand(val string) attribute.KeyValue {
  782. return ContainerCommandKey.String(val)
  783. }
  784. // ContainerCommandLine returns an attribute KeyValue conforming to the
  785. // "container.command_line" semantic conventions. It represents the full
  786. // command run by the container as a single string representing the full
  787. // command. [2]
  788. func ContainerCommandLine(val string) attribute.KeyValue {
  789. return ContainerCommandLineKey.String(val)
  790. }
  791. // ContainerCommandArgs returns an attribute KeyValue conforming to the
  792. // "container.command_args" semantic conventions. It represents the all the
  793. // command arguments (including the command/executable itself) run by the
  794. // container. [2]
  795. func ContainerCommandArgs(val ...string) attribute.KeyValue {
  796. return ContainerCommandArgsKey.StringSlice(val)
  797. }
  798. // The software deployment.
  799. const (
  800. // DeploymentEnvironmentKey is the attribute Key conforming to the
  801. // "deployment.environment" semantic conventions. It represents the name of
  802. // the [deployment
  803. // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka
  804. // deployment tier).
  805. //
  806. // Type: string
  807. // RequirementLevel: Optional
  808. // Stability: stable
  809. // Examples: 'staging', 'production'
  810. DeploymentEnvironmentKey = attribute.Key("deployment.environment")
  811. )
  812. // DeploymentEnvironment returns an attribute KeyValue conforming to the
  813. // "deployment.environment" semantic conventions. It represents the name of the
  814. // [deployment
  815. // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka
  816. // deployment tier).
  817. func DeploymentEnvironment(val string) attribute.KeyValue {
  818. return DeploymentEnvironmentKey.String(val)
  819. }
  820. // The device on which the process represented by this resource is running.
  821. const (
  822. // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
  823. // conventions. It represents a unique identifier representing the device
  824. //
  825. // Type: string
  826. // RequirementLevel: Optional
  827. // Stability: stable
  828. // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
  829. // Note: The device identifier MUST only be defined using the values
  830. // outlined below. This value is not an advertising identifier and MUST NOT
  831. // be used as such. On iOS (Swift or Objective-C), this value MUST be equal
  832. // to the [vendor
  833. // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
  834. // On Android (Java or Kotlin), this value MUST be equal to the Firebase
  835. // Installation ID or a globally unique UUID which is persisted across
  836. // sessions in your application. More information can be found
  837. // [here](https://developer.android.com/training/articles/user-data-ids) on
  838. // best practices and exact implementation details. Caution should be taken
  839. // when storing personal data or anything which can identify a user. GDPR
  840. // and data protection laws may apply, ensure you do your own due
  841. // diligence.
  842. DeviceIDKey = attribute.Key("device.id")
  843. // DeviceModelIdentifierKey is the attribute Key conforming to the
  844. // "device.model.identifier" semantic conventions. It represents the model
  845. // identifier for the device
  846. //
  847. // Type: string
  848. // RequirementLevel: Optional
  849. // Stability: stable
  850. // Examples: 'iPhone3,4', 'SM-G920F'
  851. // Note: It's recommended this value represents a machine readable version
  852. // of the model identifier rather than the market or consumer-friendly name
  853. // of the device.
  854. DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
  855. // DeviceModelNameKey is the attribute Key conforming to the
  856. // "device.model.name" semantic conventions. It represents the marketing
  857. // name for the device model
  858. //
  859. // Type: string
  860. // RequirementLevel: Optional
  861. // Stability: stable
  862. // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
  863. // Note: It's recommended this value represents a human readable version of
  864. // the device model rather than a machine readable alternative.
  865. DeviceModelNameKey = attribute.Key("device.model.name")
  866. // DeviceManufacturerKey is the attribute Key conforming to the
  867. // "device.manufacturer" semantic conventions. It represents the name of
  868. // the device manufacturer
  869. //
  870. // Type: string
  871. // RequirementLevel: Optional
  872. // Stability: stable
  873. // Examples: 'Apple', 'Samsung'
  874. // Note: The Android OS provides this field via
  875. // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
  876. // iOS apps SHOULD hardcode the value `Apple`.
  877. DeviceManufacturerKey = attribute.Key("device.manufacturer")
  878. )
  879. // DeviceID returns an attribute KeyValue conforming to the "device.id"
  880. // semantic conventions. It represents a unique identifier representing the
  881. // device
  882. func DeviceID(val string) attribute.KeyValue {
  883. return DeviceIDKey.String(val)
  884. }
  885. // DeviceModelIdentifier returns an attribute KeyValue conforming to the
  886. // "device.model.identifier" semantic conventions. It represents the model
  887. // identifier for the device
  888. func DeviceModelIdentifier(val string) attribute.KeyValue {
  889. return DeviceModelIdentifierKey.String(val)
  890. }
  891. // DeviceModelName returns an attribute KeyValue conforming to the
  892. // "device.model.name" semantic conventions. It represents the marketing name
  893. // for the device model
  894. func DeviceModelName(val string) attribute.KeyValue {
  895. return DeviceModelNameKey.String(val)
  896. }
  897. // DeviceManufacturer returns an attribute KeyValue conforming to the
  898. // "device.manufacturer" semantic conventions. It represents the name of the
  899. // device manufacturer
  900. func DeviceManufacturer(val string) attribute.KeyValue {
  901. return DeviceManufacturerKey.String(val)
  902. }
  903. // A serverless instance.
  904. const (
  905. // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
  906. // conventions. It represents the name of the single function that this
  907. // runtime instance executes.
  908. //
  909. // Type: string
  910. // RequirementLevel: Required
  911. // Stability: stable
  912. // Examples: 'my-function', 'myazurefunctionapp/some-function-name'
  913. // Note: This is the name of the function as configured/deployed on the
  914. // FaaS
  915. // platform and is usually different from the name of the callback
  916. // function (which may be stored in the
  917. // [`code.namespace`/`code.function`](/docs/general/general-attributes.md#source-code-attributes)
  918. // span attributes).
  919. //
  920. // For some cloud providers, the above definition is ambiguous. The
  921. // following
  922. // definition of function name MUST be used for this attribute
  923. // (and consequently the span name) for the listed cloud
  924. // providers/products:
  925. //
  926. // * **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
  927. // followed by a forward slash followed by the function name (this form
  928. // can also be seen in the resource JSON for the function).
  929. // This means that a span attribute MUST be used, as an Azure function
  930. // app can host multiple functions that would usually share
  931. // a TracerProvider (see also the `cloud.resource_id` attribute).
  932. FaaSNameKey = attribute.Key("faas.name")
  933. // FaaSVersionKey is the attribute Key conforming to the "faas.version"
  934. // semantic conventions. It represents the immutable version of the
  935. // function being executed.
  936. //
  937. // Type: string
  938. // RequirementLevel: Optional
  939. // Stability: stable
  940. // Examples: '26', 'pinkfroid-00002'
  941. // Note: Depending on the cloud provider and platform, use:
  942. //
  943. // * **AWS Lambda:** The [function
  944. // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
  945. // (an integer represented as a decimal string).
  946. // * **Google Cloud Run (Services):** The
  947. // [revision](https://cloud.google.com/run/docs/managing/revisions)
  948. // (i.e., the function name plus the revision suffix).
  949. // * **Google Cloud Functions:** The value of the
  950. // [`K_REVISION` environment
  951. // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
  952. // * **Azure Functions:** Not applicable. Do not set this attribute.
  953. FaaSVersionKey = attribute.Key("faas.version")
  954. // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
  955. // semantic conventions. It represents the execution environment ID as a
  956. // string, that will be potentially reused for other invocations to the
  957. // same function/function version.
  958. //
  959. // Type: string
  960. // RequirementLevel: Optional
  961. // Stability: stable
  962. // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
  963. // Note: * **AWS Lambda:** Use the (full) log stream name.
  964. FaaSInstanceKey = attribute.Key("faas.instance")
  965. // FaaSMaxMemoryKey is the attribute Key conforming to the
  966. // "faas.max_memory" semantic conventions. It represents the amount of
  967. // memory available to the serverless function converted to Bytes.
  968. //
  969. // Type: int
  970. // RequirementLevel: Optional
  971. // Stability: stable
  972. // Examples: 134217728
  973. // Note: It's recommended to set this attribute since e.g. too little
  974. // memory can easily stop a Java AWS Lambda function from working
  975. // correctly. On AWS Lambda, the environment variable
  976. // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must
  977. // be multiplied by 1,048,576).
  978. FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
  979. )
  980. // FaaSName returns an attribute KeyValue conforming to the "faas.name"
  981. // semantic conventions. It represents the name of the single function that
  982. // this runtime instance executes.
  983. func FaaSName(val string) attribute.KeyValue {
  984. return FaaSNameKey.String(val)
  985. }
  986. // FaaSVersion returns an attribute KeyValue conforming to the
  987. // "faas.version" semantic conventions. It represents the immutable version of
  988. // the function being executed.
  989. func FaaSVersion(val string) attribute.KeyValue {
  990. return FaaSVersionKey.String(val)
  991. }
  992. // FaaSInstance returns an attribute KeyValue conforming to the
  993. // "faas.instance" semantic conventions. It represents the execution
  994. // environment ID as a string, that will be potentially reused for other
  995. // invocations to the same function/function version.
  996. func FaaSInstance(val string) attribute.KeyValue {
  997. return FaaSInstanceKey.String(val)
  998. }
  999. // FaaSMaxMemory returns an attribute KeyValue conforming to the
  1000. // "faas.max_memory" semantic conventions. It represents the amount of memory
  1001. // available to the serverless function converted to Bytes.
  1002. func FaaSMaxMemory(val int) attribute.KeyValue {
  1003. return FaaSMaxMemoryKey.Int(val)
  1004. }
  1005. // A host is defined as a computing instance. For example, physical servers,
  1006. // virtual machines, switches or disk array.
  1007. const (
  1008. // HostIDKey is the attribute Key conforming to the "host.id" semantic
  1009. // conventions. It represents the unique host ID. For Cloud, this must be
  1010. // the instance_id assigned by the cloud provider. For non-containerized
  1011. // systems, this should be the `machine-id`. See the table below for the
  1012. // sources to use to determine the `machine-id` based on operating system.
  1013. //
  1014. // Type: string
  1015. // RequirementLevel: Optional
  1016. // Stability: stable
  1017. // Examples: 'fdbf79e8af94cb7f9e8df36789187052'
  1018. HostIDKey = attribute.Key("host.id")
  1019. // HostNameKey is the attribute Key conforming to the "host.name" semantic
  1020. // conventions. It represents the name of the host. On Unix systems, it may
  1021. // contain what the hostname command returns, or the fully qualified
  1022. // hostname, or another name specified by the user.
  1023. //
  1024. // Type: string
  1025. // RequirementLevel: Optional
  1026. // Stability: stable
  1027. // Examples: 'opentelemetry-test'
  1028. HostNameKey = attribute.Key("host.name")
  1029. // HostTypeKey is the attribute Key conforming to the "host.type" semantic
  1030. // conventions. It represents the type of host. For Cloud, this must be the
  1031. // machine type.
  1032. //
  1033. // Type: string
  1034. // RequirementLevel: Optional
  1035. // Stability: stable
  1036. // Examples: 'n1-standard-1'
  1037. HostTypeKey = attribute.Key("host.type")
  1038. // HostArchKey is the attribute Key conforming to the "host.arch" semantic
  1039. // conventions. It represents the CPU architecture the host system is
  1040. // running on.
  1041. //
  1042. // Type: Enum
  1043. // RequirementLevel: Optional
  1044. // Stability: stable
  1045. HostArchKey = attribute.Key("host.arch")
  1046. // HostImageNameKey is the attribute Key conforming to the
  1047. // "host.image.name" semantic conventions. It represents the name of the VM
  1048. // image or OS install the host was instantiated from.
  1049. //
  1050. // Type: string
  1051. // RequirementLevel: Optional
  1052. // Stability: stable
  1053. // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
  1054. HostImageNameKey = attribute.Key("host.image.name")
  1055. // HostImageIDKey is the attribute Key conforming to the "host.image.id"
  1056. // semantic conventions. It represents the vM image ID or host OS image ID.
  1057. // For Cloud, this value is from the provider.
  1058. //
  1059. // Type: string
  1060. // RequirementLevel: Optional
  1061. // Stability: stable
  1062. // Examples: 'ami-07b06b442921831e5'
  1063. HostImageIDKey = attribute.Key("host.image.id")
  1064. // HostImageVersionKey is the attribute Key conforming to the
  1065. // "host.image.version" semantic conventions. It represents the version
  1066. // string of the VM image or host OS as defined in [Version
  1067. // Attributes](README.md#version-attributes).
  1068. //
  1069. // Type: string
  1070. // RequirementLevel: Optional
  1071. // Stability: stable
  1072. // Examples: '0.1'
  1073. HostImageVersionKey = attribute.Key("host.image.version")
  1074. )
  1075. var (
  1076. // AMD64
  1077. HostArchAMD64 = HostArchKey.String("amd64")
  1078. // ARM32
  1079. HostArchARM32 = HostArchKey.String("arm32")
  1080. // ARM64
  1081. HostArchARM64 = HostArchKey.String("arm64")
  1082. // Itanium
  1083. HostArchIA64 = HostArchKey.String("ia64")
  1084. // 32-bit PowerPC
  1085. HostArchPPC32 = HostArchKey.String("ppc32")
  1086. // 64-bit PowerPC
  1087. HostArchPPC64 = HostArchKey.String("ppc64")
  1088. // IBM z/Architecture
  1089. HostArchS390x = HostArchKey.String("s390x")
  1090. // 32-bit x86
  1091. HostArchX86 = HostArchKey.String("x86")
  1092. )
  1093. // HostID returns an attribute KeyValue conforming to the "host.id" semantic
  1094. // conventions. It represents the unique host ID. For Cloud, this must be the
  1095. // instance_id assigned by the cloud provider. For non-containerized systems,
  1096. // this should be the `machine-id`. See the table below for the sources to use
  1097. // to determine the `machine-id` based on operating system.
  1098. func HostID(val string) attribute.KeyValue {
  1099. return HostIDKey.String(val)
  1100. }
  1101. // HostName returns an attribute KeyValue conforming to the "host.name"
  1102. // semantic conventions. It represents the name of the host. On Unix systems,
  1103. // it may contain what the hostname command returns, or the fully qualified
  1104. // hostname, or another name specified by the user.
  1105. func HostName(val string) attribute.KeyValue {
  1106. return HostNameKey.String(val)
  1107. }
  1108. // HostType returns an attribute KeyValue conforming to the "host.type"
  1109. // semantic conventions. It represents the type of host. For Cloud, this must
  1110. // be the machine type.
  1111. func HostType(val string) attribute.KeyValue {
  1112. return HostTypeKey.String(val)
  1113. }
  1114. // HostImageName returns an attribute KeyValue conforming to the
  1115. // "host.image.name" semantic conventions. It represents the name of the VM
  1116. // image or OS install the host was instantiated from.
  1117. func HostImageName(val string) attribute.KeyValue {
  1118. return HostImageNameKey.String(val)
  1119. }
  1120. // HostImageID returns an attribute KeyValue conforming to the
  1121. // "host.image.id" semantic conventions. It represents the vM image ID or host
  1122. // OS image ID. For Cloud, this value is from the provider.
  1123. func HostImageID(val string) attribute.KeyValue {
  1124. return HostImageIDKey.String(val)
  1125. }
  1126. // HostImageVersion returns an attribute KeyValue conforming to the
  1127. // "host.image.version" semantic conventions. It represents the version string
  1128. // of the VM image or host OS as defined in [Version
  1129. // Attributes](README.md#version-attributes).
  1130. func HostImageVersion(val string) attribute.KeyValue {
  1131. return HostImageVersionKey.String(val)
  1132. }
  1133. // A Kubernetes Cluster.
  1134. const (
  1135. // K8SClusterNameKey is the attribute Key conforming to the
  1136. // "k8s.cluster.name" semantic conventions. It represents the name of the
  1137. // cluster.
  1138. //
  1139. // Type: string
  1140. // RequirementLevel: Optional
  1141. // Stability: stable
  1142. // Examples: 'opentelemetry-cluster'
  1143. K8SClusterNameKey = attribute.Key("k8s.cluster.name")
  1144. // K8SClusterUIDKey is the attribute Key conforming to the
  1145. // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for
  1146. // the cluster, set to the UID of the `kube-system` namespace.
  1147. //
  1148. // Type: string
  1149. // RequirementLevel: Optional
  1150. // Stability: stable
  1151. // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d'
  1152. // Note: K8S does not have support for obtaining a cluster ID. If this is
  1153. // ever
  1154. // added, we will recommend collecting the `k8s.cluster.uid` through the
  1155. // official APIs. In the meantime, we are able to use the `uid` of the
  1156. // `kube-system` namespace as a proxy for cluster ID. Read on for the
  1157. // rationale.
  1158. //
  1159. // Every object created in a K8S cluster is assigned a distinct UID. The
  1160. // `kube-system` namespace is used by Kubernetes itself and will exist
  1161. // for the lifetime of the cluster. Using the `uid` of the `kube-system`
  1162. // namespace is a reasonable proxy for the K8S ClusterID as it will only
  1163. // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
  1164. // UUIDs as standardized by
  1165. // [ISO/IEC 9834-8 and ITU-T
  1166. // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).
  1167. // Which states:
  1168. //
  1169. // > If generated according to one of the mechanisms defined in Rec.
  1170. // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
  1171. // different from all other UUIDs generated before 3603 A.D., or is
  1172. // extremely likely to be different (depending on the mechanism chosen).
  1173. //
  1174. // Therefore, UIDs between clusters should be extremely unlikely to
  1175. // conflict.
  1176. K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
  1177. )
  1178. // K8SClusterName returns an attribute KeyValue conforming to the
  1179. // "k8s.cluster.name" semantic conventions. It represents the name of the
  1180. // cluster.
  1181. func K8SClusterName(val string) attribute.KeyValue {
  1182. return K8SClusterNameKey.String(val)
  1183. }
  1184. // K8SClusterUID returns an attribute KeyValue conforming to the
  1185. // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
  1186. // cluster, set to the UID of the `kube-system` namespace.
  1187. func K8SClusterUID(val string) attribute.KeyValue {
  1188. return K8SClusterUIDKey.String(val)
  1189. }
  1190. // A Kubernetes Node object.
  1191. const (
  1192. // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
  1193. // semantic conventions. It represents the name of the Node.
  1194. //
  1195. // Type: string
  1196. // RequirementLevel: Optional
  1197. // Stability: stable
  1198. // Examples: 'node-1'
  1199. K8SNodeNameKey = attribute.Key("k8s.node.name")
  1200. // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
  1201. // semantic conventions. It represents the UID of the Node.
  1202. //
  1203. // Type: string
  1204. // RequirementLevel: Optional
  1205. // Stability: stable
  1206. // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
  1207. K8SNodeUIDKey = attribute.Key("k8s.node.uid")
  1208. )
  1209. // K8SNodeName returns an attribute KeyValue conforming to the
  1210. // "k8s.node.name" semantic conventions. It represents the name of the Node.
  1211. func K8SNodeName(val string) attribute.KeyValue {
  1212. return K8SNodeNameKey.String(val)
  1213. }
  1214. // K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
  1215. // semantic conventions. It represents the UID of the Node.
  1216. func K8SNodeUID(val string) attribute.KeyValue {
  1217. return K8SNodeUIDKey.String(val)
  1218. }
  1219. // A Kubernetes Namespace.
  1220. const (
  1221. // K8SNamespaceNameKey is the attribute Key conforming to the
  1222. // "k8s.namespace.name" semantic conventions. It represents the name of the
  1223. // namespace that the pod is running in.
  1224. //
  1225. // Type: string
  1226. // RequirementLevel: Optional
  1227. // Stability: stable
  1228. // Examples: 'default'
  1229. K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
  1230. )
  1231. // K8SNamespaceName returns an attribute KeyValue conforming to the
  1232. // "k8s.namespace.name" semantic conventions. It represents the name of the
  1233. // namespace that the pod is running in.
  1234. func K8SNamespaceName(val string) attribute.KeyValue {
  1235. return K8SNamespaceNameKey.String(val)
  1236. }
  1237. // A Kubernetes Pod object.
  1238. const (
  1239. // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
  1240. // semantic conventions. It represents the UID of the Pod.
  1241. //
  1242. // Type: string
  1243. // RequirementLevel: Optional
  1244. // Stability: stable
  1245. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1246. K8SPodUIDKey = attribute.Key("k8s.pod.uid")
  1247. // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
  1248. // semantic conventions. It represents the name of the Pod.
  1249. //
  1250. // Type: string
  1251. // RequirementLevel: Optional
  1252. // Stability: stable
  1253. // Examples: 'opentelemetry-pod-autoconf'
  1254. K8SPodNameKey = attribute.Key("k8s.pod.name")
  1255. )
  1256. // K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
  1257. // semantic conventions. It represents the UID of the Pod.
  1258. func K8SPodUID(val string) attribute.KeyValue {
  1259. return K8SPodUIDKey.String(val)
  1260. }
  1261. // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
  1262. // semantic conventions. It represents the name of the Pod.
  1263. func K8SPodName(val string) attribute.KeyValue {
  1264. return K8SPodNameKey.String(val)
  1265. }
  1266. // A container in a
  1267. // [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates).
  1268. const (
  1269. // K8SContainerNameKey is the attribute Key conforming to the
  1270. // "k8s.container.name" semantic conventions. It represents the name of the
  1271. // Container from Pod specification, must be unique within a Pod. Container
  1272. // runtime usually uses different globally unique name (`container.name`).
  1273. //
  1274. // Type: string
  1275. // RequirementLevel: Optional
  1276. // Stability: stable
  1277. // Examples: 'redis'
  1278. K8SContainerNameKey = attribute.Key("k8s.container.name")
  1279. // K8SContainerRestartCountKey is the attribute Key conforming to the
  1280. // "k8s.container.restart_count" semantic conventions. It represents the
  1281. // number of times the container was restarted. This attribute can be used
  1282. // to identify a particular container (running or stopped) within a
  1283. // container spec.
  1284. //
  1285. // Type: int
  1286. // RequirementLevel: Optional
  1287. // Stability: stable
  1288. // Examples: 0, 2
  1289. K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
  1290. )
  1291. // K8SContainerName returns an attribute KeyValue conforming to the
  1292. // "k8s.container.name" semantic conventions. It represents the name of the
  1293. // Container from Pod specification, must be unique within a Pod. Container
  1294. // runtime usually uses different globally unique name (`container.name`).
  1295. func K8SContainerName(val string) attribute.KeyValue {
  1296. return K8SContainerNameKey.String(val)
  1297. }
  1298. // K8SContainerRestartCount returns an attribute KeyValue conforming to the
  1299. // "k8s.container.restart_count" semantic conventions. It represents the number
  1300. // of times the container was restarted. This attribute can be used to identify
  1301. // a particular container (running or stopped) within a container spec.
  1302. func K8SContainerRestartCount(val int) attribute.KeyValue {
  1303. return K8SContainerRestartCountKey.Int(val)
  1304. }
  1305. // A Kubernetes ReplicaSet object.
  1306. const (
  1307. // K8SReplicaSetUIDKey is the attribute Key conforming to the
  1308. // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
  1309. // ReplicaSet.
  1310. //
  1311. // Type: string
  1312. // RequirementLevel: Optional
  1313. // Stability: stable
  1314. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1315. K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
  1316. // K8SReplicaSetNameKey is the attribute Key conforming to the
  1317. // "k8s.replicaset.name" semantic conventions. It represents the name of
  1318. // the ReplicaSet.
  1319. //
  1320. // Type: string
  1321. // RequirementLevel: Optional
  1322. // Stability: stable
  1323. // Examples: 'opentelemetry'
  1324. K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
  1325. )
  1326. // K8SReplicaSetUID returns an attribute KeyValue conforming to the
  1327. // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
  1328. // ReplicaSet.
  1329. func K8SReplicaSetUID(val string) attribute.KeyValue {
  1330. return K8SReplicaSetUIDKey.String(val)
  1331. }
  1332. // K8SReplicaSetName returns an attribute KeyValue conforming to the
  1333. // "k8s.replicaset.name" semantic conventions. It represents the name of the
  1334. // ReplicaSet.
  1335. func K8SReplicaSetName(val string) attribute.KeyValue {
  1336. return K8SReplicaSetNameKey.String(val)
  1337. }
  1338. // A Kubernetes Deployment object.
  1339. const (
  1340. // K8SDeploymentUIDKey is the attribute Key conforming to the
  1341. // "k8s.deployment.uid" semantic conventions. It represents the UID of the
  1342. // Deployment.
  1343. //
  1344. // Type: string
  1345. // RequirementLevel: Optional
  1346. // Stability: stable
  1347. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1348. K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
  1349. // K8SDeploymentNameKey is the attribute Key conforming to the
  1350. // "k8s.deployment.name" semantic conventions. It represents the name of
  1351. // the Deployment.
  1352. //
  1353. // Type: string
  1354. // RequirementLevel: Optional
  1355. // Stability: stable
  1356. // Examples: 'opentelemetry'
  1357. K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
  1358. )
  1359. // K8SDeploymentUID returns an attribute KeyValue conforming to the
  1360. // "k8s.deployment.uid" semantic conventions. It represents the UID of the
  1361. // Deployment.
  1362. func K8SDeploymentUID(val string) attribute.KeyValue {
  1363. return K8SDeploymentUIDKey.String(val)
  1364. }
  1365. // K8SDeploymentName returns an attribute KeyValue conforming to the
  1366. // "k8s.deployment.name" semantic conventions. It represents the name of the
  1367. // Deployment.
  1368. func K8SDeploymentName(val string) attribute.KeyValue {
  1369. return K8SDeploymentNameKey.String(val)
  1370. }
  1371. // A Kubernetes StatefulSet object.
  1372. const (
  1373. // K8SStatefulSetUIDKey is the attribute Key conforming to the
  1374. // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
  1375. // StatefulSet.
  1376. //
  1377. // Type: string
  1378. // RequirementLevel: Optional
  1379. // Stability: stable
  1380. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1381. K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
  1382. // K8SStatefulSetNameKey is the attribute Key conforming to the
  1383. // "k8s.statefulset.name" semantic conventions. It represents the name of
  1384. // the StatefulSet.
  1385. //
  1386. // Type: string
  1387. // RequirementLevel: Optional
  1388. // Stability: stable
  1389. // Examples: 'opentelemetry'
  1390. K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
  1391. )
  1392. // K8SStatefulSetUID returns an attribute KeyValue conforming to the
  1393. // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
  1394. // StatefulSet.
  1395. func K8SStatefulSetUID(val string) attribute.KeyValue {
  1396. return K8SStatefulSetUIDKey.String(val)
  1397. }
  1398. // K8SStatefulSetName returns an attribute KeyValue conforming to the
  1399. // "k8s.statefulset.name" semantic conventions. It represents the name of the
  1400. // StatefulSet.
  1401. func K8SStatefulSetName(val string) attribute.KeyValue {
  1402. return K8SStatefulSetNameKey.String(val)
  1403. }
  1404. // A Kubernetes DaemonSet object.
  1405. const (
  1406. // K8SDaemonSetUIDKey is the attribute Key conforming to the
  1407. // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
  1408. // DaemonSet.
  1409. //
  1410. // Type: string
  1411. // RequirementLevel: Optional
  1412. // Stability: stable
  1413. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1414. K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
  1415. // K8SDaemonSetNameKey is the attribute Key conforming to the
  1416. // "k8s.daemonset.name" semantic conventions. It represents the name of the
  1417. // DaemonSet.
  1418. //
  1419. // Type: string
  1420. // RequirementLevel: Optional
  1421. // Stability: stable
  1422. // Examples: 'opentelemetry'
  1423. K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
  1424. )
  1425. // K8SDaemonSetUID returns an attribute KeyValue conforming to the
  1426. // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
  1427. // DaemonSet.
  1428. func K8SDaemonSetUID(val string) attribute.KeyValue {
  1429. return K8SDaemonSetUIDKey.String(val)
  1430. }
  1431. // K8SDaemonSetName returns an attribute KeyValue conforming to the
  1432. // "k8s.daemonset.name" semantic conventions. It represents the name of the
  1433. // DaemonSet.
  1434. func K8SDaemonSetName(val string) attribute.KeyValue {
  1435. return K8SDaemonSetNameKey.String(val)
  1436. }
  1437. // A Kubernetes Job object.
  1438. const (
  1439. // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
  1440. // semantic conventions. It represents the UID of the Job.
  1441. //
  1442. // Type: string
  1443. // RequirementLevel: Optional
  1444. // Stability: stable
  1445. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1446. K8SJobUIDKey = attribute.Key("k8s.job.uid")
  1447. // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
  1448. // semantic conventions. It represents the name of the Job.
  1449. //
  1450. // Type: string
  1451. // RequirementLevel: Optional
  1452. // Stability: stable
  1453. // Examples: 'opentelemetry'
  1454. K8SJobNameKey = attribute.Key("k8s.job.name")
  1455. )
  1456. // K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
  1457. // semantic conventions. It represents the UID of the Job.
  1458. func K8SJobUID(val string) attribute.KeyValue {
  1459. return K8SJobUIDKey.String(val)
  1460. }
  1461. // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
  1462. // semantic conventions. It represents the name of the Job.
  1463. func K8SJobName(val string) attribute.KeyValue {
  1464. return K8SJobNameKey.String(val)
  1465. }
  1466. // A Kubernetes CronJob object.
  1467. const (
  1468. // K8SCronJobUIDKey is the attribute Key conforming to the
  1469. // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
  1470. // CronJob.
  1471. //
  1472. // Type: string
  1473. // RequirementLevel: Optional
  1474. // Stability: stable
  1475. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  1476. K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
  1477. // K8SCronJobNameKey is the attribute Key conforming to the
  1478. // "k8s.cronjob.name" semantic conventions. It represents the name of the
  1479. // CronJob.
  1480. //
  1481. // Type: string
  1482. // RequirementLevel: Optional
  1483. // Stability: stable
  1484. // Examples: 'opentelemetry'
  1485. K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
  1486. )
  1487. // K8SCronJobUID returns an attribute KeyValue conforming to the
  1488. // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
  1489. // CronJob.
  1490. func K8SCronJobUID(val string) attribute.KeyValue {
  1491. return K8SCronJobUIDKey.String(val)
  1492. }
  1493. // K8SCronJobName returns an attribute KeyValue conforming to the
  1494. // "k8s.cronjob.name" semantic conventions. It represents the name of the
  1495. // CronJob.
  1496. func K8SCronJobName(val string) attribute.KeyValue {
  1497. return K8SCronJobNameKey.String(val)
  1498. }
  1499. // The operating system (OS) on which the process represented by this resource
  1500. // is running.
  1501. const (
  1502. // OSTypeKey is the attribute Key conforming to the "os.type" semantic
  1503. // conventions. It represents the operating system type.
  1504. //
  1505. // Type: Enum
  1506. // RequirementLevel: Required
  1507. // Stability: stable
  1508. OSTypeKey = attribute.Key("os.type")
  1509. // OSDescriptionKey is the attribute Key conforming to the "os.description"
  1510. // semantic conventions. It represents the human readable (not intended to
  1511. // be parsed) OS version information, like e.g. reported by `ver` or
  1512. // `lsb_release -a` commands.
  1513. //
  1514. // Type: string
  1515. // RequirementLevel: Optional
  1516. // Stability: stable
  1517. // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
  1518. // LTS'
  1519. OSDescriptionKey = attribute.Key("os.description")
  1520. // OSNameKey is the attribute Key conforming to the "os.name" semantic
  1521. // conventions. It represents the human readable operating system name.
  1522. //
  1523. // Type: string
  1524. // RequirementLevel: Optional
  1525. // Stability: stable
  1526. // Examples: 'iOS', 'Android', 'Ubuntu'
  1527. OSNameKey = attribute.Key("os.name")
  1528. // OSVersionKey is the attribute Key conforming to the "os.version"
  1529. // semantic conventions. It represents the version string of the operating
  1530. // system as defined in [Version
  1531. // Attributes](/docs/resource/README.md#version-attributes).
  1532. //
  1533. // Type: string
  1534. // RequirementLevel: Optional
  1535. // Stability: stable
  1536. // Examples: '14.2.1', '18.04.1'
  1537. OSVersionKey = attribute.Key("os.version")
  1538. )
  1539. var (
  1540. // Microsoft Windows
  1541. OSTypeWindows = OSTypeKey.String("windows")
  1542. // Linux
  1543. OSTypeLinux = OSTypeKey.String("linux")
  1544. // Apple Darwin
  1545. OSTypeDarwin = OSTypeKey.String("darwin")
  1546. // FreeBSD
  1547. OSTypeFreeBSD = OSTypeKey.String("freebsd")
  1548. // NetBSD
  1549. OSTypeNetBSD = OSTypeKey.String("netbsd")
  1550. // OpenBSD
  1551. OSTypeOpenBSD = OSTypeKey.String("openbsd")
  1552. // DragonFly BSD
  1553. OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
  1554. // HP-UX (Hewlett Packard Unix)
  1555. OSTypeHPUX = OSTypeKey.String("hpux")
  1556. // AIX (Advanced Interactive eXecutive)
  1557. OSTypeAIX = OSTypeKey.String("aix")
  1558. // SunOS, Oracle Solaris
  1559. OSTypeSolaris = OSTypeKey.String("solaris")
  1560. // IBM z/OS
  1561. OSTypeZOS = OSTypeKey.String("z_os")
  1562. )
  1563. // OSDescription returns an attribute KeyValue conforming to the
  1564. // "os.description" semantic conventions. It represents the human readable (not
  1565. // intended to be parsed) OS version information, like e.g. reported by `ver`
  1566. // or `lsb_release -a` commands.
  1567. func OSDescription(val string) attribute.KeyValue {
  1568. return OSDescriptionKey.String(val)
  1569. }
  1570. // OSName returns an attribute KeyValue conforming to the "os.name" semantic
  1571. // conventions. It represents the human readable operating system name.
  1572. func OSName(val string) attribute.KeyValue {
  1573. return OSNameKey.String(val)
  1574. }
  1575. // OSVersion returns an attribute KeyValue conforming to the "os.version"
  1576. // semantic conventions. It represents the version string of the operating
  1577. // system as defined in [Version
  1578. // Attributes](/docs/resource/README.md#version-attributes).
  1579. func OSVersion(val string) attribute.KeyValue {
  1580. return OSVersionKey.String(val)
  1581. }
  1582. // An operating system process.
  1583. const (
  1584. // ProcessPIDKey is the attribute Key conforming to the "process.pid"
  1585. // semantic conventions. It represents the process identifier (PID).
  1586. //
  1587. // Type: int
  1588. // RequirementLevel: Optional
  1589. // Stability: stable
  1590. // Examples: 1234
  1591. ProcessPIDKey = attribute.Key("process.pid")
  1592. // ProcessParentPIDKey is the attribute Key conforming to the
  1593. // "process.parent_pid" semantic conventions. It represents the parent
  1594. // Process identifier (PID).
  1595. //
  1596. // Type: int
  1597. // RequirementLevel: Optional
  1598. // Stability: stable
  1599. // Examples: 111
  1600. ProcessParentPIDKey = attribute.Key("process.parent_pid")
  1601. // ProcessExecutableNameKey is the attribute Key conforming to the
  1602. // "process.executable.name" semantic conventions. It represents the name
  1603. // of the process executable. On Linux based systems, can be set to the
  1604. // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
  1605. // of `GetProcessImageFileNameW`.
  1606. //
  1607. // Type: string
  1608. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1609. // below.)
  1610. // Stability: stable
  1611. // Examples: 'otelcol'
  1612. ProcessExecutableNameKey = attribute.Key("process.executable.name")
  1613. // ProcessExecutablePathKey is the attribute Key conforming to the
  1614. // "process.executable.path" semantic conventions. It represents the full
  1615. // path to the process executable. On Linux based systems, can be set to
  1616. // the target of `proc/[pid]/exe`. On Windows, can be set to the result of
  1617. // `GetProcessImageFileNameW`.
  1618. //
  1619. // Type: string
  1620. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1621. // below.)
  1622. // Stability: stable
  1623. // Examples: '/usr/bin/cmd/otelcol'
  1624. ProcessExecutablePathKey = attribute.Key("process.executable.path")
  1625. // ProcessCommandKey is the attribute Key conforming to the
  1626. // "process.command" semantic conventions. It represents the command used
  1627. // to launch the process (i.e. the command name). On Linux based systems,
  1628. // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
  1629. // be set to the first parameter extracted from `GetCommandLineW`.
  1630. //
  1631. // Type: string
  1632. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1633. // below.)
  1634. // Stability: stable
  1635. // Examples: 'cmd/otelcol'
  1636. ProcessCommandKey = attribute.Key("process.command")
  1637. // ProcessCommandLineKey is the attribute Key conforming to the
  1638. // "process.command_line" semantic conventions. It represents the full
  1639. // command used to launch the process as a single string representing the
  1640. // full command. On Windows, can be set to the result of `GetCommandLineW`.
  1641. // Do not set this if you have to assemble it just for monitoring; use
  1642. // `process.command_args` instead.
  1643. //
  1644. // Type: string
  1645. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1646. // below.)
  1647. // Stability: stable
  1648. // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
  1649. ProcessCommandLineKey = attribute.Key("process.command_line")
  1650. // ProcessCommandArgsKey is the attribute Key conforming to the
  1651. // "process.command_args" semantic conventions. It represents the all the
  1652. // command arguments (including the command/executable itself) as received
  1653. // by the process. On Linux-based systems (and some other Unixoid systems
  1654. // supporting procfs), can be set according to the list of null-delimited
  1655. // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
  1656. // this would be the full argv vector passed to `main`.
  1657. //
  1658. // Type: string[]
  1659. // RequirementLevel: ConditionallyRequired (See alternative attributes
  1660. // below.)
  1661. // Stability: stable
  1662. // Examples: 'cmd/otecol', '--config=config.yaml'
  1663. ProcessCommandArgsKey = attribute.Key("process.command_args")
  1664. // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
  1665. // semantic conventions. It represents the username of the user that owns
  1666. // the process.
  1667. //
  1668. // Type: string
  1669. // RequirementLevel: Optional
  1670. // Stability: stable
  1671. // Examples: 'root'
  1672. ProcessOwnerKey = attribute.Key("process.owner")
  1673. )
  1674. // ProcessPID returns an attribute KeyValue conforming to the "process.pid"
  1675. // semantic conventions. It represents the process identifier (PID).
  1676. func ProcessPID(val int) attribute.KeyValue {
  1677. return ProcessPIDKey.Int(val)
  1678. }
  1679. // ProcessParentPID returns an attribute KeyValue conforming to the
  1680. // "process.parent_pid" semantic conventions. It represents the parent Process
  1681. // identifier (PID).
  1682. func ProcessParentPID(val int) attribute.KeyValue {
  1683. return ProcessParentPIDKey.Int(val)
  1684. }
  1685. // ProcessExecutableName returns an attribute KeyValue conforming to the
  1686. // "process.executable.name" semantic conventions. It represents the name of
  1687. // the process executable. On Linux based systems, can be set to the `Name` in
  1688. // `proc/[pid]/status`. On Windows, can be set to the base name of
  1689. // `GetProcessImageFileNameW`.
  1690. func ProcessExecutableName(val string) attribute.KeyValue {
  1691. return ProcessExecutableNameKey.String(val)
  1692. }
  1693. // ProcessExecutablePath returns an attribute KeyValue conforming to the
  1694. // "process.executable.path" semantic conventions. It represents the full path
  1695. // to the process executable. On Linux based systems, can be set to the target
  1696. // of `proc/[pid]/exe`. On Windows, can be set to the result of
  1697. // `GetProcessImageFileNameW`.
  1698. func ProcessExecutablePath(val string) attribute.KeyValue {
  1699. return ProcessExecutablePathKey.String(val)
  1700. }
  1701. // ProcessCommand returns an attribute KeyValue conforming to the
  1702. // "process.command" semantic conventions. It represents the command used to
  1703. // launch the process (i.e. the command name). On Linux based systems, can be
  1704. // set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
  1705. // the first parameter extracted from `GetCommandLineW`.
  1706. func ProcessCommand(val string) attribute.KeyValue {
  1707. return ProcessCommandKey.String(val)
  1708. }
  1709. // ProcessCommandLine returns an attribute KeyValue conforming to the
  1710. // "process.command_line" semantic conventions. It represents the full command
  1711. // used to launch the process as a single string representing the full command.
  1712. // On Windows, can be set to the result of `GetCommandLineW`. Do not set this
  1713. // if you have to assemble it just for monitoring; use `process.command_args`
  1714. // instead.
  1715. func ProcessCommandLine(val string) attribute.KeyValue {
  1716. return ProcessCommandLineKey.String(val)
  1717. }
  1718. // ProcessCommandArgs returns an attribute KeyValue conforming to the
  1719. // "process.command_args" semantic conventions. It represents the all the
  1720. // command arguments (including the command/executable itself) as received by
  1721. // the process. On Linux-based systems (and some other Unixoid systems
  1722. // supporting procfs), can be set according to the list of null-delimited
  1723. // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
  1724. // this would be the full argv vector passed to `main`.
  1725. func ProcessCommandArgs(val ...string) attribute.KeyValue {
  1726. return ProcessCommandArgsKey.StringSlice(val)
  1727. }
  1728. // ProcessOwner returns an attribute KeyValue conforming to the
  1729. // "process.owner" semantic conventions. It represents the username of the user
  1730. // that owns the process.
  1731. func ProcessOwner(val string) attribute.KeyValue {
  1732. return ProcessOwnerKey.String(val)
  1733. }
  1734. // The single (language) runtime instance which is monitored.
  1735. const (
  1736. // ProcessRuntimeNameKey is the attribute Key conforming to the
  1737. // "process.runtime.name" semantic conventions. It represents the name of
  1738. // the runtime of this process. For compiled native binaries, this SHOULD
  1739. // be the name of the compiler.
  1740. //
  1741. // Type: string
  1742. // RequirementLevel: Optional
  1743. // Stability: stable
  1744. // Examples: 'OpenJDK Runtime Environment'
  1745. ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
  1746. // ProcessRuntimeVersionKey is the attribute Key conforming to the
  1747. // "process.runtime.version" semantic conventions. It represents the
  1748. // version of the runtime of this process, as returned by the runtime
  1749. // without modification.
  1750. //
  1751. // Type: string
  1752. // RequirementLevel: Optional
  1753. // Stability: stable
  1754. // Examples: '14.0.2'
  1755. ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
  1756. // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
  1757. // "process.runtime.description" semantic conventions. It represents an
  1758. // additional description about the runtime of the process, for example a
  1759. // specific vendor customization of the runtime environment.
  1760. //
  1761. // Type: string
  1762. // RequirementLevel: Optional
  1763. // Stability: stable
  1764. // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
  1765. ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
  1766. )
  1767. // ProcessRuntimeName returns an attribute KeyValue conforming to the
  1768. // "process.runtime.name" semantic conventions. It represents the name of the
  1769. // runtime of this process. For compiled native binaries, this SHOULD be the
  1770. // name of the compiler.
  1771. func ProcessRuntimeName(val string) attribute.KeyValue {
  1772. return ProcessRuntimeNameKey.String(val)
  1773. }
  1774. // ProcessRuntimeVersion returns an attribute KeyValue conforming to the
  1775. // "process.runtime.version" semantic conventions. It represents the version of
  1776. // the runtime of this process, as returned by the runtime without
  1777. // modification.
  1778. func ProcessRuntimeVersion(val string) attribute.KeyValue {
  1779. return ProcessRuntimeVersionKey.String(val)
  1780. }
  1781. // ProcessRuntimeDescription returns an attribute KeyValue conforming to the
  1782. // "process.runtime.description" semantic conventions. It represents an
  1783. // additional description about the runtime of the process, for example a
  1784. // specific vendor customization of the runtime environment.
  1785. func ProcessRuntimeDescription(val string) attribute.KeyValue {
  1786. return ProcessRuntimeDescriptionKey.String(val)
  1787. }
  1788. // A service instance.
  1789. const (
  1790. // ServiceNameKey is the attribute Key conforming to the "service.name"
  1791. // semantic conventions. It represents the logical name of the service.
  1792. //
  1793. // Type: string
  1794. // RequirementLevel: Required
  1795. // Stability: stable
  1796. // Examples: 'shoppingcart'
  1797. // Note: MUST be the same for all instances of horizontally scaled
  1798. // services. If the value was not specified, SDKs MUST fallback to
  1799. // `unknown_service:` concatenated with
  1800. // [`process.executable.name`](process.md#process), e.g.
  1801. // `unknown_service:bash`. If `process.executable.name` is not available,
  1802. // the value MUST be set to `unknown_service`.
  1803. ServiceNameKey = attribute.Key("service.name")
  1804. // ServiceVersionKey is the attribute Key conforming to the
  1805. // "service.version" semantic conventions. It represents the version string
  1806. // of the service API or implementation. The format is not defined by these
  1807. // conventions.
  1808. //
  1809. // Type: string
  1810. // RequirementLevel: Optional
  1811. // Stability: stable
  1812. // Examples: '2.0.0', 'a01dbef8a'
  1813. ServiceVersionKey = attribute.Key("service.version")
  1814. )
  1815. // ServiceName returns an attribute KeyValue conforming to the
  1816. // "service.name" semantic conventions. It represents the logical name of the
  1817. // service.
  1818. func ServiceName(val string) attribute.KeyValue {
  1819. return ServiceNameKey.String(val)
  1820. }
  1821. // ServiceVersion returns an attribute KeyValue conforming to the
  1822. // "service.version" semantic conventions. It represents the version string of
  1823. // the service API or implementation. The format is not defined by these
  1824. // conventions.
  1825. func ServiceVersion(val string) attribute.KeyValue {
  1826. return ServiceVersionKey.String(val)
  1827. }
  1828. // A service instance.
  1829. const (
  1830. // ServiceNamespaceKey is the attribute Key conforming to the
  1831. // "service.namespace" semantic conventions. It represents a namespace for
  1832. // `service.name`.
  1833. //
  1834. // Type: string
  1835. // RequirementLevel: Optional
  1836. // Stability: stable
  1837. // Examples: 'Shop'
  1838. // Note: A string value having a meaning that helps to distinguish a group
  1839. // of services, for example the team name that owns a group of services.
  1840. // `service.name` is expected to be unique within the same namespace. If
  1841. // `service.namespace` is not specified in the Resource then `service.name`
  1842. // is expected to be unique for all services that have no explicit
  1843. // namespace defined (so the empty/unspecified namespace is simply one more
  1844. // valid namespace). Zero-length namespace string is assumed equal to
  1845. // unspecified namespace.
  1846. ServiceNamespaceKey = attribute.Key("service.namespace")
  1847. // ServiceInstanceIDKey is the attribute Key conforming to the
  1848. // "service.instance.id" semantic conventions. It represents the string ID
  1849. // of the service instance.
  1850. //
  1851. // Type: string
  1852. // RequirementLevel: Optional
  1853. // Stability: stable
  1854. // Examples: 'my-k8s-pod-deployment-1',
  1855. // '627cc493-f310-47de-96bd-71410b7dec09'
  1856. // Note: MUST be unique for each instance of the same
  1857. // `service.namespace,service.name` pair (in other words
  1858. // `service.namespace,service.name,service.instance.id` triplet MUST be
  1859. // globally unique). The ID helps to distinguish instances of the same
  1860. // service that exist at the same time (e.g. instances of a horizontally
  1861. // scaled service). It is preferable for the ID to be persistent and stay
  1862. // the same for the lifetime of the service instance, however it is
  1863. // acceptable that the ID is ephemeral and changes during important
  1864. // lifetime events for the service (e.g. service restarts). If the service
  1865. // has no inherent unique ID that can be used as the value of this
  1866. // attribute it is recommended to generate a random Version 1 or Version 4
  1867. // RFC 4122 UUID (services aiming for reproducible UUIDs may also use
  1868. // Version 5, see RFC 4122 for more recommendations).
  1869. ServiceInstanceIDKey = attribute.Key("service.instance.id")
  1870. )
  1871. // ServiceNamespace returns an attribute KeyValue conforming to the
  1872. // "service.namespace" semantic conventions. It represents a namespace for
  1873. // `service.name`.
  1874. func ServiceNamespace(val string) attribute.KeyValue {
  1875. return ServiceNamespaceKey.String(val)
  1876. }
  1877. // ServiceInstanceID returns an attribute KeyValue conforming to the
  1878. // "service.instance.id" semantic conventions. It represents the string ID of
  1879. // the service instance.
  1880. func ServiceInstanceID(val string) attribute.KeyValue {
  1881. return ServiceInstanceIDKey.String(val)
  1882. }
  1883. // The telemetry SDK used to capture data recorded by the instrumentation
  1884. // libraries.
  1885. const (
  1886. // TelemetrySDKNameKey is the attribute Key conforming to the
  1887. // "telemetry.sdk.name" semantic conventions. It represents the name of the
  1888. // telemetry SDK as defined above.
  1889. //
  1890. // Type: string
  1891. // RequirementLevel: Required
  1892. // Stability: stable
  1893. // Examples: 'opentelemetry'
  1894. // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute
  1895. // to `opentelemetry`.
  1896. // If another SDK, like a fork or a vendor-provided implementation, is
  1897. // used, this SDK MUST set the
  1898. // `telemetry.sdk.name` attribute to the fully-qualified class or module
  1899. // name of this SDK's main entry point
  1900. // or another suitable identifier depending on the language.
  1901. // The identifier `opentelemetry` is reserved and MUST NOT be used in this
  1902. // case.
  1903. // All custom identifiers SHOULD be stable across different versions of an
  1904. // implementation.
  1905. TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
  1906. // TelemetrySDKLanguageKey is the attribute Key conforming to the
  1907. // "telemetry.sdk.language" semantic conventions. It represents the
  1908. // language of the telemetry SDK.
  1909. //
  1910. // Type: Enum
  1911. // RequirementLevel: Required
  1912. // Stability: stable
  1913. TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
  1914. // TelemetrySDKVersionKey is the attribute Key conforming to the
  1915. // "telemetry.sdk.version" semantic conventions. It represents the version
  1916. // string of the telemetry SDK.
  1917. //
  1918. // Type: string
  1919. // RequirementLevel: Required
  1920. // Stability: stable
  1921. // Examples: '1.2.3'
  1922. TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
  1923. )
  1924. var (
  1925. // cpp
  1926. TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
  1927. // dotnet
  1928. TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
  1929. // erlang
  1930. TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
  1931. // go
  1932. TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
  1933. // java
  1934. TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
  1935. // nodejs
  1936. TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
  1937. // php
  1938. TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
  1939. // python
  1940. TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
  1941. // ruby
  1942. TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
  1943. // rust
  1944. TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
  1945. // swift
  1946. TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
  1947. // webjs
  1948. TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
  1949. )
  1950. // TelemetrySDKName returns an attribute KeyValue conforming to the
  1951. // "telemetry.sdk.name" semantic conventions. It represents the name of the
  1952. // telemetry SDK as defined above.
  1953. func TelemetrySDKName(val string) attribute.KeyValue {
  1954. return TelemetrySDKNameKey.String(val)
  1955. }
  1956. // TelemetrySDKVersion returns an attribute KeyValue conforming to the
  1957. // "telemetry.sdk.version" semantic conventions. It represents the version
  1958. // string of the telemetry SDK.
  1959. func TelemetrySDKVersion(val string) attribute.KeyValue {
  1960. return TelemetrySDKVersionKey.String(val)
  1961. }
  1962. // The telemetry SDK used to capture data recorded by the instrumentation
  1963. // libraries.
  1964. const (
  1965. // TelemetryAutoVersionKey is the attribute Key conforming to the
  1966. // "telemetry.auto.version" semantic conventions. It represents the version
  1967. // string of the auto instrumentation agent, if used.
  1968. //
  1969. // Type: string
  1970. // RequirementLevel: Optional
  1971. // Stability: stable
  1972. // Examples: '1.2.3'
  1973. TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version")
  1974. )
  1975. // TelemetryAutoVersion returns an attribute KeyValue conforming to the
  1976. // "telemetry.auto.version" semantic conventions. It represents the version
  1977. // string of the auto instrumentation agent, if used.
  1978. func TelemetryAutoVersion(val string) attribute.KeyValue {
  1979. return TelemetryAutoVersionKey.String(val)
  1980. }
  1981. // Resource describing the packaged software running the application code. Web
  1982. // engines are typically executed using process.runtime.
  1983. const (
  1984. // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
  1985. // semantic conventions. It represents the name of the web engine.
  1986. //
  1987. // Type: string
  1988. // RequirementLevel: Required
  1989. // Stability: stable
  1990. // Examples: 'WildFly'
  1991. WebEngineNameKey = attribute.Key("webengine.name")
  1992. // WebEngineVersionKey is the attribute Key conforming to the
  1993. // "webengine.version" semantic conventions. It represents the version of
  1994. // the web engine.
  1995. //
  1996. // Type: string
  1997. // RequirementLevel: Optional
  1998. // Stability: stable
  1999. // Examples: '21.0.0'
  2000. WebEngineVersionKey = attribute.Key("webengine.version")
  2001. // WebEngineDescriptionKey is the attribute Key conforming to the
  2002. // "webengine.description" semantic conventions. It represents the
  2003. // additional description of the web engine (e.g. detailed version and
  2004. // edition information).
  2005. //
  2006. // Type: string
  2007. // RequirementLevel: Optional
  2008. // Stability: stable
  2009. // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
  2010. // 2.2.2.Final'
  2011. WebEngineDescriptionKey = attribute.Key("webengine.description")
  2012. )
  2013. // WebEngineName returns an attribute KeyValue conforming to the
  2014. // "webengine.name" semantic conventions. It represents the name of the web
  2015. // engine.
  2016. func WebEngineName(val string) attribute.KeyValue {
  2017. return WebEngineNameKey.String(val)
  2018. }
  2019. // WebEngineVersion returns an attribute KeyValue conforming to the
  2020. // "webengine.version" semantic conventions. It represents the version of the
  2021. // web engine.
  2022. func WebEngineVersion(val string) attribute.KeyValue {
  2023. return WebEngineVersionKey.String(val)
  2024. }
  2025. // WebEngineDescription returns an attribute KeyValue conforming to the
  2026. // "webengine.description" semantic conventions. It represents the additional
  2027. // description of the web engine (e.g. detailed version and edition
  2028. // information).
  2029. func WebEngineDescription(val string) attribute.KeyValue {
  2030. return WebEngineDescriptionKey.String(val)
  2031. }
  2032. // Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's
  2033. // concepts.
  2034. const (
  2035. // OTelScopeNameKey is the attribute Key conforming to the
  2036. // "otel.scope.name" semantic conventions. It represents the name of the
  2037. // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
  2038. //
  2039. // Type: string
  2040. // RequirementLevel: Optional
  2041. // Stability: stable
  2042. // Examples: 'io.opentelemetry.contrib.mongodb'
  2043. OTelScopeNameKey = attribute.Key("otel.scope.name")
  2044. // OTelScopeVersionKey is the attribute Key conforming to the
  2045. // "otel.scope.version" semantic conventions. It represents the version of
  2046. // the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
  2047. //
  2048. // Type: string
  2049. // RequirementLevel: Optional
  2050. // Stability: stable
  2051. // Examples: '1.0.0'
  2052. OTelScopeVersionKey = attribute.Key("otel.scope.version")
  2053. )
  2054. // OTelScopeName returns an attribute KeyValue conforming to the
  2055. // "otel.scope.name" semantic conventions. It represents the name of the
  2056. // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
  2057. func OTelScopeName(val string) attribute.KeyValue {
  2058. return OTelScopeNameKey.String(val)
  2059. }
  2060. // OTelScopeVersion returns an attribute KeyValue conforming to the
  2061. // "otel.scope.version" semantic conventions. It represents the version of the
  2062. // instrumentation scope - (`InstrumentationScope.Version` in OTLP).
  2063. func OTelScopeVersion(val string) attribute.KeyValue {
  2064. return OTelScopeVersionKey.String(val)
  2065. }
  2066. // Span attributes used by non-OTLP exporters to represent OpenTelemetry
  2067. // Scope's concepts.
  2068. const (
  2069. // OTelLibraryNameKey is the attribute Key conforming to the
  2070. // "otel.library.name" semantic conventions. It represents the deprecated,
  2071. // use the `otel.scope.name` attribute.
  2072. //
  2073. // Type: string
  2074. // RequirementLevel: Optional
  2075. // Stability: deprecated
  2076. // Examples: 'io.opentelemetry.contrib.mongodb'
  2077. OTelLibraryNameKey = attribute.Key("otel.library.name")
  2078. // OTelLibraryVersionKey is the attribute Key conforming to the
  2079. // "otel.library.version" semantic conventions. It represents the
  2080. // deprecated, use the `otel.scope.version` attribute.
  2081. //
  2082. // Type: string
  2083. // RequirementLevel: Optional
  2084. // Stability: deprecated
  2085. // Examples: '1.0.0'
  2086. OTelLibraryVersionKey = attribute.Key("otel.library.version")
  2087. )
  2088. // OTelLibraryName returns an attribute KeyValue conforming to the
  2089. // "otel.library.name" semantic conventions. It represents the deprecated, use
  2090. // the `otel.scope.name` attribute.
  2091. func OTelLibraryName(val string) attribute.KeyValue {
  2092. return OTelLibraryNameKey.String(val)
  2093. }
  2094. // OTelLibraryVersion returns an attribute KeyValue conforming to the
  2095. // "otel.library.version" semantic conventions. It represents the deprecated,
  2096. // use the `otel.scope.version` attribute.
  2097. func OTelLibraryVersion(val string) attribute.KeyValue {
  2098. return OTelLibraryVersionKey.String(val)
  2099. }