Debian Codegraph @

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