Debian Codegraph @

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