Debian Codegraph @

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