Debian Codegraph @

semconv/v1.23.1/resource.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 // Code generated from semantic convention specification. DO NOT EDIT.
5
6 package semconv // import "go.opentelemetry.io/otel/semconv/v1.23.1"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // A cloud environment (e.g. GCP, Azure, AWS).
11 const (
12 // CloudAccountIDKey is the attribute Key conforming to the
13 // "cloud.account.id" semantic conventions. It represents the cloud account
14 // ID the resource is assigned to.
15 //
16 // Type: string
17 // RequirementLevel: Optional
18 // Stability: experimental
19 // Examples: '111111111111', 'opentelemetry'
20 CloudAccountIDKey = attribute.Key("cloud.account.id")
21
22 // CloudAvailabilityZoneKey is the attribute Key conforming to the
23 // "cloud.availability_zone" semantic conventions. It represents the cloud
24 // regions often have multiple, isolated locations known as zones to
25 // increase availability. Availability zone represents the zone where the
26 // resource is running.
27 //
28 // Type: string
29 // RequirementLevel: Optional
30 // Stability: experimental
31 // Examples: 'us-east-1c'
32 // Note: Availability zones are called "zones" on Alibaba Cloud and Google
33 // Cloud.
34 CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
35
36 // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
37 // semantic conventions. It represents the cloud platform in use.
38 //
39 // Type: Enum
40 // RequirementLevel: Optional
41 // Stability: experimental
42 // Note: The prefix of the service SHOULD match the one specified in
43 // `cloud.provider`.
44 CloudPlatformKey = attribute.Key("cloud.platform")
45
46 // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
47 // semantic conventions. It represents the name of the cloud provider.
48 //
49 // Type: Enum
50 // RequirementLevel: Optional
51 // Stability: experimental
52 CloudProviderKey = attribute.Key("cloud.provider")
53
54 // CloudRegionKey is the attribute Key conforming to the "cloud.region"
55 // semantic conventions. It represents the geographical region the resource
56 // is running.
57 //
58 // Type: string
59 // RequirementLevel: Optional
60 // Stability: experimental
61 // Examples: 'us-central1', 'us-east-1'
62 // Note: Refer to your provider's docs to see the available regions, for
63 // example [Alibaba Cloud
64 // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
65 // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
66 // [Azure
67 // regions](https://azure.microsoft.com/global-infrastructure/geographies/),
68 // [Google Cloud regions](https://cloud.google.com/about/locations), or
69 // [Tencent Cloud
70 // regions](https://www.tencentcloud.com/document/product/213/6091).
71 CloudRegionKey = attribute.Key("cloud.region")
72
73 // CloudResourceIDKey is the attribute Key conforming to the
74 // "cloud.resource_id" semantic conventions. It represents the cloud
75 // provider-specific native identifier of the monitored cloud resource
76 // (e.g. an
77 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
78 // on AWS, a [fully qualified resource
79 // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id)
80 // on Azure, a [full resource
81 // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
82 // on GCP)
83 //
84 // Type: string
85 // RequirementLevel: Optional
86 // Stability: experimental
87 // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',
88 // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID',
89 // '/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>'
90 // Note: On some cloud providers, it may not be possible to determine the
91 // full ID at startup,
92 // so it may be necessary to set `cloud.resource_id` as a span attribute
93 // instead.
94 //
95 // The exact value to use for `cloud.resource_id` depends on the cloud
96 // provider.
97 // The following well-known definitions MUST be used if you set this
98 // attribute and they apply:
99 //
100 // * **AWS Lambda:** The function
101 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
102 // Take care not to use the "invoked ARN" directly but replace any
103 // [alias
104 // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
105 // with the resolved function version, as the same runtime instance may
106 // be invokable with
107 // multiple different aliases.
108 // * **GCP:** The [URI of the
109 // resource](https://cloud.google.com/iam/docs/full-resource-names)
110 // * **Azure:** The [Fully Qualified Resource
111 // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id)
112 // of the invoked function,
113 // *not* the function app, having the form
114 // `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
115 // This means that a span attribute MUST be used, as an Azure function
116 // app can host multiple functions that would usually share
117 // a TracerProvider.
118 CloudResourceIDKey = attribute.Key("cloud.resource_id")
119 )
120
121 var (
122 // Alibaba Cloud Elastic Compute Service
123 CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
124 // Alibaba Cloud Function Compute
125 CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
126 // Red Hat OpenShift on Alibaba Cloud
127 CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
128 // AWS Elastic Compute Cloud
129 CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
130 // AWS Elastic Container Service
131 CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
132 // AWS Elastic Kubernetes Service
133 CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
134 // AWS Lambda
135 CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
136 // AWS Elastic Beanstalk
137 CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
138 // AWS App Runner
139 CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
140 // Red Hat OpenShift on AWS (ROSA)
141 CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
142 // Azure Virtual Machines
143 CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
144 // Azure Container Instances
145 CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
146 // Azure Kubernetes Service
147 CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
148 // Azure Functions
149 CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
150 // Azure App Service
151 CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
152 // Azure Red Hat OpenShift
153 CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
154 // Google Bare Metal Solution (BMS)
155 CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
156 // Google Cloud Compute Engine (GCE)
157 CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
158 // Google Cloud Run
159 CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
160 // Google Cloud Kubernetes Engine (GKE)
161 CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
162 // Google Cloud Functions (GCF)
163 CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
164 // Google Cloud App Engine (GAE)
165 CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
166 // Red Hat OpenShift on Google Cloud
167 CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift")
168 // Red Hat OpenShift on IBM Cloud
169 CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
170 // Tencent Cloud Cloud Virtual Machine (CVM)
171 CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
172 // Tencent Cloud Elastic Kubernetes Service (EKS)
173 CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
174 // Tencent Cloud Serverless Cloud Function (SCF)
175 CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
176 )
177
178 var (
179 // Alibaba Cloud
180 CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
181 // Amazon Web Services
182 CloudProviderAWS = CloudProviderKey.String("aws")
183 // Microsoft Azure
184 CloudProviderAzure = CloudProviderKey.String("azure")
185 // Google Cloud Platform
186 CloudProviderGCP = CloudProviderKey.String("gcp")
187 // Heroku Platform as a Service
188 CloudProviderHeroku = CloudProviderKey.String("heroku")
189 // IBM Cloud
190 CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
191 // Tencent Cloud
192 CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
193 )
194
195 // CloudAccountID returns an attribute KeyValue conforming to the
196 // "cloud.account.id" semantic conventions. It represents the cloud account ID
197 // the resource is assigned to.
198 func CloudAccountID(val string) attribute.KeyValue {
199 return CloudAccountIDKey.String(val)
200 }
201
202 // CloudAvailabilityZone returns an attribute KeyValue conforming to the
203 // "cloud.availability_zone" semantic conventions. It represents the cloud
204 // regions often have multiple, isolated locations known as zones to increase
205 // availability. Availability zone represents the zone where the resource is
206 // running.
207 func CloudAvailabilityZone(val string) attribute.KeyValue {
208 return CloudAvailabilityZoneKey.String(val)
209 }
210
211 // CloudRegion returns an attribute KeyValue conforming to the
212 // "cloud.region" semantic conventions. It represents the geographical region
213 // the resource is running.
214 func CloudRegion(val string) attribute.KeyValue {
215 return CloudRegionKey.String(val)
216 }
217
218 // CloudResourceID returns an attribute KeyValue conforming to the
219 // "cloud.resource_id" semantic conventions. It represents the cloud
220 // provider-specific native identifier of the monitored cloud resource (e.g. an
221 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
222 // on AWS, a [fully qualified resource
223 // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on
224 // Azure, a [full resource
225 // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
226 // on GCP)
227 func CloudResourceID(val string) attribute.KeyValue {
228 return CloudResourceIDKey.String(val)
229 }
230
231 // A container instance.
232 const (
233 // ContainerCommandKey is the attribute Key conforming to the
234 // "container.command" semantic conventions. It represents the command used
235 // to run the container (i.e. the command name).
236 //
237 // Type: string
238 // RequirementLevel: Optional
239 // Stability: experimental
240 // Examples: 'otelcontribcol'
241 // Note: If using embedded credentials or sensitive data, it is recommended
242 // to remove them to prevent potential leakage.
243 ContainerCommandKey = attribute.Key("container.command")
244
245 // ContainerCommandArgsKey is the attribute Key conforming to the
246 // "container.command_args" semantic conventions. It represents the all the
247 // command arguments (including the command/executable itself) run by the
248 // container. [2]
249 //
250 // Type: string[]
251 // RequirementLevel: Optional
252 // Stability: experimental
253 // Examples: 'otelcontribcol, --config, config.yaml'
254 ContainerCommandArgsKey = attribute.Key("container.command_args")
255
256 // ContainerCommandLineKey is the attribute Key conforming to the
257 // "container.command_line" semantic conventions. It represents the full
258 // command run by the container as a single string representing the full
259 // command. [2]
260 //
261 // Type: string
262 // RequirementLevel: Optional
263 // Stability: experimental
264 // Examples: 'otelcontribcol --config config.yaml'
265 ContainerCommandLineKey = attribute.Key("container.command_line")
266
267 // ContainerIDKey is the attribute Key conforming to the "container.id"
268 // semantic conventions. It represents the container ID. Usually a UUID, as
269 // for example used to [identify Docker
270 // containers](https://docs.docker.com/engine/reference/run/#container-identification).
271 // The UUID might be abbreviated.
272 //
273 // Type: string
274 // RequirementLevel: Optional
275 // Stability: experimental
276 // Examples: 'a3bf90e006b2'
277 ContainerIDKey = attribute.Key("container.id")
278
279 // ContainerImageIDKey is the attribute Key conforming to the
280 // "container.image.id" semantic conventions. It represents the runtime
281 // specific image identifier. Usually a hash algorithm followed by a UUID.
282 //
283 // Type: string
284 // RequirementLevel: Optional
285 // Stability: experimental
286 // Examples:
287 // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'
288 // Note: Docker defines a sha256 of the image id; `container.image.id`
289 // corresponds to the `Image` field from the Docker container inspect
290 // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect)
291 // endpoint.
292 // K8S defines a link to the container registry repository with digest
293 // `"imageID": "registry.azurecr.io
294 // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
295 // The ID is assinged by the container runtime and can vary in different
296 // environments. Consider using `oci.manifest.digest` if it is important to
297 // identify the same image in different environments/runtimes.
298 ContainerImageIDKey = attribute.Key("container.image.id")
299
300 // ContainerImageNameKey is the attribute Key conforming to the
301 // "container.image.name" semantic conventions. It represents the name of
302 // the image the container was built on.
303 //
304 // Type: string
305 // RequirementLevel: Optional
306 // Stability: experimental
307 // Examples: 'gcr.io/opentelemetry/operator'
308 ContainerImageNameKey = attribute.Key("container.image.name")
309
310 // ContainerImageRepoDigestsKey is the attribute Key conforming to the
311 // "container.image.repo_digests" semantic conventions. It represents the
312 // repo digests of the container image as provided by the container
313 // runtime.
314 //
315 // Type: string[]
316 // RequirementLevel: Optional
317 // Stability: experimental
318 // Examples:
319 // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb',
320 // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578'
321 // Note:
322 // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect)
323 // and
324 // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238)
325 // report those under the `RepoDigests` field.
326 ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
327
328 // ContainerImageTagsKey is the attribute Key conforming to the
329 // "container.image.tags" semantic conventions. It represents the container
330 // image tags. An example can be found in [Docker Image
331 // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
332 // Should be only the `<tag>` section of the full name for example from
333 // `registry.example.com/my-org/my-image:<tag>`.
334 //
335 // Type: string[]
336 // RequirementLevel: Optional
337 // Stability: experimental
338 // Examples: 'v1.27.1', '3.5.7-0'
339 ContainerImageTagsKey = attribute.Key("container.image.tags")
340
341 // ContainerNameKey is the attribute Key conforming to the "container.name"
342 // semantic conventions. It represents the container name used by container
343 // runtime.
344 //
345 // Type: string
346 // RequirementLevel: Optional
347 // Stability: experimental
348 // Examples: 'opentelemetry-autoconf'
349 ContainerNameKey = attribute.Key("container.name")
350
351 // ContainerRuntimeKey is the attribute Key conforming to the
352 // "container.runtime" semantic conventions. It represents the container
353 // runtime managing this container.
354 //
355 // Type: string
356 // RequirementLevel: Optional
357 // Stability: experimental
358 // Examples: 'docker', 'containerd', 'rkt'
359 ContainerRuntimeKey = attribute.Key("container.runtime")
360 )
361
362 // ContainerCommand returns an attribute KeyValue conforming to the
363 // "container.command" semantic conventions. It represents the command used to
364 // run the container (i.e. the command name).
365 func ContainerCommand(val string) attribute.KeyValue {
366 return ContainerCommandKey.String(val)
367 }
368
369 // ContainerCommandArgs returns an attribute KeyValue conforming to the
370 // "container.command_args" semantic conventions. It represents the all the
371 // command arguments (including the command/executable itself) run by the
372 // container. [2]
373 func ContainerCommandArgs(val ...string) attribute.KeyValue {
374 return ContainerCommandArgsKey.StringSlice(val)
375 }
376
377 // ContainerCommandLine returns an attribute KeyValue conforming to the
378 // "container.command_line" semantic conventions. It represents the full
379 // command run by the container as a single string representing the full
380 // command. [2]
381 func ContainerCommandLine(val string) attribute.KeyValue {
382 return ContainerCommandLineKey.String(val)
383 }
384
385 // ContainerID returns an attribute KeyValue conforming to the
386 // "container.id" semantic conventions. It represents the container ID. Usually
387 // a UUID, as for example used to [identify Docker
388 // containers](https://docs.docker.com/engine/reference/run/#container-identification).
389 // The UUID might be abbreviated.
390 func ContainerID(val string) attribute.KeyValue {
391 return ContainerIDKey.String(val)
392 }
393
394 // ContainerImageID returns an attribute KeyValue conforming to the
395 // "container.image.id" semantic conventions. It represents the runtime
396 // specific image identifier. Usually a hash algorithm followed by a UUID.
397 func ContainerImageID(val string) attribute.KeyValue {
398 return ContainerImageIDKey.String(val)
399 }
400
401 // ContainerImageName returns an attribute KeyValue conforming to the
402 // "container.image.name" semantic conventions. It represents the name of the
403 // image the container was built on.
404 func ContainerImageName(val string) attribute.KeyValue {
405 return ContainerImageNameKey.String(val)
406 }
407
408 // ContainerImageRepoDigests returns an attribute KeyValue conforming to the
409 // "container.image.repo_digests" semantic conventions. It represents the repo
410 // digests of the container image as provided by the container runtime.
411 func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
412 return ContainerImageRepoDigestsKey.StringSlice(val)
413 }
414
415 // ContainerImageTags returns an attribute KeyValue conforming to the
416 // "container.image.tags" semantic conventions. It represents the container
417 // image tags. An example can be found in [Docker Image
418 // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
419 // Should be only the `<tag>` section of the full name for example from
420 // `registry.example.com/my-org/my-image:<tag>`.
421 func ContainerImageTags(val ...string) attribute.KeyValue {
422 return ContainerImageTagsKey.StringSlice(val)
423 }
424
425 // ContainerName returns an attribute KeyValue conforming to the
426 // "container.name" semantic conventions. It represents the container name used
427 // by container runtime.
428 func ContainerName(val string) attribute.KeyValue {
429 return ContainerNameKey.String(val)
430 }
431
432 // ContainerRuntime returns an attribute KeyValue conforming to the
433 // "container.runtime" semantic conventions. It represents the container
434 // runtime managing this container.
435 func ContainerRuntime(val string) attribute.KeyValue {
436 return ContainerRuntimeKey.String(val)
437 }
438
439 // An OCI image manifest.
440 const (
441 // OciManifestDigestKey is the attribute Key conforming to the
442 // "oci.manifest.digest" semantic conventions. It represents the digest of
443 // the OCI image manifest. For container images specifically is the digest
444 // by which the container image is known.
445 //
446 // Type: string
447 // RequirementLevel: Optional
448 // Stability: experimental
449 // Examples:
450 // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4'
451 // Note: Follows [OCI Image Manifest
452 // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md),
453 // and specifically the [Digest
454 // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).
455 // An example can be found in [Example Image
456 // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest).
457 OciManifestDigestKey = attribute.Key("oci.manifest.digest")
458 )
459
460 // OciManifestDigest returns an attribute KeyValue conforming to the
461 // "oci.manifest.digest" semantic conventions. It represents the digest of the
462 // OCI image manifest. For container images specifically is the digest by which
463 // the container image is known.
464 func OciManifestDigest(val string) attribute.KeyValue {
465 return OciManifestDigestKey.String(val)
466 }
467
468 // The Android platform on which the Android application is running.
469 const (
470 // AndroidOSAPILevelKey is the attribute Key conforming to the
471 // "android.os.api_level" semantic conventions. It represents the uniquely
472 // identifies the framework API revision offered by a version
473 // (`os.version`) of the android operating system. More information can be
474 // found
475 // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
476 //
477 // Type: string
478 // RequirementLevel: Optional
479 // Stability: experimental
480 // Examples: '33', '32'
481 AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
482 )
483
484 // AndroidOSAPILevel returns an attribute KeyValue conforming to the
485 // "android.os.api_level" semantic conventions. It represents the uniquely
486 // identifies the framework API revision offered by a version (`os.version`) of
487 // the android operating system. More information can be found
488 // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
489 func AndroidOSAPILevel(val string) attribute.KeyValue {
490 return AndroidOSAPILevelKey.String(val)
491 }
492
493 // The web browser in which the application represented by the resource is
494 // running. The `browser.*` attributes MUST be used only for resources that
495 // represent applications running in a web browser (regardless of whether
496 // running on a mobile or desktop device).
497 const (
498 // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
499 // semantic conventions. It represents the array of brand name and version
500 // separated by a space
501 //
502 // Type: string[]
503 // RequirementLevel: Optional
504 // Stability: experimental
505 // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99'
506 // Note: This value is intended to be taken from the [UA client hints
507 // API](https://wicg.github.io/ua-client-hints/#interface)
508 // (`navigator.userAgentData.brands`).
509 BrowserBrandsKey = attribute.Key("browser.brands")
510
511 // BrowserLanguageKey is the attribute Key conforming to the
512 // "browser.language" semantic conventions. It represents the preferred
513 // language of the user using the browser
514 //
515 // Type: string
516 // RequirementLevel: Optional
517 // Stability: experimental
518 // Examples: 'en', 'en-US', 'fr', 'fr-FR'
519 // Note: This value is intended to be taken from the Navigator API
520 // `navigator.language`.
521 BrowserLanguageKey = attribute.Key("browser.language")
522
523 // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
524 // semantic conventions. It represents a boolean that is true if the
525 // browser is running on a mobile device
526 //
527 // Type: boolean
528 // RequirementLevel: Optional
529 // Stability: experimental
530 // Note: This value is intended to be taken from the [UA client hints
531 // API](https://wicg.github.io/ua-client-hints/#interface)
532 // (`navigator.userAgentData.mobile`). If unavailable, this attribute
533 // SHOULD be left unset.
534 BrowserMobileKey = attribute.Key("browser.mobile")
535
536 // BrowserPlatformKey is the attribute Key conforming to the
537 // "browser.platform" semantic conventions. It represents the platform on
538 // which the browser is running
539 //
540 // Type: string
541 // RequirementLevel: Optional
542 // Stability: experimental
543 // Examples: 'Windows', 'macOS', 'Android'
544 // Note: This value is intended to be taken from the [UA client hints
545 // API](https://wicg.github.io/ua-client-hints/#interface)
546 // (`navigator.userAgentData.platform`). If unavailable, the legacy
547 // `navigator.platform` API SHOULD NOT be used instead and this attribute
548 // SHOULD be left unset in order for the values to be consistent.
549 // The list of possible values is defined in the [W3C User-Agent Client
550 // Hints
551 // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform).
552 // Note that some (but not all) of these values can overlap with values in
553 // the [`os.type` and `os.name` attributes](./os.md). However, for
554 // consistency, the values in the `browser.platform` attribute should
555 // capture the exact value that the user agent provides.
556 BrowserPlatformKey = attribute.Key("browser.platform")
557 )
558
559 // BrowserBrands returns an attribute KeyValue conforming to the
560 // "browser.brands" semantic conventions. It represents the array of brand name
561 // and version separated by a space
562 func BrowserBrands(val ...string) attribute.KeyValue {
563 return BrowserBrandsKey.StringSlice(val)
564 }
565
566 // BrowserLanguage returns an attribute KeyValue conforming to the
567 // "browser.language" semantic conventions. It represents the preferred
568 // language of the user using the browser
569 func BrowserLanguage(val string) attribute.KeyValue {
570 return BrowserLanguageKey.String(val)
571 }
572
573 // BrowserMobile returns an attribute KeyValue conforming to the
574 // "browser.mobile" semantic conventions. It represents a boolean that is true
575 // if the browser is running on a mobile device
576 func BrowserMobile(val bool) attribute.KeyValue {
577 return BrowserMobileKey.Bool(val)
578 }
579
580 // BrowserPlatform returns an attribute KeyValue conforming to the
581 // "browser.platform" semantic conventions. It represents the platform on which
582 // the browser is running
583 func BrowserPlatform(val string) attribute.KeyValue {
584 return BrowserPlatformKey.String(val)
585 }
586
587 // Resources used by AWS Elastic Container Service (ECS).
588 const (
589 // AWSECSClusterARNKey is the attribute Key conforming to the
590 // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
591 // [ECS
592 // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
593 //
594 // Type: string
595 // RequirementLevel: Optional
596 // Stability: experimental
597 // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
598 AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
599
600 // AWSECSContainerARNKey is the attribute Key conforming to the
601 // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
602 // Resource Name (ARN) of an [ECS container
603 // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
604 //
605 // Type: string
606 // RequirementLevel: Optional
607 // Stability: experimental
608 // Examples:
609 // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'
610 AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
611
612 // AWSECSLaunchtypeKey is the attribute Key conforming to the
613 // "aws.ecs.launchtype" semantic conventions. It represents the [launch
614 // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
615 // for an ECS task.
616 //
617 // Type: Enum
618 // RequirementLevel: Optional
619 // Stability: experimental
620 AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
621
622 // AWSECSTaskARNKey is the attribute Key conforming to the
623 // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an
624 // [ECS task
625 // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
626 //
627 // Type: string
628 // RequirementLevel: Optional
629 // Stability: experimental
630 // Examples:
631 // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b'
632 AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
633
634 // AWSECSTaskFamilyKey is the attribute Key conforming to the
635 // "aws.ecs.task.family" semantic conventions. It represents the task
636 // definition family this task definition is a member of.
637 //
638 // Type: string
639 // RequirementLevel: Optional
640 // Stability: experimental
641 // Examples: 'opentelemetry-family'
642 AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
643
644 // AWSECSTaskRevisionKey is the attribute Key conforming to the
645 // "aws.ecs.task.revision" semantic conventions. It represents the revision
646 // for this task definition.
647 //
648 // Type: string
649 // RequirementLevel: Optional
650 // Stability: experimental
651 // Examples: '8', '26'
652 AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
653 )
654
655 var (
656 // ec2
657 AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
658 // fargate
659 AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
660 )
661
662 // AWSECSClusterARN returns an attribute KeyValue conforming to the
663 // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS
664 // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
665 func AWSECSClusterARN(val string) attribute.KeyValue {
666 return AWSECSClusterARNKey.String(val)
667 }
668
669 // AWSECSContainerARN returns an attribute KeyValue conforming to the
670 // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
671 // Resource Name (ARN) of an [ECS container
672 // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
673 func AWSECSContainerARN(val string) attribute.KeyValue {
674 return AWSECSContainerARNKey.String(val)
675 }
676
677 // AWSECSTaskARN returns an attribute KeyValue conforming to the
678 // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS
679 // task
680 // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
681 func AWSECSTaskARN(val string) attribute.KeyValue {
682 return AWSECSTaskARNKey.String(val)
683 }
684
685 // AWSECSTaskFamily returns an attribute KeyValue conforming to the
686 // "aws.ecs.task.family" semantic conventions. It represents the task
687 // definition family this task definition is a member of.
688 func AWSECSTaskFamily(val string) attribute.KeyValue {
689 return AWSECSTaskFamilyKey.String(val)
690 }
691
692 // AWSECSTaskRevision returns an attribute KeyValue conforming to the
693 // "aws.ecs.task.revision" semantic conventions. It represents the revision for
694 // this task definition.
695 func AWSECSTaskRevision(val string) attribute.KeyValue {
696 return AWSECSTaskRevisionKey.String(val)
697 }
698
699 // Resources used by AWS Elastic Kubernetes Service (EKS).
700 const (
701 // AWSEKSClusterARNKey is the attribute Key conforming to the
702 // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an
703 // EKS cluster.
704 //
705 // Type: string
706 // RequirementLevel: Optional
707 // Stability: experimental
708 // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
709 AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
710 )
711
712 // AWSEKSClusterARN returns an attribute KeyValue conforming to the
713 // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
714 // cluster.
715 func AWSEKSClusterARN(val string) attribute.KeyValue {
716 return AWSEKSClusterARNKey.String(val)
717 }
718
719 // Resources specific to Amazon Web Services.
720 const (
721 // AWSLogGroupARNsKey is the attribute Key conforming to the
722 // "aws.log.group.arns" semantic conventions. It represents the Amazon
723 // Resource Name(s) (ARN) of the AWS log group(s).
724 //
725 // Type: string[]
726 // RequirementLevel: Optional
727 // Stability: experimental
728 // Examples:
729 // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*'
730 // Note: See the [log group ARN format
731 // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
732 AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
733
734 // AWSLogGroupNamesKey is the attribute Key conforming to the
735 // "aws.log.group.names" semantic conventions. It represents the name(s) of
736 // the AWS log group(s) an application is writing to.
737 //
738 // Type: string[]
739 // RequirementLevel: Optional
740 // Stability: experimental
741 // Examples: '/aws/lambda/my-function', 'opentelemetry-service'
742 // Note: Multiple log groups must be supported for cases like
743 // multi-container applications, where a single application has sidecar
744 // containers, and each write to their own log group.
745 AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
746
747 // AWSLogStreamARNsKey is the attribute Key conforming to the
748 // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of
749 // the AWS log stream(s).
750 //
751 // Type: string[]
752 // RequirementLevel: Optional
753 // Stability: experimental
754 // Examples:
755 // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
756 // Note: See the [log stream ARN format
757 // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
758 // One log group can contain several log streams, so these ARNs necessarily
759 // identify both a log group and a log stream.
760 AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
761
762 // AWSLogStreamNamesKey is the attribute Key conforming to the
763 // "aws.log.stream.names" semantic conventions. It represents the name(s)
764 // of the AWS log stream(s) an application is writing to.
765 //
766 // Type: string[]
767 // RequirementLevel: Optional
768 // Stability: experimental
769 // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
770 AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
771 )
772
773 // AWSLogGroupARNs returns an attribute KeyValue conforming to the
774 // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
775 // Name(s) (ARN) of the AWS log group(s).
776 func AWSLogGroupARNs(val ...string) attribute.KeyValue {
777 return AWSLogGroupARNsKey.StringSlice(val)
778 }
779
780 // AWSLogGroupNames returns an attribute KeyValue conforming to the
781 // "aws.log.group.names" semantic conventions. It represents the name(s) of the
782 // AWS log group(s) an application is writing to.
783 func AWSLogGroupNames(val ...string) attribute.KeyValue {
784 return AWSLogGroupNamesKey.StringSlice(val)
785 }
786
787 // AWSLogStreamARNs returns an attribute KeyValue conforming to the
788 // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
789 // AWS log stream(s).
790 func AWSLogStreamARNs(val ...string) attribute.KeyValue {
791 return AWSLogStreamARNsKey.StringSlice(val)
792 }
793
794 // AWSLogStreamNames returns an attribute KeyValue conforming to the
795 // "aws.log.stream.names" semantic conventions. It represents the name(s) of
796 // the AWS log stream(s) an application is writing to.
797 func AWSLogStreamNames(val ...string) attribute.KeyValue {
798 return AWSLogStreamNamesKey.StringSlice(val)
799 }
800
801 // Resource used by Google Cloud Run.
802 const (
803 // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
804 // "gcp.cloud_run.job.execution" semantic conventions. It represents the
805 // name of the Cloud Run
806 // [execution](https://cloud.google.com/run/docs/managing/job-executions)
807 // being run for the Job, as set by the
808 // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
809 // environment variable.
810 //
811 // Type: string
812 // RequirementLevel: Optional
813 // Stability: experimental
814 // Examples: 'job-name-xxxx', 'sample-job-mdw84'
815 GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
816
817 // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
818 // "gcp.cloud_run.job.task_index" semantic conventions. It represents the
819 // index for a task within an execution as provided by the
820 // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
821 // environment variable.
822 //
823 // Type: int
824 // RequirementLevel: Optional
825 // Stability: experimental
826 // Examples: 0, 1
827 GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
828 )
829
830 // GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
831 // "gcp.cloud_run.job.execution" semantic conventions. It represents the name
832 // of the Cloud Run
833 // [execution](https://cloud.google.com/run/docs/managing/job-executions) being
834 // run for the Job, as set by the
835 // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
836 // environment variable.
837 func GCPCloudRunJobExecution(val string) attribute.KeyValue {
838 return GCPCloudRunJobExecutionKey.String(val)
839 }
840
841 // GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
842 // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
843 // for a task within an execution as provided by the
844 // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
845 // environment variable.
846 func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
847 return GCPCloudRunJobTaskIndexKey.Int(val)
848 }
849
850 // Resources used by Google Compute Engine (GCE).
851 const (
852 // GCPGceInstanceHostnameKey is the attribute Key conforming to the
853 // "gcp.gce.instance.hostname" semantic conventions. It represents the
854 // hostname of a GCE instance. This is the full value of the default or
855 // [custom
856 // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
857 //
858 // Type: string
859 // RequirementLevel: Optional
860 // Stability: experimental
861 // Examples: 'my-host1234.example.com',
862 // 'sample-vm.us-west1-b.c.my-project.internal'
863 GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
864
865 // GCPGceInstanceNameKey is the attribute Key conforming to the
866 // "gcp.gce.instance.name" semantic conventions. It represents the instance
867 // name of a GCE instance. This is the value provided by `host.name`, the
868 // visible name of the instance in the Cloud Console UI, and the prefix for
869 // the default hostname of the instance as defined by the [default internal
870 // DNS
871 // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
872 //
873 // Type: string
874 // RequirementLevel: Optional
875 // Stability: experimental
876 // Examples: 'instance-1', 'my-vm-name'
877 GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name")
878 )
879
880 // GCPGceInstanceHostname returns an attribute KeyValue conforming to the
881 // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
882 // of a GCE instance. This is the full value of the default or [custom
883 // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
884 func GCPGceInstanceHostname(val string) attribute.KeyValue {
885 return GCPGceInstanceHostnameKey.String(val)
886 }
887
888 // GCPGceInstanceName returns an attribute KeyValue conforming to the
889 // "gcp.gce.instance.name" semantic conventions. It represents the instance
890 // name of a GCE instance. This is the value provided by `host.name`, the
891 // visible name of the instance in the Cloud Console UI, and the prefix for the
892 // default hostname of the instance as defined by the [default internal DNS
893 // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
894 func GCPGceInstanceName(val string) attribute.KeyValue {
895 return GCPGceInstanceNameKey.String(val)
896 }
897
898 // Heroku dyno metadata
899 const (
900 // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
901 // semantic conventions. It represents the unique identifier for the
902 // application
903 //
904 // Type: string
905 // RequirementLevel: Optional
906 // Stability: experimental
907 // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da'
908 HerokuAppIDKey = attribute.Key("heroku.app.id")
909
910 // HerokuReleaseCommitKey is the attribute Key conforming to the
911 // "heroku.release.commit" semantic conventions. It represents the commit
912 // hash for the current release
913 //
914 // Type: string
915 // RequirementLevel: Optional
916 // Stability: experimental
917 // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec'
918 HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
919
920 // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
921 // "heroku.release.creation_timestamp" semantic conventions. It represents
922 // the time and date the release was created
923 //
924 // Type: string
925 // RequirementLevel: Optional
926 // Stability: experimental
927 // Examples: '2022-10-23T18:00:42Z'
928 HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
929 )
930
931 // HerokuAppID returns an attribute KeyValue conforming to the
932 // "heroku.app.id" semantic conventions. It represents the unique identifier
933 // for the application
934 func HerokuAppID(val string) attribute.KeyValue {
935 return HerokuAppIDKey.String(val)
936 }
937
938 // HerokuReleaseCommit returns an attribute KeyValue conforming to the
939 // "heroku.release.commit" semantic conventions. It represents the commit hash
940 // for the current release
941 func HerokuReleaseCommit(val string) attribute.KeyValue {
942 return HerokuReleaseCommitKey.String(val)
943 }
944
945 // HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming
946 // to the "heroku.release.creation_timestamp" semantic conventions. It
947 // represents the time and date the release was created
948 func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
949 return HerokuReleaseCreationTimestampKey.String(val)
950 }
951
952 // The software deployment.
953 const (
954 // DeploymentEnvironmentKey is the attribute Key conforming to the
955 // "deployment.environment" semantic conventions. It represents the name of
956 // the [deployment
957 // environment](https://wikipedia.org/wiki/Deployment_environment) (aka
958 // deployment tier).
959 //
960 // Type: string
961 // RequirementLevel: Optional
962 // Stability: experimental
963 // Examples: 'staging', 'production'
964 DeploymentEnvironmentKey = attribute.Key("deployment.environment")
965 )
966
967 // DeploymentEnvironment returns an attribute KeyValue conforming to the
968 // "deployment.environment" semantic conventions. It represents the name of the
969 // [deployment environment](https://wikipedia.org/wiki/Deployment_environment)
970 // (aka deployment tier).
971 func DeploymentEnvironment(val string) attribute.KeyValue {
972 return DeploymentEnvironmentKey.String(val)
973 }
974
975 // The device on which the process represented by this resource is running.
976 const (
977 // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
978 // conventions. It represents a unique identifier representing the device
979 //
980 // Type: string
981 // RequirementLevel: Optional
982 // Stability: experimental
983 // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
984 // Note: The device identifier MUST only be defined using the values
985 // outlined below. This value is not an advertising identifier and MUST NOT
986 // be used as such. On iOS (Swift or Objective-C), this value MUST be equal
987 // to the [vendor
988 // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
989 // On Android (Java or Kotlin), this value MUST be equal to the Firebase
990 // Installation ID or a globally unique UUID which is persisted across
991 // sessions in your application. More information can be found
992 // [here](https://developer.android.com/training/articles/user-data-ids) on
993 // best practices and exact implementation details. Caution should be taken
994 // when storing personal data or anything which can identify a user. GDPR
995 // and data protection laws may apply, ensure you do your own due
996 // diligence.
997 DeviceIDKey = attribute.Key("device.id")
998
999 // DeviceManufacturerKey is the attribute Key conforming to the
1000 // "device.manufacturer" semantic conventions. It represents the name of
1001 // the device manufacturer
1002 //
1003 // Type: string
1004 // RequirementLevel: Optional
1005 // Stability: experimental
1006 // Examples: 'Apple', 'Samsung'
1007 // Note: The Android OS provides this field via
1008 // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
1009 // iOS apps SHOULD hardcode the value `Apple`.
1010 DeviceManufacturerKey = attribute.Key("device.manufacturer")
1011
1012 // DeviceModelIdentifierKey is the attribute Key conforming to the
1013 // "device.model.identifier" semantic conventions. It represents the model
1014 // identifier for the device
1015 //
1016 // Type: string
1017 // RequirementLevel: Optional
1018 // Stability: experimental
1019 // Examples: 'iPhone3,4', 'SM-G920F'
1020 // Note: It's recommended this value represents a machine readable version
1021 // of the model identifier rather than the market or consumer-friendly name
1022 // of the device.
1023 DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
1024
1025 // DeviceModelNameKey is the attribute Key conforming to the
1026 // "device.model.name" semantic conventions. It represents the marketing
1027 // name for the device model
1028 //
1029 // Type: string
1030 // RequirementLevel: Optional
1031 // Stability: experimental
1032 // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
1033 // Note: It's recommended this value represents a human readable version of
1034 // the device model rather than a machine readable alternative.
1035 DeviceModelNameKey = attribute.Key("device.model.name")
1036 )
1037
1038 // DeviceID returns an attribute KeyValue conforming to the "device.id"
1039 // semantic conventions. It represents a unique identifier representing the
1040 // device
1041 func DeviceID(val string) attribute.KeyValue {
1042 return DeviceIDKey.String(val)
1043 }
1044
1045 // DeviceManufacturer returns an attribute KeyValue conforming to the
1046 // "device.manufacturer" semantic conventions. It represents the name of the
1047 // device manufacturer
1048 func DeviceManufacturer(val string) attribute.KeyValue {
1049 return DeviceManufacturerKey.String(val)
1050 }
1051
1052 // DeviceModelIdentifier returns an attribute KeyValue conforming to the
1053 // "device.model.identifier" semantic conventions. It represents the model
1054 // identifier for the device
1055 func DeviceModelIdentifier(val string) attribute.KeyValue {
1056 return DeviceModelIdentifierKey.String(val)
1057 }
1058
1059 // DeviceModelName returns an attribute KeyValue conforming to the
1060 // "device.model.name" semantic conventions. It represents the marketing name
1061 // for the device model
1062 func DeviceModelName(val string) attribute.KeyValue {
1063 return DeviceModelNameKey.String(val)
1064 }
1065
1066 // A serverless instance.
1067 const (
1068 // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
1069 // semantic conventions. It represents the execution environment ID as a
1070 // string, that will be potentially reused for other invocations to the
1071 // same function/function version.
1072 //
1073 // Type: string
1074 // RequirementLevel: Optional
1075 // Stability: experimental
1076 // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
1077 // Note: * **AWS Lambda:** Use the (full) log stream name.
1078 FaaSInstanceKey = attribute.Key("faas.instance")
1079
1080 // FaaSMaxMemoryKey is the attribute Key conforming to the
1081 // "faas.max_memory" semantic conventions. It represents the amount of
1082 // memory available to the serverless function converted to Bytes.
1083 //
1084 // Type: int
1085 // RequirementLevel: Optional
1086 // Stability: experimental
1087 // Examples: 134217728
1088 // Note: It's recommended to set this attribute since e.g. too little
1089 // memory can easily stop a Java AWS Lambda function from working
1090 // correctly. On AWS Lambda, the environment variable
1091 // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must
1092 // be multiplied by 1,048,576).
1093 FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
1094
1095 // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
1096 // conventions. It represents the name of the single function that this
1097 // runtime instance executes.
1098 //
1099 // Type: string
1100 // RequirementLevel: Required
1101 // Stability: experimental
1102 // Examples: 'my-function', 'myazurefunctionapp/some-function-name'
1103 // Note: This is the name of the function as configured/deployed on the
1104 // FaaS
1105 // platform and is usually different from the name of the callback
1106 // function (which may be stored in the
1107 // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
1108 // span attributes).
1109 //
1110 // For some cloud providers, the above definition is ambiguous. The
1111 // following
1112 // definition of function name MUST be used for this attribute
1113 // (and consequently the span name) for the listed cloud
1114 // providers/products:
1115 //
1116 // * **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
1117 // followed by a forward slash followed by the function name (this form
1118 // can also be seen in the resource JSON for the function).
1119 // This means that a span attribute MUST be used, as an Azure function
1120 // app can host multiple functions that would usually share
1121 // a TracerProvider (see also the `cloud.resource_id` attribute).
1122 FaaSNameKey = attribute.Key("faas.name")
1123
1124 // FaaSVersionKey is the attribute Key conforming to the "faas.version"
1125 // semantic conventions. It represents the immutable version of the
1126 // function being executed.
1127 //
1128 // Type: string
1129 // RequirementLevel: Optional
1130 // Stability: experimental
1131 // Examples: '26', 'pinkfroid-00002'
1132 // Note: Depending on the cloud provider and platform, use:
1133 //
1134 // * **AWS Lambda:** The [function
1135 // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
1136 // (an integer represented as a decimal string).
1137 // * **Google Cloud Run (Services):** The
1138 // [revision](https://cloud.google.com/run/docs/managing/revisions)
1139 // (i.e., the function name plus the revision suffix).
1140 // * **Google Cloud Functions:** The value of the
1141 // [`K_REVISION` environment
1142 // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
1143 // * **Azure Functions:** Not applicable. Do not set this attribute.
1144 FaaSVersionKey = attribute.Key("faas.version")
1145 )
1146
1147 // FaaSInstance returns an attribute KeyValue conforming to the
1148 // "faas.instance" semantic conventions. It represents the execution
1149 // environment ID as a string, that will be potentially reused for other
1150 // invocations to the same function/function version.
1151 func FaaSInstance(val string) attribute.KeyValue {
1152 return FaaSInstanceKey.String(val)
1153 }
1154
1155 // FaaSMaxMemory returns an attribute KeyValue conforming to the
1156 // "faas.max_memory" semantic conventions. It represents the amount of memory
1157 // available to the serverless function converted to Bytes.
1158 func FaaSMaxMemory(val int) attribute.KeyValue {
1159 return FaaSMaxMemoryKey.Int(val)
1160 }
1161
1162 // FaaSName returns an attribute KeyValue conforming to the "faas.name"
1163 // semantic conventions. It represents the name of the single function that
1164 // this runtime instance executes.
1165 func FaaSName(val string) attribute.KeyValue {
1166 return FaaSNameKey.String(val)
1167 }
1168
1169 // FaaSVersion returns an attribute KeyValue conforming to the
1170 // "faas.version" semantic conventions. It represents the immutable version of
1171 // the function being executed.
1172 func FaaSVersion(val string) attribute.KeyValue {
1173 return FaaSVersionKey.String(val)
1174 }
1175
1176 // A host is defined as a computing instance. For example, physical servers,
1177 // virtual machines, switches or disk array.
1178 const (
1179 // HostArchKey is the attribute Key conforming to the "host.arch" semantic
1180 // conventions. It represents the CPU architecture the host system is
1181 // running on.
1182 //
1183 // Type: Enum
1184 // RequirementLevel: Optional
1185 // Stability: experimental
1186 HostArchKey = attribute.Key("host.arch")
1187
1188 // HostIDKey is the attribute Key conforming to the "host.id" semantic
1189 // conventions. It represents the unique host ID. For Cloud, this must be
1190 // the instance_id assigned by the cloud provider. For non-containerized
1191 // systems, this should be the `machine-id`. See the table below for the
1192 // sources to use to determine the `machine-id` based on operating system.
1193 //
1194 // Type: string
1195 // RequirementLevel: Optional
1196 // Stability: experimental
1197 // Examples: 'fdbf79e8af94cb7f9e8df36789187052'
1198 HostIDKey = attribute.Key("host.id")
1199
1200 // HostImageIDKey is the attribute Key conforming to the "host.image.id"
1201 // semantic conventions. It represents the vM image ID or host OS image ID.
1202 // For Cloud, this value is from the provider.
1203 //
1204 // Type: string
1205 // RequirementLevel: Optional
1206 // Stability: experimental
1207 // Examples: 'ami-07b06b442921831e5'
1208 HostImageIDKey = attribute.Key("host.image.id")
1209
1210 // HostImageNameKey is the attribute Key conforming to the
1211 // "host.image.name" semantic conventions. It represents the name of the VM
1212 // image or OS install the host was instantiated from.
1213 //
1214 // Type: string
1215 // RequirementLevel: Optional
1216 // Stability: experimental
1217 // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
1218 HostImageNameKey = attribute.Key("host.image.name")
1219
1220 // HostImageVersionKey is the attribute Key conforming to the
1221 // "host.image.version" semantic conventions. It represents the version
1222 // string of the VM image or host OS as defined in [Version
1223 // Attributes](README.md#version-attributes).
1224 //
1225 // Type: string
1226 // RequirementLevel: Optional
1227 // Stability: experimental
1228 // Examples: '0.1'
1229 HostImageVersionKey = attribute.Key("host.image.version")
1230
1231 // HostIPKey is the attribute Key conforming to the "host.ip" semantic
1232 // conventions. It represents the available IP addresses of the host,
1233 // excluding loopback interfaces.
1234 //
1235 // Type: string[]
1236 // RequirementLevel: Optional
1237 // Stability: experimental
1238 // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e'
1239 // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
1240 // addresses MUST be specified in the [RFC
1241 // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
1242 HostIPKey = attribute.Key("host.ip")
1243
1244 // HostMacKey is the attribute Key conforming to the "host.mac" semantic
1245 // conventions. It represents the available MAC addresses of the host,
1246 // excluding loopback interfaces.
1247 //
1248 // Type: string[]
1249 // RequirementLevel: Optional
1250 // Stability: experimental
1251 // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'
1252 // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal
1253 // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
1254 // as hyphen-separated octets in uppercase hexadecimal form from most to
1255 // least significant.
1256 HostMacKey = attribute.Key("host.mac")
1257
1258 // HostNameKey is the attribute Key conforming to the "host.name" semantic
1259 // conventions. It represents the name of the host. On Unix systems, it may
1260 // contain what the hostname command returns, or the fully qualified
1261 // hostname, or another name specified by the user.
1262 //
1263 // Type: string
1264 // RequirementLevel: Optional
1265 // Stability: experimental
1266 // Examples: 'opentelemetry-test'
1267 HostNameKey = attribute.Key("host.name")
1268
1269 // HostTypeKey is the attribute Key conforming to the "host.type" semantic
1270 // conventions. It represents the type of host. For Cloud, this must be the
1271 // machine type.
1272 //
1273 // Type: string
1274 // RequirementLevel: Optional
1275 // Stability: experimental
1276 // Examples: 'n1-standard-1'
1277 HostTypeKey = attribute.Key("host.type")
1278 )
1279
1280 var (
1281 // AMD64
1282 HostArchAMD64 = HostArchKey.String("amd64")
1283 // ARM32
1284 HostArchARM32 = HostArchKey.String("arm32")
1285 // ARM64
1286 HostArchARM64 = HostArchKey.String("arm64")
1287 // Itanium
1288 HostArchIA64 = HostArchKey.String("ia64")
1289 // 32-bit PowerPC
1290 HostArchPPC32 = HostArchKey.String("ppc32")
1291 // 64-bit PowerPC
1292 HostArchPPC64 = HostArchKey.String("ppc64")
1293 // IBM z/Architecture
1294 HostArchS390x = HostArchKey.String("s390x")
1295 // 32-bit x86
1296 HostArchX86 = HostArchKey.String("x86")
1297 )
1298
1299 // HostID returns an attribute KeyValue conforming to the "host.id" semantic
1300 // conventions. It represents the unique host ID. For Cloud, this must be the
1301 // instance_id assigned by the cloud provider. For non-containerized systems,
1302 // this should be the `machine-id`. See the table below for the sources to use
1303 // to determine the `machine-id` based on operating system.
1304 func HostID(val string) attribute.KeyValue {
1305 return HostIDKey.String(val)
1306 }
1307
1308 // HostImageID returns an attribute KeyValue conforming to the
1309 // "host.image.id" semantic conventions. It represents the vM image ID or host
1310 // OS image ID. For Cloud, this value is from the provider.
1311 func HostImageID(val string) attribute.KeyValue {
1312 return HostImageIDKey.String(val)
1313 }
1314
1315 // HostImageName returns an attribute KeyValue conforming to the
1316 // "host.image.name" semantic conventions. It represents the name of the VM
1317 // image or OS install the host was instantiated from.
1318 func HostImageName(val string) attribute.KeyValue {
1319 return HostImageNameKey.String(val)
1320 }
1321
1322 // HostImageVersion returns an attribute KeyValue conforming to the
1323 // "host.image.version" semantic conventions. It represents the version string
1324 // of the VM image or host OS as defined in [Version
1325 // Attributes](README.md#version-attributes).
1326 func HostImageVersion(val string) attribute.KeyValue {
1327 return HostImageVersionKey.String(val)
1328 }
1329
1330 // HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
1331 // conventions. It represents the available IP addresses of the host, excluding
1332 // loopback interfaces.
1333 func HostIP(val ...string) attribute.KeyValue {
1334 return HostIPKey.StringSlice(val)
1335 }
1336
1337 // HostMac returns an attribute KeyValue conforming to the "host.mac"
1338 // semantic conventions. It represents the available MAC addresses of the host,
1339 // excluding loopback interfaces.
1340 func HostMac(val ...string) attribute.KeyValue {
1341 return HostMacKey.StringSlice(val)
1342 }
1343
1344 // HostName returns an attribute KeyValue conforming to the "host.name"
1345 // semantic conventions. It represents the name of the host. On Unix systems,
1346 // it may contain what the hostname command returns, or the fully qualified
1347 // hostname, or another name specified by the user.
1348 func HostName(val string) attribute.KeyValue {
1349 return HostNameKey.String(val)
1350 }
1351
1352 // HostType returns an attribute KeyValue conforming to the "host.type"
1353 // semantic conventions. It represents the type of host. For Cloud, this must
1354 // be the machine type.
1355 func HostType(val string) attribute.KeyValue {
1356 return HostTypeKey.String(val)
1357 }
1358
1359 // A host's CPU information
1360 const (
1361 // HostCPUCacheL2SizeKey is the attribute Key conforming to the
1362 // "host.cpu.cache.l2.size" semantic conventions. It represents the amount
1363 // of level 2 memory cache available to the processor (in Bytes).
1364 //
1365 // Type: int
1366 // RequirementLevel: Optional
1367 // Stability: experimental
1368 // Examples: 12288000
1369 HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
1370
1371 // HostCPUFamilyKey is the attribute Key conforming to the
1372 // "host.cpu.family" semantic conventions. It represents the numeric value
1373 // specifying the family or generation of the CPU.
1374 //
1375 // Type: int
1376 // RequirementLevel: Optional
1377 // Stability: experimental
1378 // Examples: 6
1379 HostCPUFamilyKey = attribute.Key("host.cpu.family")
1380
1381 // HostCPUModelIDKey is the attribute Key conforming to the
1382 // "host.cpu.model.id" semantic conventions. It represents the model
1383 // identifier. It provides more granular information about the CPU,
1384 // distinguishing it from other CPUs within the same family.
1385 //
1386 // Type: int
1387 // RequirementLevel: Optional
1388 // Stability: experimental
1389 // Examples: 6
1390 HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
1391
1392 // HostCPUModelNameKey is the attribute Key conforming to the
1393 // "host.cpu.model.name" semantic conventions. It represents the model
1394 // designation of the processor.
1395 //
1396 // Type: string
1397 // RequirementLevel: Optional
1398 // Stability: experimental
1399 // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz'
1400 HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
1401
1402 // HostCPUSteppingKey is the attribute Key conforming to the
1403 // "host.cpu.stepping" semantic conventions. It represents the stepping or
1404 // core revisions.
1405 //
1406 // Type: int
1407 // RequirementLevel: Optional
1408 // Stability: experimental
1409 // Examples: 1
1410 HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
1411
1412 // HostCPUVendorIDKey is the attribute Key conforming to the
1413 // "host.cpu.vendor.id" semantic conventions. It represents the processor
1414 // manufacturer identifier. A maximum 12-character string.
1415 //
1416 // Type: string
1417 // RequirementLevel: Optional
1418 // Stability: experimental
1419 // Examples: 'GenuineIntel'
1420 // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor
1421 // ID string in EBX, EDX and ECX registers. Writing these to memory in this
1422 // order results in a 12-character string.
1423 HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
1424 )
1425
1426 // HostCPUCacheL2Size returns an attribute KeyValue conforming to the
1427 // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
1428 // level 2 memory cache available to the processor (in Bytes).
1429 func HostCPUCacheL2Size(val int) attribute.KeyValue {
1430 return HostCPUCacheL2SizeKey.Int(val)
1431 }
1432
1433 // HostCPUFamily returns an attribute KeyValue conforming to the
1434 // "host.cpu.family" semantic conventions. It represents the numeric value
1435 // specifying the family or generation of the CPU.
1436 func HostCPUFamily(val int) attribute.KeyValue {
1437 return HostCPUFamilyKey.Int(val)
1438 }
1439
1440 // HostCPUModelID returns an attribute KeyValue conforming to the
1441 // "host.cpu.model.id" semantic conventions. It represents the model
1442 // identifier. It provides more granular information about the CPU,
1443 // distinguishing it from other CPUs within the same family.
1444 func HostCPUModelID(val int) attribute.KeyValue {
1445 return HostCPUModelIDKey.Int(val)
1446 }
1447
1448 // HostCPUModelName returns an attribute KeyValue conforming to the
1449 // "host.cpu.model.name" semantic conventions. It represents the model
1450 // designation of the processor.
1451 func HostCPUModelName(val string) attribute.KeyValue {
1452 return HostCPUModelNameKey.String(val)
1453 }
1454
1455 // HostCPUStepping returns an attribute KeyValue conforming to the
1456 // "host.cpu.stepping" semantic conventions. It represents the stepping or core
1457 // revisions.
1458 func HostCPUStepping(val int) attribute.KeyValue {
1459 return HostCPUSteppingKey.Int(val)
1460 }
1461
1462 // HostCPUVendorID returns an attribute KeyValue conforming to the
1463 // "host.cpu.vendor.id" semantic conventions. It represents the processor
1464 // manufacturer identifier. A maximum 12-character string.
1465 func HostCPUVendorID(val string) attribute.KeyValue {
1466 return HostCPUVendorIDKey.String(val)
1467 }
1468
1469 // A Kubernetes Cluster.
1470 const (
1471 // K8SClusterNameKey is the attribute Key conforming to the
1472 // "k8s.cluster.name" semantic conventions. It represents the name of the
1473 // cluster.
1474 //
1475 // Type: string
1476 // RequirementLevel: Optional
1477 // Stability: experimental
1478 // Examples: 'opentelemetry-cluster'
1479 K8SClusterNameKey = attribute.Key("k8s.cluster.name")
1480
1481 // K8SClusterUIDKey is the attribute Key conforming to the
1482 // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for
1483 // the cluster, set to the UID of the `kube-system` namespace.
1484 //
1485 // Type: string
1486 // RequirementLevel: Optional
1487 // Stability: experimental
1488 // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d'
1489 // Note: K8S doesn't have support for obtaining a cluster ID. If this is
1490 // ever
1491 // added, we will recommend collecting the `k8s.cluster.uid` through the
1492 // official APIs. In the meantime, we are able to use the `uid` of the
1493 // `kube-system` namespace as a proxy for cluster ID. Read on for the
1494 // rationale.
1495 //
1496 // Every object created in a K8S cluster is assigned a distinct UID. The
1497 // `kube-system` namespace is used by Kubernetes itself and will exist
1498 // for the lifetime of the cluster. Using the `uid` of the `kube-system`
1499 // namespace is a reasonable proxy for the K8S ClusterID as it will only
1500 // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
1501 // UUIDs as standardized by
1502 // [ISO/IEC 9834-8 and ITU-T
1503 // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).
1504 // Which states:
1505 //
1506 // > If generated according to one of the mechanisms defined in Rec.
1507 // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
1508 // different from all other UUIDs generated before 3603 A.D., or is
1509 // extremely likely to be different (depending on the mechanism chosen).
1510 //
1511 // Therefore, UIDs between clusters should be extremely unlikely to
1512 // conflict.
1513 K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
1514 )
1515
1516 // K8SClusterName returns an attribute KeyValue conforming to the
1517 // "k8s.cluster.name" semantic conventions. It represents the name of the
1518 // cluster.
1519 func K8SClusterName(val string) attribute.KeyValue {
1520 return K8SClusterNameKey.String(val)
1521 }
1522
1523 // K8SClusterUID returns an attribute KeyValue conforming to the
1524 // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
1525 // cluster, set to the UID of the `kube-system` namespace.
1526 func K8SClusterUID(val string) attribute.KeyValue {
1527 return K8SClusterUIDKey.String(val)
1528 }
1529
1530 // A Kubernetes Node object.
1531 const (
1532 // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
1533 // semantic conventions. It represents the name of the Node.
1534 //
1535 // Type: string
1536 // RequirementLevel: Optional
1537 // Stability: experimental
1538 // Examples: 'node-1'
1539 K8SNodeNameKey = attribute.Key("k8s.node.name")
1540
1541 // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
1542 // semantic conventions. It represents the UID of the Node.
1543 //
1544 // Type: string
1545 // RequirementLevel: Optional
1546 // Stability: experimental
1547 // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
1548 K8SNodeUIDKey = attribute.Key("k8s.node.uid")
1549 )
1550
1551 // K8SNodeName returns an attribute KeyValue conforming to the
1552 // "k8s.node.name" semantic conventions. It represents the name of the Node.
1553 func K8SNodeName(val string) attribute.KeyValue {
1554 return K8SNodeNameKey.String(val)
1555 }
1556
1557 // K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
1558 // semantic conventions. It represents the UID of the Node.
1559 func K8SNodeUID(val string) attribute.KeyValue {
1560 return K8SNodeUIDKey.String(val)
1561 }
1562
1563 // A Kubernetes Namespace.
1564 const (
1565 // K8SNamespaceNameKey is the attribute Key conforming to the
1566 // "k8s.namespace.name" semantic conventions. It represents the name of the
1567 // namespace that the pod is running in.
1568 //
1569 // Type: string
1570 // RequirementLevel: Optional
1571 // Stability: experimental
1572 // Examples: 'default'
1573 K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
1574 )
1575
1576 // K8SNamespaceName returns an attribute KeyValue conforming to the
1577 // "k8s.namespace.name" semantic conventions. It represents the name of the
1578 // namespace that the pod is running in.
1579 func K8SNamespaceName(val string) attribute.KeyValue {
1580 return K8SNamespaceNameKey.String(val)
1581 }
1582
1583 // A Kubernetes Pod object.
1584 const (
1585 // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
1586 // semantic conventions. It represents the name of the Pod.
1587 //
1588 // Type: string
1589 // RequirementLevel: Optional
1590 // Stability: experimental
1591 // Examples: 'opentelemetry-pod-autoconf'
1592 K8SPodNameKey = attribute.Key("k8s.pod.name")
1593
1594 // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
1595 // semantic conventions. It represents the UID of the Pod.
1596 //
1597 // Type: string
1598 // RequirementLevel: Optional
1599 // Stability: experimental
1600 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
1601 K8SPodUIDKey = attribute.Key("k8s.pod.uid")
1602 )
1603
1604 // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
1605 // semantic conventions. It represents the name of the Pod.
1606 func K8SPodName(val string) attribute.KeyValue {
1607 return K8SPodNameKey.String(val)
1608 }
1609
1610 // K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
1611 // semantic conventions. It represents the UID of the Pod.
1612 func K8SPodUID(val string) attribute.KeyValue {
1613 return K8SPodUIDKey.String(val)
1614 }
1615
1616 // A container in a
1617 // [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates).
1618 const (
1619 // K8SContainerNameKey is the attribute Key conforming to the
1620 // "k8s.container.name" semantic conventions. It represents the name of the
1621 // Container from Pod specification, must be unique within a Pod. Container
1622 // runtime usually uses different globally unique name (`container.name`).
1623 //
1624 // Type: string
1625 // RequirementLevel: Optional
1626 // Stability: experimental
1627 // Examples: 'redis'
1628 K8SContainerNameKey = attribute.Key("k8s.container.name")
1629
1630 // K8SContainerRestartCountKey is the attribute Key conforming to the
1631 // "k8s.container.restart_count" semantic conventions. It represents the
1632 // number of times the container was restarted. This attribute can be used
1633 // to identify a particular container (running or stopped) within a
1634 // container spec.
1635 //
1636 // Type: int
1637 // RequirementLevel: Optional
1638 // Stability: experimental
1639 // Examples: 0, 2
1640 K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
1641 )
1642
1643 // K8SContainerName returns an attribute KeyValue conforming to the
1644 // "k8s.container.name" semantic conventions. It represents the name of the
1645 // Container from Pod specification, must be unique within a Pod. Container
1646 // runtime usually uses different globally unique name (`container.name`).
1647 func K8SContainerName(val string) attribute.KeyValue {
1648 return K8SContainerNameKey.String(val)
1649 }
1650
1651 // K8SContainerRestartCount returns an attribute KeyValue conforming to the
1652 // "k8s.container.restart_count" semantic conventions. It represents the number
1653 // of times the container was restarted. This attribute can be used to identify
1654 // a particular container (running or stopped) within a container spec.
1655 func K8SContainerRestartCount(val int) attribute.KeyValue {
1656 return K8SContainerRestartCountKey.Int(val)
1657 }
1658
1659 // A Kubernetes ReplicaSet object.
1660 const (
1661 // K8SReplicaSetNameKey is the attribute Key conforming to the
1662 // "k8s.replicaset.name" semantic conventions. It represents the name of
1663 // the ReplicaSet.
1664 //
1665 // Type: string
1666 // RequirementLevel: Optional
1667 // Stability: experimental
1668 // Examples: 'opentelemetry'
1669 K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
1670
1671 // K8SReplicaSetUIDKey is the attribute Key conforming to the
1672 // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
1673 // ReplicaSet.
1674 //
1675 // Type: string
1676 // RequirementLevel: Optional
1677 // Stability: experimental
1678 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
1679 K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
1680 )
1681
1682 // K8SReplicaSetName returns an attribute KeyValue conforming to the
1683 // "k8s.replicaset.name" semantic conventions. It represents the name of the
1684 // ReplicaSet.
1685 func K8SReplicaSetName(val string) attribute.KeyValue {
1686 return K8SReplicaSetNameKey.String(val)
1687 }
1688
1689 // K8SReplicaSetUID returns an attribute KeyValue conforming to the
1690 // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
1691 // ReplicaSet.
1692 func K8SReplicaSetUID(val string) attribute.KeyValue {
1693 return K8SReplicaSetUIDKey.String(val)
1694 }
1695
1696 // A Kubernetes Deployment object.
1697 const (
1698 // K8SDeploymentNameKey is the attribute Key conforming to the
1699 // "k8s.deployment.name" semantic conventions. It represents the name of
1700 // the Deployment.
1701 //
1702 // Type: string
1703 // RequirementLevel: Optional
1704 // Stability: experimental
1705 // Examples: 'opentelemetry'
1706 K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
1707
1708 // K8SDeploymentUIDKey is the attribute Key conforming to the
1709 // "k8s.deployment.uid" semantic conventions. It represents the UID of the
1710 // Deployment.
1711 //
1712 // Type: string
1713 // RequirementLevel: Optional
1714 // Stability: experimental
1715 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
1716 K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
1717 )
1718
1719 // K8SDeploymentName returns an attribute KeyValue conforming to the
1720 // "k8s.deployment.name" semantic conventions. It represents the name of the
1721 // Deployment.
1722 func K8SDeploymentName(val string) attribute.KeyValue {
1723 return K8SDeploymentNameKey.String(val)
1724 }
1725
1726 // K8SDeploymentUID returns an attribute KeyValue conforming to the
1727 // "k8s.deployment.uid" semantic conventions. It represents the UID of the
1728 // Deployment.
1729 func K8SDeploymentUID(val string) attribute.KeyValue {
1730 return K8SDeploymentUIDKey.String(val)
1731 }
1732
1733 // A Kubernetes StatefulSet object.
1734 const (
1735 // K8SStatefulSetNameKey is the attribute Key conforming to the
1736 // "k8s.statefulset.name" semantic conventions. It represents the name of
1737 // the StatefulSet.
1738 //
1739 // Type: string
1740 // RequirementLevel: Optional
1741 // Stability: experimental
1742 // Examples: 'opentelemetry'
1743 K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
1744
1745 // K8SStatefulSetUIDKey is the attribute Key conforming to the
1746 // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
1747 // StatefulSet.
1748 //
1749 // Type: string
1750 // RequirementLevel: Optional
1751 // Stability: experimental
1752 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
1753 K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
1754 )
1755
1756 // K8SStatefulSetName returns an attribute KeyValue conforming to the
1757 // "k8s.statefulset.name" semantic conventions. It represents the name of the
1758 // StatefulSet.
1759 func K8SStatefulSetName(val string) attribute.KeyValue {
1760 return K8SStatefulSetNameKey.String(val)
1761 }
1762
1763 // K8SStatefulSetUID returns an attribute KeyValue conforming to the
1764 // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
1765 // StatefulSet.
1766 func K8SStatefulSetUID(val string) attribute.KeyValue {
1767 return K8SStatefulSetUIDKey.String(val)
1768 }
1769
1770 // A Kubernetes DaemonSet object.
1771 const (
1772 // K8SDaemonSetNameKey is the attribute Key conforming to the
1773 // "k8s.daemonset.name" semantic conventions. It represents the name of the
1774 // DaemonSet.
1775 //
1776 // Type: string
1777 // RequirementLevel: Optional
1778 // Stability: experimental
1779 // Examples: 'opentelemetry'
1780 K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
1781
1782 // K8SDaemonSetUIDKey is the attribute Key conforming to the
1783 // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
1784 // DaemonSet.
1785 //
1786 // Type: string
1787 // RequirementLevel: Optional
1788 // Stability: experimental
1789 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
1790 K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
1791 )
1792
1793 // K8SDaemonSetName returns an attribute KeyValue conforming to the
1794 // "k8s.daemonset.name" semantic conventions. It represents the name of the
1795 // DaemonSet.
1796 func K8SDaemonSetName(val string) attribute.KeyValue {
1797 return K8SDaemonSetNameKey.String(val)
1798 }
1799
1800 // K8SDaemonSetUID returns an attribute KeyValue conforming to the
1801 // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
1802 // DaemonSet.
1803 func K8SDaemonSetUID(val string) attribute.KeyValue {
1804 return K8SDaemonSetUIDKey.String(val)
1805 }
1806
1807 // A Kubernetes Job object.
1808 const (
1809 // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
1810 // semantic conventions. It represents the name of the Job.
1811 //
1812 // Type: string
1813 // RequirementLevel: Optional
1814 // Stability: experimental
1815 // Examples: 'opentelemetry'
1816 K8SJobNameKey = attribute.Key("k8s.job.name")
1817
1818 // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
1819 // semantic conventions. It represents the UID of the Job.
1820 //
1821 // Type: string
1822 // RequirementLevel: Optional
1823 // Stability: experimental
1824 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
1825 K8SJobUIDKey = attribute.Key("k8s.job.uid")
1826 )
1827
1828 // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
1829 // semantic conventions. It represents the name of the Job.
1830 func K8SJobName(val string) attribute.KeyValue {
1831 return K8SJobNameKey.String(val)
1832 }
1833
1834 // K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
1835 // semantic conventions. It represents the UID of the Job.
1836 func K8SJobUID(val string) attribute.KeyValue {
1837 return K8SJobUIDKey.String(val)
1838 }
1839
1840 // A Kubernetes CronJob object.
1841 const (
1842 // K8SCronJobNameKey is the attribute Key conforming to the
1843 // "k8s.cronjob.name" semantic conventions. It represents the name of the
1844 // CronJob.
1845 //
1846 // Type: string
1847 // RequirementLevel: Optional
1848 // Stability: experimental
1849 // Examples: 'opentelemetry'
1850 K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
1851
1852 // K8SCronJobUIDKey is the attribute Key conforming to the
1853 // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
1854 // CronJob.
1855 //
1856 // Type: string
1857 // RequirementLevel: Optional
1858 // Stability: experimental
1859 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
1860 K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
1861 )
1862
1863 // K8SCronJobName returns an attribute KeyValue conforming to the
1864 // "k8s.cronjob.name" semantic conventions. It represents the name of the
1865 // CronJob.
1866 func K8SCronJobName(val string) attribute.KeyValue {
1867 return K8SCronJobNameKey.String(val)
1868 }
1869
1870 // K8SCronJobUID returns an attribute KeyValue conforming to the
1871 // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
1872 // CronJob.
1873 func K8SCronJobUID(val string) attribute.KeyValue {
1874 return K8SCronJobUIDKey.String(val)
1875 }
1876
1877 // The operating system (OS) on which the process represented by this resource
1878 // is running.
1879 const (
1880 // OSBuildIDKey is the attribute Key conforming to the "os.build_id"
1881 // semantic conventions. It represents the unique identifier for a
1882 // particular build or compilation of the operating system.
1883 //
1884 // Type: string
1885 // RequirementLevel: Optional
1886 // Stability: experimental
1887 // Examples: 'TQ3C.230805.001.B2', '20E247', '22621'
1888 OSBuildIDKey = attribute.Key("os.build_id")
1889
1890 // OSDescriptionKey is the attribute Key conforming to the "os.description"
1891 // semantic conventions. It represents the human readable (not intended to
1892 // be parsed) OS version information, like e.g. reported by `ver` or
1893 // `lsb_release -a` commands.
1894 //
1895 // Type: string
1896 // RequirementLevel: Optional
1897 // Stability: experimental
1898 // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
1899 // LTS'
1900 OSDescriptionKey = attribute.Key("os.description")
1901
1902 // OSNameKey is the attribute Key conforming to the "os.name" semantic
1903 // conventions. It represents the human readable operating system name.
1904 //
1905 // Type: string
1906 // RequirementLevel: Optional
1907 // Stability: experimental
1908 // Examples: 'iOS', 'Android', 'Ubuntu'
1909 OSNameKey = attribute.Key("os.name")
1910
1911 // OSTypeKey is the attribute Key conforming to the "os.type" semantic
1912 // conventions. It represents the operating system type.
1913 //
1914 // Type: Enum
1915 // RequirementLevel: Required
1916 // Stability: experimental
1917 OSTypeKey = attribute.Key("os.type")
1918
1919 // OSVersionKey is the attribute Key conforming to the "os.version"
1920 // semantic conventions. It represents the version string of the operating
1921 // system as defined in [Version
1922 // Attributes](/docs/resource/README.md#version-attributes).
1923 //
1924 // Type: string
1925 // RequirementLevel: Optional
1926 // Stability: experimental
1927 // Examples: '14.2.1', '18.04.1'
1928 OSVersionKey = attribute.Key("os.version")
1929 )
1930
1931 var (
1932 // Microsoft Windows
1933 OSTypeWindows = OSTypeKey.String("windows")
1934 // Linux
1935 OSTypeLinux = OSTypeKey.String("linux")
1936 // Apple Darwin
1937 OSTypeDarwin = OSTypeKey.String("darwin")
1938 // FreeBSD
1939 OSTypeFreeBSD = OSTypeKey.String("freebsd")
1940 // NetBSD
1941 OSTypeNetBSD = OSTypeKey.String("netbsd")
1942 // OpenBSD
1943 OSTypeOpenBSD = OSTypeKey.String("openbsd")
1944 // DragonFly BSD
1945 OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
1946 // HP-UX (Hewlett Packard Unix)
1947 OSTypeHPUX = OSTypeKey.String("hpux")
1948 // AIX (Advanced Interactive eXecutive)
1949 OSTypeAIX = OSTypeKey.String("aix")
1950 // SunOS, Oracle Solaris
1951 OSTypeSolaris = OSTypeKey.String("solaris")
1952 // IBM z/OS
1953 OSTypeZOS = OSTypeKey.String("z_os")
1954 )
1955
1956 // OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
1957 // semantic conventions. It represents the unique identifier for a particular
1958 // build or compilation of the operating system.
1959 func OSBuildID(val string) attribute.KeyValue {
1960 return OSBuildIDKey.String(val)
1961 }
1962
1963 // OSDescription returns an attribute KeyValue conforming to the
1964 // "os.description" semantic conventions. It represents the human readable (not
1965 // intended to be parsed) OS version information, like e.g. reported by `ver`
1966 // or `lsb_release -a` commands.
1967 func OSDescription(val string) attribute.KeyValue {
1968 return OSDescriptionKey.String(val)
1969 }
1970
1971 // OSName returns an attribute KeyValue conforming to the "os.name" semantic
1972 // conventions. It represents the human readable operating system name.
1973 func OSName(val string) attribute.KeyValue {
1974 return OSNameKey.String(val)
1975 }
1976
1977 // OSVersion returns an attribute KeyValue conforming to the "os.version"
1978 // semantic conventions. It represents the version string of the operating
1979 // system as defined in [Version
1980 // Attributes](/docs/resource/README.md#version-attributes).
1981 func OSVersion(val string) attribute.KeyValue {
1982 return OSVersionKey.String(val)
1983 }
1984
1985 // An operating system process.
1986 const (
1987 // ProcessCommandKey is the attribute Key conforming to the
1988 // "process.command" semantic conventions. It represents the command used
1989 // to launch the process (i.e. the command name). On Linux based systems,
1990 // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
1991 // be set to the first parameter extracted from `GetCommandLineW`.
1992 //
1993 // Type: string
1994 // RequirementLevel: ConditionallyRequired (See alternative attributes
1995 // below.)
1996 // Stability: experimental
1997 // Examples: 'cmd/otelcol'
1998 ProcessCommandKey = attribute.Key("process.command")
1999
2000 // ProcessCommandArgsKey is the attribute Key conforming to the
2001 // "process.command_args" semantic conventions. It represents the all the
2002 // command arguments (including the command/executable itself) as received
2003 // by the process. On Linux-based systems (and some other Unixoid systems
2004 // supporting procfs), can be set according to the list of null-delimited
2005 // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
2006 // this would be the full argv vector passed to `main`.
2007 //
2008 // Type: string[]
2009 // RequirementLevel: ConditionallyRequired (See alternative attributes
2010 // below.)
2011 // Stability: experimental
2012 // Examples: 'cmd/otecol', '--config=config.yaml'
2013 ProcessCommandArgsKey = attribute.Key("process.command_args")
2014
2015 // ProcessCommandLineKey is the attribute Key conforming to the
2016 // "process.command_line" semantic conventions. It represents the full
2017 // command used to launch the process as a single string representing the
2018 // full command. On Windows, can be set to the result of `GetCommandLineW`.
2019 // Do not set this if you have to assemble it just for monitoring; use
2020 // `process.command_args` instead.
2021 //
2022 // Type: string
2023 // RequirementLevel: ConditionallyRequired (See alternative attributes
2024 // below.)
2025 // Stability: experimental
2026 // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
2027 ProcessCommandLineKey = attribute.Key("process.command_line")
2028
2029 // ProcessExecutableNameKey is the attribute Key conforming to the
2030 // "process.executable.name" semantic conventions. It represents the name
2031 // of the process executable. On Linux based systems, can be set to the
2032 // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
2033 // of `GetProcessImageFileNameW`.
2034 //
2035 // Type: string
2036 // RequirementLevel: ConditionallyRequired (See alternative attributes
2037 // below.)
2038 // Stability: experimental
2039 // Examples: 'otelcol'
2040 ProcessExecutableNameKey = attribute.Key("process.executable.name")
2041
2042 // ProcessExecutablePathKey is the attribute Key conforming to the
2043 // "process.executable.path" semantic conventions. It represents the full
2044 // path to the process executable. On Linux based systems, can be set to
2045 // the target of `proc/[pid]/exe`. On Windows, can be set to the result of
2046 // `GetProcessImageFileNameW`.
2047 //
2048 // Type: string
2049 // RequirementLevel: ConditionallyRequired (See alternative attributes
2050 // below.)
2051 // Stability: experimental
2052 // Examples: '/usr/bin/cmd/otelcol'
2053 ProcessExecutablePathKey = attribute.Key("process.executable.path")
2054
2055 // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
2056 // semantic conventions. It represents the username of the user that owns
2057 // the process.
2058 //
2059 // Type: string
2060 // RequirementLevel: Optional
2061 // Stability: experimental
2062 // Examples: 'root'
2063 ProcessOwnerKey = attribute.Key("process.owner")
2064
2065 // ProcessParentPIDKey is the attribute Key conforming to the
2066 // "process.parent_pid" semantic conventions. It represents the parent
2067 // Process identifier (PID).
2068 //
2069 // Type: int
2070 // RequirementLevel: Optional
2071 // Stability: experimental
2072 // Examples: 111
2073 ProcessParentPIDKey = attribute.Key("process.parent_pid")
2074
2075 // ProcessPIDKey is the attribute Key conforming to the "process.pid"
2076 // semantic conventions. It represents the process identifier (PID).
2077 //
2078 // Type: int
2079 // RequirementLevel: Optional
2080 // Stability: experimental
2081 // Examples: 1234
2082 ProcessPIDKey = attribute.Key("process.pid")
2083 )
2084
2085 // ProcessCommand returns an attribute KeyValue conforming to the
2086 // "process.command" semantic conventions. It represents the command used to
2087 // launch the process (i.e. the command name). On Linux based systems, can be
2088 // set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
2089 // the first parameter extracted from `GetCommandLineW`.
2090 func ProcessCommand(val string) attribute.KeyValue {
2091 return ProcessCommandKey.String(val)
2092 }
2093
2094 // ProcessCommandArgs returns an attribute KeyValue conforming to the
2095 // "process.command_args" semantic conventions. It represents the all the
2096 // command arguments (including the command/executable itself) as received by
2097 // the process. On Linux-based systems (and some other Unixoid systems
2098 // supporting procfs), can be set according to the list of null-delimited
2099 // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
2100 // this would be the full argv vector passed to `main`.
2101 func ProcessCommandArgs(val ...string) attribute.KeyValue {
2102 return ProcessCommandArgsKey.StringSlice(val)
2103 }
2104
2105 // ProcessCommandLine returns an attribute KeyValue conforming to the
2106 // "process.command_line" semantic conventions. It represents the full command
2107 // used to launch the process as a single string representing the full command.
2108 // On Windows, can be set to the result of `GetCommandLineW`. Do not set this
2109 // if you have to assemble it just for monitoring; use `process.command_args`
2110 // instead.
2111 func ProcessCommandLine(val string) attribute.KeyValue {
2112 return ProcessCommandLineKey.String(val)
2113 }
2114
2115 // ProcessExecutableName returns an attribute KeyValue conforming to the
2116 // "process.executable.name" semantic conventions. It represents the name of
2117 // the process executable. On Linux based systems, can be set to the `Name` in
2118 // `proc/[pid]/status`. On Windows, can be set to the base name of
2119 // `GetProcessImageFileNameW`.
2120 func ProcessExecutableName(val string) attribute.KeyValue {
2121 return ProcessExecutableNameKey.String(val)
2122 }
2123
2124 // ProcessExecutablePath returns an attribute KeyValue conforming to the
2125 // "process.executable.path" semantic conventions. It represents the full path
2126 // to the process executable. On Linux based systems, can be set to the target
2127 // of `proc/[pid]/exe`. On Windows, can be set to the result of
2128 // `GetProcessImageFileNameW`.
2129 func ProcessExecutablePath(val string) attribute.KeyValue {
2130 return ProcessExecutablePathKey.String(val)
2131 }
2132
2133 // ProcessOwner returns an attribute KeyValue conforming to the
2134 // "process.owner" semantic conventions. It represents the username of the user
2135 // that owns the process.
2136 func ProcessOwner(val string) attribute.KeyValue {
2137 return ProcessOwnerKey.String(val)
2138 }
2139
2140 // ProcessParentPID returns an attribute KeyValue conforming to the
2141 // "process.parent_pid" semantic conventions. It represents the parent Process
2142 // identifier (PID).
2143 func ProcessParentPID(val int) attribute.KeyValue {
2144 return ProcessParentPIDKey.Int(val)
2145 }
2146
2147 // ProcessPID returns an attribute KeyValue conforming to the "process.pid"
2148 // semantic conventions. It represents the process identifier (PID).
2149 func ProcessPID(val int) attribute.KeyValue {
2150 return ProcessPIDKey.Int(val)
2151 }
2152
2153 // The single (language) runtime instance which is monitored.
2154 const (
2155 // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
2156 // "process.runtime.description" semantic conventions. It represents an
2157 // additional description about the runtime of the process, for example a
2158 // specific vendor customization of the runtime environment.
2159 //
2160 // Type: string
2161 // RequirementLevel: Optional
2162 // Stability: experimental
2163 // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
2164 ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
2165
2166 // ProcessRuntimeNameKey is the attribute Key conforming to the
2167 // "process.runtime.name" semantic conventions. It represents the name of
2168 // the runtime of this process. For compiled native binaries, this SHOULD
2169 // be the name of the compiler.
2170 //
2171 // Type: string
2172 // RequirementLevel: Optional
2173 // Stability: experimental
2174 // Examples: 'OpenJDK Runtime Environment'
2175 ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
2176
2177 // ProcessRuntimeVersionKey is the attribute Key conforming to the
2178 // "process.runtime.version" semantic conventions. It represents the
2179 // version of the runtime of this process, as returned by the runtime
2180 // without modification.
2181 //
2182 // Type: string
2183 // RequirementLevel: Optional
2184 // Stability: experimental
2185 // Examples: '14.0.2'
2186 ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
2187 )
2188
2189 // ProcessRuntimeDescription returns an attribute KeyValue conforming to the
2190 // "process.runtime.description" semantic conventions. It represents an
2191 // additional description about the runtime of the process, for example a
2192 // specific vendor customization of the runtime environment.
2193 func ProcessRuntimeDescription(val string) attribute.KeyValue {
2194 return ProcessRuntimeDescriptionKey.String(val)
2195 }
2196
2197 // ProcessRuntimeName returns an attribute KeyValue conforming to the
2198 // "process.runtime.name" semantic conventions. It represents the name of the
2199 // runtime of this process. For compiled native binaries, this SHOULD be the
2200 // name of the compiler.
2201 func ProcessRuntimeName(val string) attribute.KeyValue {
2202 return ProcessRuntimeNameKey.String(val)
2203 }
2204
2205 // ProcessRuntimeVersion returns an attribute KeyValue conforming to the
2206 // "process.runtime.version" semantic conventions. It represents the version of
2207 // the runtime of this process, as returned by the runtime without
2208 // modification.
2209 func ProcessRuntimeVersion(val string) attribute.KeyValue {
2210 return ProcessRuntimeVersionKey.String(val)
2211 }
2212
2213 // A service instance.
2214 const (
2215 // ServiceNameKey is the attribute Key conforming to the "service.name"
2216 // semantic conventions. It represents the logical name of the service.
2217 //
2218 // Type: string
2219 // RequirementLevel: Required
2220 // Stability: experimental
2221 // Examples: 'shoppingcart'
2222 // Note: MUST be the same for all instances of horizontally scaled
2223 // services. If the value was not specified, SDKs MUST fallback to
2224 // `unknown_service:` concatenated with
2225 // [`process.executable.name`](process.md#process), e.g.
2226 // `unknown_service:bash`. If `process.executable.name` is not available,
2227 // the value MUST be set to `unknown_service`.
2228 ServiceNameKey = attribute.Key("service.name")
2229
2230 // ServiceVersionKey is the attribute Key conforming to the
2231 // "service.version" semantic conventions. It represents the version string
2232 // of the service API or implementation. The format is not defined by these
2233 // conventions.
2234 //
2235 // Type: string
2236 // RequirementLevel: Optional
2237 // Stability: experimental
2238 // Examples: '2.0.0', 'a01dbef8a'
2239 ServiceVersionKey = attribute.Key("service.version")
2240 )
2241
2242 // ServiceName returns an attribute KeyValue conforming to the
2243 // "service.name" semantic conventions. It represents the logical name of the
2244 // service.
2245 func ServiceName(val string) attribute.KeyValue {
2246 return ServiceNameKey.String(val)
2247 }
2248
2249 // ServiceVersion returns an attribute KeyValue conforming to the
2250 // "service.version" semantic conventions. It represents the version string of
2251 // the service API or implementation. The format is not defined by these
2252 // conventions.
2253 func ServiceVersion(val string) attribute.KeyValue {
2254 return ServiceVersionKey.String(val)
2255 }
2256
2257 // A service instance.
2258 const (
2259 // ServiceInstanceIDKey is the attribute Key conforming to the
2260 // "service.instance.id" semantic conventions. It represents the string ID
2261 // of the service instance.
2262 //
2263 // Type: string
2264 // RequirementLevel: Optional
2265 // Stability: experimental
2266 // Examples: 'my-k8s-pod-deployment-1',
2267 // '627cc493-f310-47de-96bd-71410b7dec09'
2268 // Note: MUST be unique for each instance of the same
2269 // `service.namespace,service.name` pair (in other words
2270 // `service.namespace,service.name,service.instance.id` triplet MUST be
2271 // globally unique). The ID helps to distinguish instances of the same
2272 // service that exist at the same time (e.g. instances of a horizontally
2273 // scaled service). It is preferable for the ID to be persistent and stay
2274 // the same for the lifetime of the service instance, however it is
2275 // acceptable that the ID is ephemeral and changes during important
2276 // lifetime events for the service (e.g. service restarts). If the service
2277 // has no inherent unique ID that can be used as the value of this
2278 // attribute it is recommended to generate a random Version 1 or Version 4
2279 // RFC 4122 UUID (services aiming for reproducible UUIDs may also use
2280 // Version 5, see RFC 4122 for more recommendations).
2281 ServiceInstanceIDKey = attribute.Key("service.instance.id")
2282
2283 // ServiceNamespaceKey is the attribute Key conforming to the
2284 // "service.namespace" semantic conventions. It represents a namespace for
2285 // `service.name`.
2286 //
2287 // Type: string
2288 // RequirementLevel: Optional
2289 // Stability: experimental
2290 // Examples: 'Shop'
2291 // Note: A string value having a meaning that helps to distinguish a group
2292 // of services, for example the team name that owns a group of services.
2293 // `service.name` is expected to be unique within the same namespace. If
2294 // `service.namespace` is not specified in the Resource then `service.name`
2295 // is expected to be unique for all services that have no explicit
2296 // namespace defined (so the empty/unspecified namespace is simply one more
2297 // valid namespace). Zero-length namespace string is assumed equal to
2298 // unspecified namespace.
2299 ServiceNamespaceKey = attribute.Key("service.namespace")
2300 )
2301
2302 // ServiceInstanceID returns an attribute KeyValue conforming to the
2303 // "service.instance.id" semantic conventions. It represents the string ID of
2304 // the service instance.
2305 func ServiceInstanceID(val string) attribute.KeyValue {
2306 return ServiceInstanceIDKey.String(val)
2307 }
2308
2309 // ServiceNamespace returns an attribute KeyValue conforming to the
2310 // "service.namespace" semantic conventions. It represents a namespace for
2311 // `service.name`.
2312 func ServiceNamespace(val string) attribute.KeyValue {
2313 return ServiceNamespaceKey.String(val)
2314 }
2315
2316 // The telemetry SDK used to capture data recorded by the instrumentation
2317 // libraries.
2318 const (
2319 // TelemetrySDKLanguageKey is the attribute Key conforming to the
2320 // "telemetry.sdk.language" semantic conventions. It represents the
2321 // language of the telemetry SDK.
2322 //
2323 // Type: Enum
2324 // RequirementLevel: Required
2325 // Stability: experimental
2326 TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
2327
2328 // TelemetrySDKNameKey is the attribute Key conforming to the
2329 // "telemetry.sdk.name" semantic conventions. It represents the name of the
2330 // telemetry SDK as defined above.
2331 //
2332 // Type: string
2333 // RequirementLevel: Required
2334 // Stability: experimental
2335 // Examples: 'opentelemetry'
2336 // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute
2337 // to `opentelemetry`.
2338 // If another SDK, like a fork or a vendor-provided implementation, is
2339 // used, this SDK MUST set the
2340 // `telemetry.sdk.name` attribute to the fully-qualified class or module
2341 // name of this SDK's main entry point
2342 // or another suitable identifier depending on the language.
2343 // The identifier `opentelemetry` is reserved and MUST NOT be used in this
2344 // case.
2345 // All custom identifiers SHOULD be stable across different versions of an
2346 // implementation.
2347 TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
2348
2349 // TelemetrySDKVersionKey is the attribute Key conforming to the
2350 // "telemetry.sdk.version" semantic conventions. It represents the version
2351 // string of the telemetry SDK.
2352 //
2353 // Type: string
2354 // RequirementLevel: Required
2355 // Stability: experimental
2356 // Examples: '1.2.3'
2357 TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
2358 )
2359
2360 var (
2361 // cpp
2362 TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
2363 // dotnet
2364 TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
2365 // erlang
2366 TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
2367 // go
2368 TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
2369 // java
2370 TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
2371 // nodejs
2372 TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
2373 // php
2374 TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
2375 // python
2376 TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
2377 // ruby
2378 TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
2379 // rust
2380 TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
2381 // swift
2382 TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
2383 // webjs
2384 TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
2385 )
2386
2387 // TelemetrySDKName returns an attribute KeyValue conforming to the
2388 // "telemetry.sdk.name" semantic conventions. It represents the name of the
2389 // telemetry SDK as defined above.
2390 func TelemetrySDKName(val string) attribute.KeyValue {
2391 return TelemetrySDKNameKey.String(val)
2392 }
2393
2394 // TelemetrySDKVersion returns an attribute KeyValue conforming to the
2395 // "telemetry.sdk.version" semantic conventions. It represents the version
2396 // string of the telemetry SDK.
2397 func TelemetrySDKVersion(val string) attribute.KeyValue {
2398 return TelemetrySDKVersionKey.String(val)
2399 }
2400
2401 // The telemetry SDK used to capture data recorded by the instrumentation
2402 // libraries.
2403 const (
2404 // TelemetryDistroNameKey is the attribute Key conforming to the
2405 // "telemetry.distro.name" semantic conventions. It represents the name of
2406 // the auto instrumentation agent or distribution, if used.
2407 //
2408 // Type: string
2409 // RequirementLevel: Optional
2410 // Stability: experimental
2411 // Examples: 'parts-unlimited-java'
2412 // Note: Official auto instrumentation agents and distributions SHOULD set
2413 // the `telemetry.distro.name` attribute to
2414 // a string starting with `opentelemetry-`, e.g.
2415 // `opentelemetry-java-instrumentation`.
2416 TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
2417
2418 // TelemetryDistroVersionKey is the attribute Key conforming to the
2419 // "telemetry.distro.version" semantic conventions. It represents the
2420 // version string of the auto instrumentation agent or distribution, if
2421 // used.
2422 //
2423 // Type: string
2424 // RequirementLevel: Optional
2425 // Stability: experimental
2426 // Examples: '1.2.3'
2427 TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
2428 )
2429
2430 // TelemetryDistroName returns an attribute KeyValue conforming to the
2431 // "telemetry.distro.name" semantic conventions. It represents the name of the
2432 // auto instrumentation agent or distribution, if used.
2433 func TelemetryDistroName(val string) attribute.KeyValue {
2434 return TelemetryDistroNameKey.String(val)
2435 }
2436
2437 // TelemetryDistroVersion returns an attribute KeyValue conforming to the
2438 // "telemetry.distro.version" semantic conventions. It represents the version
2439 // string of the auto instrumentation agent or distribution, if used.
2440 func TelemetryDistroVersion(val string) attribute.KeyValue {
2441 return TelemetryDistroVersionKey.String(val)
2442 }
2443
2444 // Resource describing the packaged software running the application code. Web
2445 // engines are typically executed using process.runtime.
2446 const (
2447 // WebEngineDescriptionKey is the attribute Key conforming to the
2448 // "webengine.description" semantic conventions. It represents the
2449 // additional description of the web engine (e.g. detailed version and
2450 // edition information).
2451 //
2452 // Type: string
2453 // RequirementLevel: Optional
2454 // Stability: experimental
2455 // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
2456 // 2.2.2.Final'
2457 WebEngineDescriptionKey = attribute.Key("webengine.description")
2458
2459 // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
2460 // semantic conventions. It represents the name of the web engine.
2461 //
2462 // Type: string
2463 // RequirementLevel: Required
2464 // Stability: experimental
2465 // Examples: 'WildFly'
2466 WebEngineNameKey = attribute.Key("webengine.name")
2467
2468 // WebEngineVersionKey is the attribute Key conforming to the
2469 // "webengine.version" semantic conventions. It represents the version of
2470 // the web engine.
2471 //
2472 // Type: string
2473 // RequirementLevel: Optional
2474 // Stability: experimental
2475 // Examples: '21.0.0'
2476 WebEngineVersionKey = attribute.Key("webengine.version")
2477 )
2478
2479 // WebEngineDescription returns an attribute KeyValue conforming to the
2480 // "webengine.description" semantic conventions. It represents the additional
2481 // description of the web engine (e.g. detailed version and edition
2482 // information).
2483 func WebEngineDescription(val string) attribute.KeyValue {
2484 return WebEngineDescriptionKey.String(val)
2485 }
2486
2487 // WebEngineName returns an attribute KeyValue conforming to the
2488 // "webengine.name" semantic conventions. It represents the name of the web
2489 // engine.
2490 func WebEngineName(val string) attribute.KeyValue {
2491 return WebEngineNameKey.String(val)
2492 }
2493
2494 // WebEngineVersion returns an attribute KeyValue conforming to the
2495 // "webengine.version" semantic conventions. It represents the version of the
2496 // web engine.
2497 func WebEngineVersion(val string) attribute.KeyValue {
2498 return WebEngineVersionKey.String(val)
2499 }
2500
2501 // Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's
2502 // concepts.
2503 const (
2504 // OTelScopeNameKey is the attribute Key conforming to the
2505 // "otel.scope.name" semantic conventions. It represents the name of the
2506 // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
2507 //
2508 // Type: string
2509 // RequirementLevel: Optional
2510 // Stability: experimental
2511 // Examples: 'io.opentelemetry.contrib.mongodb'
2512 OTelScopeNameKey = attribute.Key("otel.scope.name")
2513
2514 // OTelScopeVersionKey is the attribute Key conforming to the
2515 // "otel.scope.version" semantic conventions. It represents the version of
2516 // the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
2517 //
2518 // Type: string
2519 // RequirementLevel: Optional
2520 // Stability: experimental
2521 // Examples: '1.0.0'
2522 OTelScopeVersionKey = attribute.Key("otel.scope.version")
2523 )
2524
2525 // OTelScopeName returns an attribute KeyValue conforming to the
2526 // "otel.scope.name" semantic conventions. It represents the name of the
2527 // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
2528 func OTelScopeName(val string) attribute.KeyValue {
2529 return OTelScopeNameKey.String(val)
2530 }
2531
2532 // OTelScopeVersion returns an attribute KeyValue conforming to the
2533 // "otel.scope.version" semantic conventions. It represents the version of the
2534 // instrumentation scope - (`InstrumentationScope.Version` in OTLP).
2535 func OTelScopeVersion(val string) attribute.KeyValue {
2536 return OTelScopeVersionKey.String(val)
2537 }
2538
2539 // Span attributes used by non-OTLP exporters to represent OpenTelemetry
2540 // Scope's concepts.
2541 const (
2542 // OTelLibraryNameKey is the attribute Key conforming to the
2543 // "otel.library.name" semantic conventions.
2544 //
2545 // Type: string
2546 // RequirementLevel: Optional
2547 // Stability: deprecated
2548 // Examples: 'io.opentelemetry.contrib.mongodb'
2549 // Deprecated: use the `otel.scope.name` attribute.
2550 OTelLibraryNameKey = attribute.Key("otel.library.name")
2551
2552 // OTelLibraryVersionKey is the attribute Key conforming to the
2553 // "otel.library.version" semantic conventions.
2554 //
2555 // Type: string
2556 // RequirementLevel: Optional
2557 // Stability: deprecated
2558 // Examples: '1.0.0'
2559 // Deprecated: use the `otel.scope.version` attribute.
2560 OTelLibraryVersionKey = attribute.Key("otel.library.version")
2561 )
2562
2563 // OTelLibraryName returns an attribute KeyValue conforming to the
2564 // "otel.library.name" semantic conventions.
2565 //
2566 // Deprecated: use the `otel.scope.name` attribute.
2567 func OTelLibraryName(val string) attribute.KeyValue {
2568 return OTelLibraryNameKey.String(val)
2569 }
2570
2571 // OTelLibraryVersion returns an attribute KeyValue conforming to the
2572 // "otel.library.version" semantic conventions.
2573 //
2574 // Deprecated: use the `otel.scope.version` attribute.
2575 func OTelLibraryVersion(val string) attribute.KeyValue {
2576 return OTelLibraryVersionKey.String(val)
2577 }