Debian Codegraph @

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