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