2023-12-18 20:31:00 +00:00
|
|
|
// Copyright The OpenTelemetry Authors
|
2024-08-19 08:01:33 +00:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2023-12-18 20:31:00 +00:00
|
|
|
|
|
|
|
// Code generated from semantic convention specification. DO NOT EDIT.
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0"
|
2023-12-18 20:31:00 +00:00
|
|
|
|
|
|
|
import "go.opentelemetry.io/otel/attribute"
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// A cloud environment (e.g. GCP, Azure, AWS).
|
2023-12-18 20:31:00 +00:00
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// CloudAccountIDKey is the attribute Key conforming to the
|
|
|
|
// "cloud.account.id" semantic conventions. It represents the cloud account
|
|
|
|
// ID the resource is assigned to.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '111111111111', 'opentelemetry'
|
|
|
|
CloudAccountIDKey = attribute.Key("cloud.account.id")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// CloudAvailabilityZoneKey is the attribute Key conforming to the
|
|
|
|
// "cloud.availability_zone" semantic conventions. It represents the cloud
|
|
|
|
// regions often have multiple, isolated locations known as zones to
|
|
|
|
// increase availability. Availability zone represents the zone where the
|
|
|
|
// resource is running.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'us-east-1c'
|
|
|
|
// Note: Availability zones are called "zones" on Alibaba Cloud and Google
|
|
|
|
// Cloud.
|
|
|
|
CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
|
|
|
|
// semantic conventions. It represents the cloud platform in use.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: Enum
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Note: The prefix of the service SHOULD match the one specified in
|
|
|
|
// `cloud.provider`.
|
|
|
|
CloudPlatformKey = attribute.Key("cloud.platform")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
|
|
|
// CloudProviderKey is the attribute Key conforming to the "cloud.provider"
|
|
|
|
// semantic conventions. It represents the name of the cloud provider.
|
|
|
|
//
|
|
|
|
// Type: Enum
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
CloudProviderKey = attribute.Key("cloud.provider")
|
|
|
|
|
|
|
|
// CloudRegionKey is the attribute Key conforming to the "cloud.region"
|
|
|
|
// semantic conventions. It represents the geographical region the resource
|
|
|
|
// is running.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'us-central1', 'us-east-1'
|
|
|
|
// Note: Refer to your provider's docs to see the available regions, for
|
|
|
|
// example [Alibaba Cloud
|
|
|
|
// regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
|
|
|
|
// regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
|
|
|
|
// [Azure
|
2024-08-19 08:01:33 +00:00
|
|
|
// regions](https://azure.microsoft.com/global-infrastructure/geographies/),
|
2023-12-18 20:31:00 +00:00
|
|
|
// [Google Cloud regions](https://cloud.google.com/about/locations), or
|
|
|
|
// [Tencent Cloud
|
|
|
|
// regions](https://www.tencentcloud.com/document/product/213/6091).
|
|
|
|
CloudRegionKey = attribute.Key("cloud.region")
|
|
|
|
|
|
|
|
// CloudResourceIDKey is the attribute Key conforming to the
|
|
|
|
// "cloud.resource_id" semantic conventions. It represents the cloud
|
|
|
|
// provider-specific native identifier of the monitored cloud resource
|
|
|
|
// (e.g. an
|
|
|
|
// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
|
|
|
|
// on AWS, a [fully qualified resource
|
2024-08-19 08:01:33 +00:00
|
|
|
// ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id)
|
2023-12-18 20:31:00 +00:00
|
|
|
// on Azure, a [full resource
|
|
|
|
// name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
|
|
|
|
// on GCP)
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',
|
|
|
|
// '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID',
|
|
|
|
// '/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>'
|
|
|
|
// Note: On some cloud providers, it may not be possible to determine the
|
|
|
|
// full ID at startup,
|
|
|
|
// so it may be necessary to set `cloud.resource_id` as a span attribute
|
|
|
|
// instead.
|
|
|
|
//
|
|
|
|
// The exact value to use for `cloud.resource_id` depends on the cloud
|
|
|
|
// provider.
|
|
|
|
// The following well-known definitions MUST be used if you set this
|
|
|
|
// attribute and they apply:
|
|
|
|
//
|
|
|
|
// * **AWS Lambda:** The function
|
|
|
|
// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
|
|
|
|
// Take care not to use the "invoked ARN" directly but replace any
|
|
|
|
// [alias
|
|
|
|
// suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
|
|
|
|
// with the resolved function version, as the same runtime instance may
|
|
|
|
// be invokable with
|
|
|
|
// multiple different aliases.
|
|
|
|
// * **GCP:** The [URI of the
|
|
|
|
// resource](https://cloud.google.com/iam/docs/full-resource-names)
|
|
|
|
// * **Azure:** The [Fully Qualified Resource
|
2024-08-19 08:01:33 +00:00
|
|
|
// ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id)
|
2023-12-18 20:31:00 +00:00
|
|
|
// of the invoked function,
|
|
|
|
// *not* the function app, having the form
|
|
|
|
// `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
|
|
|
|
// This means that a span attribute MUST be used, as an Azure function
|
|
|
|
// app can host multiple functions that would usually share
|
|
|
|
// a TracerProvider.
|
|
|
|
CloudResourceIDKey = attribute.Key("cloud.resource_id")
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// Alibaba Cloud Elastic Compute Service
|
|
|
|
CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
|
|
|
|
// Alibaba Cloud Function Compute
|
|
|
|
CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
|
|
|
|
// Red Hat OpenShift on Alibaba Cloud
|
|
|
|
CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
|
|
|
|
// AWS Elastic Compute Cloud
|
|
|
|
CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
|
|
|
|
// AWS Elastic Container Service
|
|
|
|
CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
|
|
|
|
// AWS Elastic Kubernetes Service
|
|
|
|
CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
|
|
|
|
// AWS Lambda
|
|
|
|
CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
|
|
|
|
// AWS Elastic Beanstalk
|
|
|
|
CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
|
|
|
|
// AWS App Runner
|
|
|
|
CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
|
|
|
|
// Red Hat OpenShift on AWS (ROSA)
|
|
|
|
CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
|
|
|
|
// Azure Virtual Machines
|
|
|
|
CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
|
|
|
|
// Azure Container Instances
|
|
|
|
CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
|
|
|
|
// Azure Kubernetes Service
|
|
|
|
CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
|
|
|
|
// Azure Functions
|
|
|
|
CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
|
|
|
|
// Azure App Service
|
|
|
|
CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
|
|
|
|
// Azure Red Hat OpenShift
|
|
|
|
CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
|
|
|
|
// Google Bare Metal Solution (BMS)
|
|
|
|
CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
|
|
|
|
// Google Cloud Compute Engine (GCE)
|
|
|
|
CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
|
|
|
|
// Google Cloud Run
|
|
|
|
CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
|
|
|
|
// Google Cloud Kubernetes Engine (GKE)
|
|
|
|
CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
|
|
|
|
// Google Cloud Functions (GCF)
|
|
|
|
CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
|
|
|
|
// Google Cloud App Engine (GAE)
|
|
|
|
CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
|
|
|
|
// Red Hat OpenShift on Google Cloud
|
|
|
|
CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift")
|
|
|
|
// Red Hat OpenShift on IBM Cloud
|
|
|
|
CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
|
|
|
|
// Tencent Cloud Cloud Virtual Machine (CVM)
|
|
|
|
CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
|
|
|
|
// Tencent Cloud Elastic Kubernetes Service (EKS)
|
|
|
|
CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
|
|
|
|
// Tencent Cloud Serverless Cloud Function (SCF)
|
|
|
|
CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
|
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
var (
|
|
|
|
// Alibaba Cloud
|
|
|
|
CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
|
|
|
|
// Amazon Web Services
|
|
|
|
CloudProviderAWS = CloudProviderKey.String("aws")
|
|
|
|
// Microsoft Azure
|
|
|
|
CloudProviderAzure = CloudProviderKey.String("azure")
|
|
|
|
// Google Cloud Platform
|
|
|
|
CloudProviderGCP = CloudProviderKey.String("gcp")
|
|
|
|
// Heroku Platform as a Service
|
|
|
|
CloudProviderHeroku = CloudProviderKey.String("heroku")
|
|
|
|
// IBM Cloud
|
|
|
|
CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
|
|
|
|
// Tencent Cloud
|
|
|
|
CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
|
|
|
|
)
|
|
|
|
|
2023-12-18 20:31:00 +00:00
|
|
|
// CloudAccountID returns an attribute KeyValue conforming to the
|
|
|
|
// "cloud.account.id" semantic conventions. It represents the cloud account ID
|
|
|
|
// the resource is assigned to.
|
|
|
|
func CloudAccountID(val string) attribute.KeyValue {
|
|
|
|
return CloudAccountIDKey.String(val)
|
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// CloudAvailabilityZone returns an attribute KeyValue conforming to the
|
|
|
|
// "cloud.availability_zone" semantic conventions. It represents the cloud
|
|
|
|
// regions often have multiple, isolated locations known as zones to increase
|
|
|
|
// availability. Availability zone represents the zone where the resource is
|
|
|
|
// running.
|
|
|
|
func CloudAvailabilityZone(val string) attribute.KeyValue {
|
|
|
|
return CloudAvailabilityZoneKey.String(val)
|
|
|
|
}
|
|
|
|
|
2023-12-18 20:31:00 +00:00
|
|
|
// CloudRegion returns an attribute KeyValue conforming to the
|
|
|
|
// "cloud.region" semantic conventions. It represents the geographical region
|
|
|
|
// the resource is running.
|
|
|
|
func CloudRegion(val string) attribute.KeyValue {
|
|
|
|
return CloudRegionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// CloudResourceID returns an attribute KeyValue conforming to the
|
|
|
|
// "cloud.resource_id" semantic conventions. It represents the cloud
|
|
|
|
// provider-specific native identifier of the monitored cloud resource (e.g. an
|
|
|
|
// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
|
|
|
|
// on AWS, a [fully qualified resource
|
2024-08-19 08:01:33 +00:00
|
|
|
// ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on
|
|
|
|
// Azure, a [full resource
|
2023-12-18 20:31:00 +00:00
|
|
|
// name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
|
|
|
|
// on GCP)
|
|
|
|
func CloudResourceID(val string) attribute.KeyValue {
|
|
|
|
return CloudResourceIDKey.String(val)
|
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// A container instance.
|
2023-12-18 20:31:00 +00:00
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerCommandKey is the attribute Key conforming to the
|
|
|
|
// "container.command" semantic conventions. It represents the command used
|
|
|
|
// to run the container (i.e. the command name).
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'otelcontribcol'
|
|
|
|
// Note: If using embedded credentials or sensitive data, it is recommended
|
|
|
|
// to remove them to prevent potential leakage.
|
|
|
|
ContainerCommandKey = attribute.Key("container.command")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerCommandArgsKey is the attribute Key conforming to the
|
|
|
|
// "container.command_args" semantic conventions. It represents the all the
|
|
|
|
// command arguments (including the command/executable itself) run by the
|
|
|
|
// container. [2]
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string[]
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'otelcontribcol, --config, config.yaml'
|
|
|
|
ContainerCommandArgsKey = attribute.Key("container.command_args")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerCommandLineKey is the attribute Key conforming to the
|
|
|
|
// "container.command_line" semantic conventions. It represents the full
|
|
|
|
// command run by the container as a single string representing the full
|
|
|
|
// command. [2]
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'otelcontribcol --config config.yaml'
|
|
|
|
ContainerCommandLineKey = attribute.Key("container.command_line")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerIDKey is the attribute Key conforming to the "container.id"
|
|
|
|
// semantic conventions. It represents the container ID. Usually a UUID, as
|
|
|
|
// for example used to [identify Docker
|
|
|
|
// containers](https://docs.docker.com/engine/reference/run/#container-identification).
|
|
|
|
// The UUID might be abbreviated.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'a3bf90e006b2'
|
|
|
|
ContainerIDKey = attribute.Key("container.id")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerImageIDKey is the attribute Key conforming to the
|
|
|
|
// "container.image.id" semantic conventions. It represents the runtime
|
|
|
|
// specific image identifier. Usually a hash algorithm followed by a UUID.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples:
|
|
|
|
// 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'
|
|
|
|
// Note: Docker defines a sha256 of the image id; `container.image.id`
|
|
|
|
// corresponds to the `Image` field from the Docker container inspect
|
|
|
|
// [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect)
|
|
|
|
// endpoint.
|
|
|
|
// K8S defines a link to the container registry repository with digest
|
|
|
|
// `"imageID": "registry.azurecr.io
|
|
|
|
// /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
|
|
|
|
// The ID is assinged by the container runtime and can vary in different
|
|
|
|
// environments. Consider using `oci.manifest.digest` if it is important to
|
|
|
|
// identify the same image in different environments/runtimes.
|
|
|
|
ContainerImageIDKey = attribute.Key("container.image.id")
|
|
|
|
|
|
|
|
// ContainerImageNameKey is the attribute Key conforming to the
|
|
|
|
// "container.image.name" semantic conventions. It represents the name of
|
|
|
|
// the image the container was built on.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'gcr.io/opentelemetry/operator'
|
|
|
|
ContainerImageNameKey = attribute.Key("container.image.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerImageRepoDigestsKey is the attribute Key conforming to the
|
|
|
|
// "container.image.repo_digests" semantic conventions. It represents the
|
|
|
|
// repo digests of the container image as provided by the container
|
|
|
|
// runtime.
|
|
|
|
//
|
|
|
|
// Type: string[]
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples:
|
|
|
|
// 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb',
|
|
|
|
// 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578'
|
|
|
|
// Note:
|
|
|
|
// [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect)
|
|
|
|
// and
|
|
|
|
// [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238)
|
|
|
|
// report those under the `RepoDigests` field.
|
|
|
|
ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
|
|
|
|
|
|
|
|
// ContainerImageTagsKey is the attribute Key conforming to the
|
|
|
|
// "container.image.tags" semantic conventions. It represents the container
|
|
|
|
// image tags. An example can be found in [Docker Image
|
|
|
|
// Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
|
|
|
|
// Should be only the `<tag>` section of the full name for example from
|
|
|
|
// `registry.example.com/my-org/my-image:<tag>`.
|
|
|
|
//
|
|
|
|
// Type: string[]
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'v1.27.1', '3.5.7-0'
|
|
|
|
ContainerImageTagsKey = attribute.Key("container.image.tags")
|
|
|
|
|
|
|
|
// ContainerNameKey is the attribute Key conforming to the "container.name"
|
|
|
|
// semantic conventions. It represents the container name used by container
|
|
|
|
// runtime.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry-autoconf'
|
|
|
|
ContainerNameKey = attribute.Key("container.name")
|
|
|
|
|
|
|
|
// ContainerRuntimeKey is the attribute Key conforming to the
|
|
|
|
// "container.runtime" semantic conventions. It represents the container
|
|
|
|
// runtime managing this container.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'docker', 'containerd', 'rkt'
|
|
|
|
ContainerRuntimeKey = attribute.Key("container.runtime")
|
2023-12-18 20:31:00 +00:00
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerCommand returns an attribute KeyValue conforming to the
|
|
|
|
// "container.command" semantic conventions. It represents the command used to
|
|
|
|
// run the container (i.e. the command name).
|
|
|
|
func ContainerCommand(val string) attribute.KeyValue {
|
|
|
|
return ContainerCommandKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerCommandArgs returns an attribute KeyValue conforming to the
|
|
|
|
// "container.command_args" semantic conventions. It represents the all the
|
|
|
|
// command arguments (including the command/executable itself) run by the
|
|
|
|
// container. [2]
|
|
|
|
func ContainerCommandArgs(val ...string) attribute.KeyValue {
|
|
|
|
return ContainerCommandArgsKey.StringSlice(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerCommandLine returns an attribute KeyValue conforming to the
|
|
|
|
// "container.command_line" semantic conventions. It represents the full
|
|
|
|
// command run by the container as a single string representing the full
|
|
|
|
// command. [2]
|
|
|
|
func ContainerCommandLine(val string) attribute.KeyValue {
|
|
|
|
return ContainerCommandLineKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerID returns an attribute KeyValue conforming to the
|
|
|
|
// "container.id" semantic conventions. It represents the container ID. Usually
|
|
|
|
// a UUID, as for example used to [identify Docker
|
|
|
|
// containers](https://docs.docker.com/engine/reference/run/#container-identification).
|
|
|
|
// The UUID might be abbreviated.
|
|
|
|
func ContainerID(val string) attribute.KeyValue {
|
|
|
|
return ContainerIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerImageID returns an attribute KeyValue conforming to the
|
|
|
|
// "container.image.id" semantic conventions. It represents the runtime
|
|
|
|
// specific image identifier. Usually a hash algorithm followed by a UUID.
|
|
|
|
func ContainerImageID(val string) attribute.KeyValue {
|
|
|
|
return ContainerImageIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerImageName returns an attribute KeyValue conforming to the
|
|
|
|
// "container.image.name" semantic conventions. It represents the name of the
|
|
|
|
// image the container was built on.
|
|
|
|
func ContainerImageName(val string) attribute.KeyValue {
|
|
|
|
return ContainerImageNameKey.String(val)
|
|
|
|
}
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerImageRepoDigests returns an attribute KeyValue conforming to the
|
|
|
|
// "container.image.repo_digests" semantic conventions. It represents the repo
|
|
|
|
// digests of the container image as provided by the container runtime.
|
|
|
|
func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
|
|
|
|
return ContainerImageRepoDigestsKey.StringSlice(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ContainerImageTags returns an attribute KeyValue conforming to the
|
|
|
|
// "container.image.tags" semantic conventions. It represents the container
|
|
|
|
// image tags. An example can be found in [Docker Image
|
|
|
|
// Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
|
|
|
|
// Should be only the `<tag>` section of the full name for example from
|
|
|
|
// `registry.example.com/my-org/my-image:<tag>`.
|
|
|
|
func ContainerImageTags(val ...string) attribute.KeyValue {
|
|
|
|
return ContainerImageTagsKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ContainerName returns an attribute KeyValue conforming to the
|
|
|
|
// "container.name" semantic conventions. It represents the container name used
|
|
|
|
// by container runtime.
|
|
|
|
func ContainerName(val string) attribute.KeyValue {
|
|
|
|
return ContainerNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ContainerRuntime returns an attribute KeyValue conforming to the
|
|
|
|
// "container.runtime" semantic conventions. It represents the container
|
|
|
|
// runtime managing this container.
|
|
|
|
func ContainerRuntime(val string) attribute.KeyValue {
|
|
|
|
return ContainerRuntimeKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Describes device attributes.
|
2023-12-18 20:31:00 +00:00
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// DeviceIDKey is the attribute Key conforming to the "device.id" semantic
|
|
|
|
// conventions. It represents a unique identifier representing the device
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
|
|
|
|
// Note: The device identifier MUST only be defined using the values
|
|
|
|
// outlined below. This value is not an advertising identifier and MUST NOT
|
|
|
|
// be used as such. On iOS (Swift or Objective-C), this value MUST be equal
|
|
|
|
// to the [vendor
|
|
|
|
// identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
|
|
|
|
// On Android (Java or Kotlin), this value MUST be equal to the Firebase
|
|
|
|
// Installation ID or a globally unique UUID which is persisted across
|
|
|
|
// sessions in your application. More information can be found
|
|
|
|
// [here](https://developer.android.com/training/articles/user-data-ids) on
|
|
|
|
// best practices and exact implementation details. Caution should be taken
|
|
|
|
// when storing personal data or anything which can identify a user. GDPR
|
|
|
|
// and data protection laws may apply, ensure you do your own due
|
|
|
|
// diligence.
|
|
|
|
DeviceIDKey = attribute.Key("device.id")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// DeviceManufacturerKey is the attribute Key conforming to the
|
|
|
|
// "device.manufacturer" semantic conventions. It represents the name of
|
|
|
|
// the device manufacturer
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'Apple', 'Samsung'
|
|
|
|
// Note: The Android OS provides this field via
|
|
|
|
// [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
|
|
|
|
// iOS apps SHOULD hardcode the value `Apple`.
|
|
|
|
DeviceManufacturerKey = attribute.Key("device.manufacturer")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// DeviceModelIdentifierKey is the attribute Key conforming to the
|
|
|
|
// "device.model.identifier" semantic conventions. It represents the model
|
|
|
|
// identifier for the device
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'iPhone3,4', 'SM-G920F'
|
|
|
|
// Note: It's recommended this value represents a machine-readable version
|
|
|
|
// of the model identifier rather than the market or consumer-friendly name
|
|
|
|
// of the device.
|
|
|
|
DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// DeviceModelNameKey is the attribute Key conforming to the
|
|
|
|
// "device.model.name" semantic conventions. It represents the marketing
|
|
|
|
// name for the device model
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
|
|
|
|
// Note: It's recommended this value represents a human-readable version of
|
|
|
|
// the device model rather than a machine-readable alternative.
|
|
|
|
DeviceModelNameKey = attribute.Key("device.model.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// DeviceID returns an attribute KeyValue conforming to the "device.id"
|
|
|
|
// semantic conventions. It represents a unique identifier representing the
|
|
|
|
// device
|
|
|
|
func DeviceID(val string) attribute.KeyValue {
|
|
|
|
return DeviceIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// DeviceManufacturer returns an attribute KeyValue conforming to the
|
|
|
|
// "device.manufacturer" semantic conventions. It represents the name of the
|
|
|
|
// device manufacturer
|
|
|
|
func DeviceManufacturer(val string) attribute.KeyValue {
|
|
|
|
return DeviceManufacturerKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// DeviceModelIdentifier returns an attribute KeyValue conforming to the
|
|
|
|
// "device.model.identifier" semantic conventions. It represents the model
|
|
|
|
// identifier for the device
|
|
|
|
func DeviceModelIdentifier(val string) attribute.KeyValue {
|
|
|
|
return DeviceModelIdentifierKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// DeviceModelName returns an attribute KeyValue conforming to the
|
|
|
|
// "device.model.name" semantic conventions. It represents the marketing name
|
|
|
|
// for the device model
|
|
|
|
func DeviceModelName(val string) attribute.KeyValue {
|
|
|
|
return DeviceModelNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// A host is defined as a computing instance. For example, physical servers,
|
|
|
|
// virtual machines, switches or disk array.
|
2023-12-18 20:31:00 +00:00
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostArchKey is the attribute Key conforming to the "host.arch" semantic
|
|
|
|
// conventions. It represents the CPU architecture the host system is
|
|
|
|
// running on.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: Enum
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
HostArchKey = attribute.Key("host.arch")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUCacheL2SizeKey is the attribute Key conforming to the
|
|
|
|
// "host.cpu.cache.l2.size" semantic conventions. It represents the amount
|
|
|
|
// of level 2 memory cache available to the processor (in Bytes).
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: int
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 12288000
|
|
|
|
HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUFamilyKey is the attribute Key conforming to the
|
|
|
|
// "host.cpu.family" semantic conventions. It represents the family or
|
|
|
|
// generation of the CPU.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '6', 'PA-RISC 1.1e'
|
|
|
|
HostCPUFamilyKey = attribute.Key("host.cpu.family")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUModelIDKey is the attribute Key conforming to the
|
|
|
|
// "host.cpu.model.id" semantic conventions. It represents the model
|
|
|
|
// identifier. It provides more granular information about the CPU,
|
|
|
|
// distinguishing it from other CPUs within the same family.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '6', '9000/778/B180L'
|
|
|
|
HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUModelNameKey is the attribute Key conforming to the
|
|
|
|
// "host.cpu.model.name" semantic conventions. It represents the model
|
|
|
|
// designation of the processor.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz'
|
|
|
|
HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUSteppingKey is the attribute Key conforming to the
|
|
|
|
// "host.cpu.stepping" semantic conventions. It represents the stepping or
|
|
|
|
// core revisions.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: int
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 1
|
|
|
|
HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUVendorIDKey is the attribute Key conforming to the
|
|
|
|
// "host.cpu.vendor.id" semantic conventions. It represents the processor
|
|
|
|
// manufacturer identifier. A maximum 12-character string.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'GenuineIntel'
|
|
|
|
// Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor
|
|
|
|
// ID string in EBX, EDX and ECX registers. Writing these to memory in this
|
|
|
|
// order results in a 12-character string.
|
|
|
|
HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostIDKey is the attribute Key conforming to the "host.id" semantic
|
|
|
|
// conventions. It represents the unique host ID. For Cloud, this must be
|
|
|
|
// the instance_id assigned by the cloud provider. For non-containerized
|
|
|
|
// systems, this should be the `machine-id`. See the table below for the
|
|
|
|
// sources to use to determine the `machine-id` based on operating system.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'fdbf79e8af94cb7f9e8df36789187052'
|
|
|
|
HostIDKey = attribute.Key("host.id")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostImageIDKey is the attribute Key conforming to the "host.image.id"
|
|
|
|
// semantic conventions. It represents the vM image ID or host OS image ID.
|
|
|
|
// For Cloud, this value is from the provider.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'ami-07b06b442921831e5'
|
|
|
|
HostImageIDKey = attribute.Key("host.image.id")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostImageNameKey is the attribute Key conforming to the
|
|
|
|
// "host.image.name" semantic conventions. It represents the name of the VM
|
|
|
|
// image or OS install the host was instantiated from.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
|
|
|
|
HostImageNameKey = attribute.Key("host.image.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostImageVersionKey is the attribute Key conforming to the
|
|
|
|
// "host.image.version" semantic conventions. It represents the version
|
|
|
|
// string of the VM image or host OS as defined in [Version
|
|
|
|
// Attributes](/docs/resource/README.md#version-attributes).
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '0.1'
|
|
|
|
HostImageVersionKey = attribute.Key("host.image.version")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostIPKey is the attribute Key conforming to the "host.ip" semantic
|
|
|
|
// conventions. It represents the available IP addresses of the host,
|
|
|
|
// excluding loopback interfaces.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string[]
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e'
|
|
|
|
// Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
|
|
|
|
// addresses MUST be specified in the [RFC
|
|
|
|
// 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
|
|
|
|
HostIPKey = attribute.Key("host.ip")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostMacKey is the attribute Key conforming to the "host.mac" semantic
|
|
|
|
// conventions. It represents the available MAC addresses of the host,
|
|
|
|
// excluding loopback interfaces.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string[]
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'
|
|
|
|
// Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal
|
|
|
|
// form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
|
|
|
|
// as hyphen-separated octets in uppercase hexadecimal form from most to
|
|
|
|
// least significant.
|
|
|
|
HostMacKey = attribute.Key("host.mac")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostNameKey is the attribute Key conforming to the "host.name" semantic
|
|
|
|
// conventions. It represents the name of the host. On Unix systems, it may
|
|
|
|
// contain what the hostname command returns, or the fully qualified
|
|
|
|
// hostname, or another name specified by the user.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry-test'
|
|
|
|
HostNameKey = attribute.Key("host.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostTypeKey is the attribute Key conforming to the "host.type" semantic
|
|
|
|
// conventions. It represents the type of host. For Cloud, this must be the
|
|
|
|
// machine type.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'n1-standard-1'
|
|
|
|
HostTypeKey = attribute.Key("host.type")
|
|
|
|
)
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
var (
|
|
|
|
// AMD64
|
|
|
|
HostArchAMD64 = HostArchKey.String("amd64")
|
|
|
|
// ARM32
|
|
|
|
HostArchARM32 = HostArchKey.String("arm32")
|
|
|
|
// ARM64
|
|
|
|
HostArchARM64 = HostArchKey.String("arm64")
|
|
|
|
// Itanium
|
|
|
|
HostArchIA64 = HostArchKey.String("ia64")
|
|
|
|
// 32-bit PowerPC
|
|
|
|
HostArchPPC32 = HostArchKey.String("ppc32")
|
|
|
|
// 64-bit PowerPC
|
|
|
|
HostArchPPC64 = HostArchKey.String("ppc64")
|
|
|
|
// IBM z/Architecture
|
|
|
|
HostArchS390x = HostArchKey.String("s390x")
|
|
|
|
// 32-bit x86
|
|
|
|
HostArchX86 = HostArchKey.String("x86")
|
2023-12-18 20:31:00 +00:00
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUCacheL2Size returns an attribute KeyValue conforming to the
|
|
|
|
// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
|
|
|
|
// level 2 memory cache available to the processor (in Bytes).
|
|
|
|
func HostCPUCacheL2Size(val int) attribute.KeyValue {
|
|
|
|
return HostCPUCacheL2SizeKey.Int(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUFamily returns an attribute KeyValue conforming to the
|
|
|
|
// "host.cpu.family" semantic conventions. It represents the family or
|
|
|
|
// generation of the CPU.
|
|
|
|
func HostCPUFamily(val string) attribute.KeyValue {
|
|
|
|
return HostCPUFamilyKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUModelID returns an attribute KeyValue conforming to the
|
|
|
|
// "host.cpu.model.id" semantic conventions. It represents the model
|
|
|
|
// identifier. It provides more granular information about the CPU,
|
|
|
|
// distinguishing it from other CPUs within the same family.
|
|
|
|
func HostCPUModelID(val string) attribute.KeyValue {
|
|
|
|
return HostCPUModelIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUModelName returns an attribute KeyValue conforming to the
|
|
|
|
// "host.cpu.model.name" semantic conventions. It represents the model
|
|
|
|
// designation of the processor.
|
|
|
|
func HostCPUModelName(val string) attribute.KeyValue {
|
|
|
|
return HostCPUModelNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUStepping returns an attribute KeyValue conforming to the
|
|
|
|
// "host.cpu.stepping" semantic conventions. It represents the stepping or core
|
|
|
|
// revisions.
|
|
|
|
func HostCPUStepping(val int) attribute.KeyValue {
|
|
|
|
return HostCPUSteppingKey.Int(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostCPUVendorID returns an attribute KeyValue conforming to the
|
|
|
|
// "host.cpu.vendor.id" semantic conventions. It represents the processor
|
|
|
|
// manufacturer identifier. A maximum 12-character string.
|
|
|
|
func HostCPUVendorID(val string) attribute.KeyValue {
|
|
|
|
return HostCPUVendorIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostID returns an attribute KeyValue conforming to the "host.id" semantic
|
|
|
|
// conventions. It represents the unique host ID. For Cloud, this must be the
|
|
|
|
// instance_id assigned by the cloud provider. For non-containerized systems,
|
|
|
|
// this should be the `machine-id`. See the table below for the sources to use
|
|
|
|
// to determine the `machine-id` based on operating system.
|
|
|
|
func HostID(val string) attribute.KeyValue {
|
|
|
|
return HostIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostImageID returns an attribute KeyValue conforming to the
|
|
|
|
// "host.image.id" semantic conventions. It represents the vM image ID or host
|
|
|
|
// OS image ID. For Cloud, this value is from the provider.
|
|
|
|
func HostImageID(val string) attribute.KeyValue {
|
|
|
|
return HostImageIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostImageName returns an attribute KeyValue conforming to the
|
|
|
|
// "host.image.name" semantic conventions. It represents the name of the VM
|
|
|
|
// image or OS install the host was instantiated from.
|
|
|
|
func HostImageName(val string) attribute.KeyValue {
|
|
|
|
return HostImageNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// HostImageVersion returns an attribute KeyValue conforming to the
|
|
|
|
// "host.image.version" semantic conventions. It represents the version string
|
|
|
|
// of the VM image or host OS as defined in [Version
|
|
|
|
// Attributes](/docs/resource/README.md#version-attributes).
|
|
|
|
func HostImageVersion(val string) attribute.KeyValue {
|
|
|
|
return HostImageVersionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
|
|
|
|
// conventions. It represents the available IP addresses of the host, excluding
|
|
|
|
// loopback interfaces.
|
|
|
|
func HostIP(val ...string) attribute.KeyValue {
|
|
|
|
return HostIPKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HostMac returns an attribute KeyValue conforming to the "host.mac"
|
|
|
|
// semantic conventions. It represents the available MAC addresses of the host,
|
|
|
|
// excluding loopback interfaces.
|
|
|
|
func HostMac(val ...string) attribute.KeyValue {
|
|
|
|
return HostMacKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HostName returns an attribute KeyValue conforming to the "host.name"
|
|
|
|
// semantic conventions. It represents the name of the host. On Unix systems,
|
|
|
|
// it may contain what the hostname command returns, or the fully qualified
|
|
|
|
// hostname, or another name specified by the user.
|
|
|
|
func HostName(val string) attribute.KeyValue {
|
|
|
|
return HostNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HostType returns an attribute KeyValue conforming to the "host.type"
|
|
|
|
// semantic conventions. It represents the type of host. For Cloud, this must
|
|
|
|
// be the machine type.
|
|
|
|
func HostType(val string) attribute.KeyValue {
|
|
|
|
return HostTypeKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Kubernetes resource attributes.
|
2023-12-18 20:31:00 +00:00
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SClusterNameKey is the attribute Key conforming to the
|
|
|
|
// "k8s.cluster.name" semantic conventions. It represents the name of the
|
|
|
|
// cluster.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry-cluster'
|
|
|
|
K8SClusterNameKey = attribute.Key("k8s.cluster.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SClusterUIDKey is the attribute Key conforming to the
|
|
|
|
// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for
|
|
|
|
// the cluster, set to the UID of the `kube-system` namespace.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d'
|
|
|
|
// Note: K8S doesn't have support for obtaining a cluster ID. If this is
|
|
|
|
// ever
|
|
|
|
// added, we will recommend collecting the `k8s.cluster.uid` through the
|
|
|
|
// official APIs. In the meantime, we are able to use the `uid` of the
|
|
|
|
// `kube-system` namespace as a proxy for cluster ID. Read on for the
|
|
|
|
// rationale.
|
|
|
|
//
|
|
|
|
// Every object created in a K8S cluster is assigned a distinct UID. The
|
|
|
|
// `kube-system` namespace is used by Kubernetes itself and will exist
|
|
|
|
// for the lifetime of the cluster. Using the `uid` of the `kube-system`
|
|
|
|
// namespace is a reasonable proxy for the K8S ClusterID as it will only
|
|
|
|
// change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
|
|
|
|
// UUIDs as standardized by
|
|
|
|
// [ISO/IEC 9834-8 and ITU-T
|
|
|
|
// X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).
|
|
|
|
// Which states:
|
|
|
|
//
|
|
|
|
// > If generated according to one of the mechanisms defined in Rec.
|
|
|
|
// ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
|
|
|
|
// different from all other UUIDs generated before 3603 A.D., or is
|
|
|
|
// extremely likely to be different (depending on the mechanism chosen).
|
|
|
|
//
|
|
|
|
// Therefore, UIDs between clusters should be extremely unlikely to
|
|
|
|
// conflict.
|
|
|
|
K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SContainerNameKey is the attribute Key conforming to the
|
|
|
|
// "k8s.container.name" semantic conventions. It represents the name of the
|
|
|
|
// Container from Pod specification, must be unique within a Pod. Container
|
|
|
|
// runtime usually uses different globally unique name (`container.name`).
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'redis'
|
|
|
|
K8SContainerNameKey = attribute.Key("k8s.container.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SContainerRestartCountKey is the attribute Key conforming to the
|
|
|
|
// "k8s.container.restart_count" semantic conventions. It represents the
|
|
|
|
// number of times the container was restarted. This attribute can be used
|
|
|
|
// to identify a particular container (running or stopped) within a
|
|
|
|
// container spec.
|
|
|
|
//
|
|
|
|
// Type: int
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 0, 2
|
|
|
|
K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
|
|
|
|
|
|
|
|
// K8SCronJobNameKey is the attribute Key conforming to the
|
|
|
|
// "k8s.cronjob.name" semantic conventions. It represents the name of the
|
|
|
|
// CronJob.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry'
|
|
|
|
K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SCronJobUIDKey is the attribute Key conforming to the
|
|
|
|
// "k8s.cronjob.uid" semantic conventions. It represents the UID of the
|
|
|
|
// CronJob.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
|
|
|
|
K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SDaemonSetNameKey is the attribute Key conforming to the
|
|
|
|
// "k8s.daemonset.name" semantic conventions. It represents the name of the
|
|
|
|
// DaemonSet.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry'
|
|
|
|
K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SDaemonSetUIDKey is the attribute Key conforming to the
|
|
|
|
// "k8s.daemonset.uid" semantic conventions. It represents the UID of the
|
|
|
|
// DaemonSet.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
|
|
|
|
K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SDeploymentNameKey is the attribute Key conforming to the
|
|
|
|
// "k8s.deployment.name" semantic conventions. It represents the name of
|
|
|
|
// the Deployment.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry'
|
|
|
|
K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SDeploymentUIDKey is the attribute Key conforming to the
|
|
|
|
// "k8s.deployment.uid" semantic conventions. It represents the UID of the
|
|
|
|
// Deployment.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
|
|
|
|
K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
|
|
|
|
// semantic conventions. It represents the name of the Job.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
2024-08-19 08:01:33 +00:00
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry'
|
|
|
|
K8SJobNameKey = attribute.Key("k8s.job.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
|
|
|
|
// semantic conventions. It represents the UID of the Job.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
|
|
|
|
K8SJobUIDKey = attribute.Key("k8s.job.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SNamespaceNameKey is the attribute Key conforming to the
|
|
|
|
// "k8s.namespace.name" semantic conventions. It represents the name of the
|
|
|
|
// namespace that the pod is running in.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'default'
|
|
|
|
K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
|
|
|
|
// semantic conventions. It represents the name of the Node.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'node-1'
|
|
|
|
K8SNodeNameKey = attribute.Key("k8s.node.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
|
|
|
|
// semantic conventions. It represents the UID of the Node.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
|
|
|
|
K8SNodeUIDKey = attribute.Key("k8s.node.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
|
|
|
|
// semantic conventions. It represents the name of the Pod.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry-pod-autoconf'
|
|
|
|
K8SPodNameKey = attribute.Key("k8s.pod.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
|
|
|
|
// semantic conventions. It represents the UID of the Pod.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
|
|
|
|
K8SPodUIDKey = attribute.Key("k8s.pod.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SReplicaSetNameKey is the attribute Key conforming to the
|
|
|
|
// "k8s.replicaset.name" semantic conventions. It represents the name of
|
|
|
|
// the ReplicaSet.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry'
|
|
|
|
K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SReplicaSetUIDKey is the attribute Key conforming to the
|
|
|
|
// "k8s.replicaset.uid" semantic conventions. It represents the UID of the
|
|
|
|
// ReplicaSet.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
|
|
|
|
K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SStatefulSetNameKey is the attribute Key conforming to the
|
|
|
|
// "k8s.statefulset.name" semantic conventions. It represents the name of
|
|
|
|
// the StatefulSet.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry'
|
|
|
|
K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SStatefulSetUIDKey is the attribute Key conforming to the
|
|
|
|
// "k8s.statefulset.uid" semantic conventions. It represents the UID of the
|
|
|
|
// StatefulSet.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
|
|
|
|
K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
|
2023-12-18 20:31:00 +00:00
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SClusterName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.cluster.name" semantic conventions. It represents the name of the
|
|
|
|
// cluster.
|
|
|
|
func K8SClusterName(val string) attribute.KeyValue {
|
|
|
|
return K8SClusterNameKey.String(val)
|
|
|
|
}
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SClusterUID returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
|
|
|
|
// cluster, set to the UID of the `kube-system` namespace.
|
|
|
|
func K8SClusterUID(val string) attribute.KeyValue {
|
|
|
|
return K8SClusterUIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SContainerName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.container.name" semantic conventions. It represents the name of the
|
|
|
|
// Container from Pod specification, must be unique within a Pod. Container
|
|
|
|
// runtime usually uses different globally unique name (`container.name`).
|
|
|
|
func K8SContainerName(val string) attribute.KeyValue {
|
|
|
|
return K8SContainerNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SContainerRestartCount returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.container.restart_count" semantic conventions. It represents the number
|
|
|
|
// of times the container was restarted. This attribute can be used to identify
|
|
|
|
// a particular container (running or stopped) within a container spec.
|
|
|
|
func K8SContainerRestartCount(val int) attribute.KeyValue {
|
|
|
|
return K8SContainerRestartCountKey.Int(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SCronJobName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.cronjob.name" semantic conventions. It represents the name of the
|
|
|
|
// CronJob.
|
|
|
|
func K8SCronJobName(val string) attribute.KeyValue {
|
|
|
|
return K8SCronJobNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SCronJobUID returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.cronjob.uid" semantic conventions. It represents the UID of the
|
|
|
|
// CronJob.
|
|
|
|
func K8SCronJobUID(val string) attribute.KeyValue {
|
|
|
|
return K8SCronJobUIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SDaemonSetName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.daemonset.name" semantic conventions. It represents the name of the
|
|
|
|
// DaemonSet.
|
|
|
|
func K8SDaemonSetName(val string) attribute.KeyValue {
|
|
|
|
return K8SDaemonSetNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SDaemonSetUID returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.daemonset.uid" semantic conventions. It represents the UID of the
|
|
|
|
// DaemonSet.
|
|
|
|
func K8SDaemonSetUID(val string) attribute.KeyValue {
|
|
|
|
return K8SDaemonSetUIDKey.String(val)
|
|
|
|
}
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SDeploymentName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.deployment.name" semantic conventions. It represents the name of the
|
|
|
|
// Deployment.
|
|
|
|
func K8SDeploymentName(val string) attribute.KeyValue {
|
|
|
|
return K8SDeploymentNameKey.String(val)
|
|
|
|
}
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SDeploymentUID returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.deployment.uid" semantic conventions. It represents the UID of the
|
|
|
|
// Deployment.
|
|
|
|
func K8SDeploymentUID(val string) attribute.KeyValue {
|
|
|
|
return K8SDeploymentUIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
|
|
|
|
// semantic conventions. It represents the name of the Job.
|
|
|
|
func K8SJobName(val string) attribute.KeyValue {
|
|
|
|
return K8SJobNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
|
|
|
|
// semantic conventions. It represents the UID of the Job.
|
|
|
|
func K8SJobUID(val string) attribute.KeyValue {
|
|
|
|
return K8SJobUIDKey.String(val)
|
|
|
|
}
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SNamespaceName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.namespace.name" semantic conventions. It represents the name of the
|
|
|
|
// namespace that the pod is running in.
|
|
|
|
func K8SNamespaceName(val string) attribute.KeyValue {
|
|
|
|
return K8SNamespaceNameKey.String(val)
|
|
|
|
}
|
2023-12-18 20:31:00 +00:00
|
|
|
|
|
|
|
// K8SNodeName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.node.name" semantic conventions. It represents the name of the Node.
|
|
|
|
func K8SNodeName(val string) attribute.KeyValue {
|
|
|
|
return K8SNodeNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
|
|
|
|
// semantic conventions. It represents the UID of the Node.
|
|
|
|
func K8SNodeUID(val string) attribute.KeyValue {
|
|
|
|
return K8SNodeUIDKey.String(val)
|
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
|
|
|
|
// semantic conventions. It represents the name of the Pod.
|
|
|
|
func K8SPodName(val string) attribute.KeyValue {
|
|
|
|
return K8SPodNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
|
|
|
|
// semantic conventions. It represents the UID of the Pod.
|
|
|
|
func K8SPodUID(val string) attribute.KeyValue {
|
|
|
|
return K8SPodUIDKey.String(val)
|
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SReplicaSetName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.replicaset.name" semantic conventions. It represents the name of the
|
|
|
|
// ReplicaSet.
|
|
|
|
func K8SReplicaSetName(val string) attribute.KeyValue {
|
|
|
|
return K8SReplicaSetNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SReplicaSetUID returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.replicaset.uid" semantic conventions. It represents the UID of the
|
|
|
|
// ReplicaSet.
|
|
|
|
func K8SReplicaSetUID(val string) attribute.KeyValue {
|
|
|
|
return K8SReplicaSetUIDKey.String(val)
|
|
|
|
}
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SStatefulSetName returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.statefulset.name" semantic conventions. It represents the name of the
|
|
|
|
// StatefulSet.
|
|
|
|
func K8SStatefulSetName(val string) attribute.KeyValue {
|
|
|
|
return K8SStatefulSetNameKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// K8SStatefulSetUID returns an attribute KeyValue conforming to the
|
|
|
|
// "k8s.statefulset.uid" semantic conventions. It represents the UID of the
|
|
|
|
// StatefulSet.
|
|
|
|
func K8SStatefulSetUID(val string) attribute.KeyValue {
|
|
|
|
return K8SStatefulSetUIDKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// An OCI image manifest.
|
2023-12-18 20:31:00 +00:00
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// OciManifestDigestKey is the attribute Key conforming to the
|
|
|
|
// "oci.manifest.digest" semantic conventions. It represents the digest of
|
|
|
|
// the OCI image manifest. For container images specifically is the digest
|
|
|
|
// by which the container image is known.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples:
|
|
|
|
// 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4'
|
|
|
|
// Note: Follows [OCI Image Manifest
|
|
|
|
// Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md),
|
|
|
|
// and specifically the [Digest
|
|
|
|
// property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).
|
|
|
|
// An example can be found in [Example Image
|
|
|
|
// Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest).
|
|
|
|
OciManifestDigestKey = attribute.Key("oci.manifest.digest")
|
2023-12-18 20:31:00 +00:00
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// OciManifestDigest returns an attribute KeyValue conforming to the
|
|
|
|
// "oci.manifest.digest" semantic conventions. It represents the digest of the
|
|
|
|
// OCI image manifest. For container images specifically is the digest by which
|
|
|
|
// the container image is known.
|
|
|
|
func OciManifestDigest(val string) attribute.KeyValue {
|
|
|
|
return OciManifestDigestKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// The operating system (OS) on which the process represented by this resource
|
|
|
|
// is running.
|
2023-12-18 20:31:00 +00:00
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// OSBuildIDKey is the attribute Key conforming to the "os.build_id"
|
|
|
|
// semantic conventions. It represents the unique identifier for a
|
|
|
|
// particular build or compilation of the operating system.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'TQ3C.230805.001.B2', '20E247', '22621'
|
|
|
|
OSBuildIDKey = attribute.Key("os.build_id")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// OSDescriptionKey is the attribute Key conforming to the "os.description"
|
|
|
|
// semantic conventions. It represents the human readable (not intended to
|
|
|
|
// be parsed) OS version information, like e.g. reported by `ver` or
|
|
|
|
// `lsb_release -a` commands.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
|
|
|
|
// LTS'
|
|
|
|
OSDescriptionKey = attribute.Key("os.description")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// OSNameKey is the attribute Key conforming to the "os.name" semantic
|
|
|
|
// conventions. It represents the human readable operating system name.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'iOS', 'Android', 'Ubuntu'
|
|
|
|
OSNameKey = attribute.Key("os.name")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
|
|
|
// OSTypeKey is the attribute Key conforming to the "os.type" semantic
|
|
|
|
// conventions. It represents the operating system type.
|
|
|
|
//
|
|
|
|
// Type: Enum
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
OSTypeKey = attribute.Key("os.type")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
|
|
|
// OSVersionKey is the attribute Key conforming to the "os.version"
|
|
|
|
// semantic conventions. It represents the version string of the operating
|
|
|
|
// system as defined in [Version
|
|
|
|
// Attributes](/docs/resource/README.md#version-attributes).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: '14.2.1', '18.04.1'
|
|
|
|
OSVersionKey = attribute.Key("os.version")
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// Microsoft Windows
|
|
|
|
OSTypeWindows = OSTypeKey.String("windows")
|
|
|
|
// Linux
|
|
|
|
OSTypeLinux = OSTypeKey.String("linux")
|
|
|
|
// Apple Darwin
|
|
|
|
OSTypeDarwin = OSTypeKey.String("darwin")
|
|
|
|
// FreeBSD
|
|
|
|
OSTypeFreeBSD = OSTypeKey.String("freebsd")
|
|
|
|
// NetBSD
|
|
|
|
OSTypeNetBSD = OSTypeKey.String("netbsd")
|
|
|
|
// OpenBSD
|
|
|
|
OSTypeOpenBSD = OSTypeKey.String("openbsd")
|
|
|
|
// DragonFly BSD
|
|
|
|
OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
|
|
|
|
// HP-UX (Hewlett Packard Unix)
|
|
|
|
OSTypeHPUX = OSTypeKey.String("hpux")
|
|
|
|
// AIX (Advanced Interactive eXecutive)
|
|
|
|
OSTypeAIX = OSTypeKey.String("aix")
|
|
|
|
// SunOS, Oracle Solaris
|
|
|
|
OSTypeSolaris = OSTypeKey.String("solaris")
|
|
|
|
// IBM z/OS
|
|
|
|
OSTypeZOS = OSTypeKey.String("z_os")
|
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
|
|
|
|
// semantic conventions. It represents the unique identifier for a particular
|
|
|
|
// build or compilation of the operating system.
|
|
|
|
func OSBuildID(val string) attribute.KeyValue {
|
|
|
|
return OSBuildIDKey.String(val)
|
|
|
|
}
|
|
|
|
|
2023-12-18 20:31:00 +00:00
|
|
|
// OSDescription returns an attribute KeyValue conforming to the
|
|
|
|
// "os.description" semantic conventions. It represents the human readable (not
|
|
|
|
// intended to be parsed) OS version information, like e.g. reported by `ver`
|
|
|
|
// or `lsb_release -a` commands.
|
|
|
|
func OSDescription(val string) attribute.KeyValue {
|
|
|
|
return OSDescriptionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// OSName returns an attribute KeyValue conforming to the "os.name" semantic
|
|
|
|
// conventions. It represents the human readable operating system name.
|
|
|
|
func OSName(val string) attribute.KeyValue {
|
|
|
|
return OSNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// OSVersion returns an attribute KeyValue conforming to the "os.version"
|
|
|
|
// semantic conventions. It represents the version string of the operating
|
|
|
|
// system as defined in [Version
|
|
|
|
// Attributes](/docs/resource/README.md#version-attributes).
|
|
|
|
func OSVersion(val string) attribute.KeyValue {
|
|
|
|
return OSVersionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// An operating system process.
|
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// ProcessCommandKey is the attribute Key conforming to the
|
|
|
|
// "process.command" semantic conventions. It represents the command used
|
|
|
|
// to launch the process (i.e. the command name). On Linux based systems,
|
|
|
|
// can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
|
|
|
|
// be set to the first parameter extracted from `GetCommandLineW`.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'cmd/otelcol'
|
|
|
|
ProcessCommandKey = attribute.Key("process.command")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ProcessCommandArgsKey is the attribute Key conforming to the
|
|
|
|
// "process.command_args" semantic conventions. It represents the all the
|
|
|
|
// command arguments (including the command/executable itself) as received
|
|
|
|
// by the process. On Linux-based systems (and some other Unixoid systems
|
|
|
|
// supporting procfs), can be set according to the list of null-delimited
|
|
|
|
// strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
|
|
|
|
// this would be the full argv vector passed to `main`.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: string[]
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'cmd/otecol', '--config=config.yaml'
|
|
|
|
ProcessCommandArgsKey = attribute.Key("process.command_args")
|
|
|
|
|
|
|
|
// ProcessCommandLineKey is the attribute Key conforming to the
|
|
|
|
// "process.command_line" semantic conventions. It represents the full
|
|
|
|
// command used to launch the process as a single string representing the
|
|
|
|
// full command. On Windows, can be set to the result of `GetCommandLineW`.
|
|
|
|
// Do not set this if you have to assemble it just for monitoring; use
|
|
|
|
// `process.command_args` instead.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
|
|
|
|
ProcessCommandLineKey = attribute.Key("process.command_line")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
|
|
|
// ProcessExecutableNameKey is the attribute Key conforming to the
|
|
|
|
// "process.executable.name" semantic conventions. It represents the name
|
|
|
|
// of the process executable. On Linux based systems, can be set to the
|
|
|
|
// `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
|
|
|
|
// of `GetProcessImageFileNameW`.
|
|
|
|
//
|
|
|
|
// Type: string
|
2024-08-19 08:01:33 +00:00
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'otelcol'
|
|
|
|
ProcessExecutableNameKey = attribute.Key("process.executable.name")
|
|
|
|
|
|
|
|
// ProcessExecutablePathKey is the attribute Key conforming to the
|
|
|
|
// "process.executable.path" semantic conventions. It represents the full
|
|
|
|
// path to the process executable. On Linux based systems, can be set to
|
|
|
|
// the target of `proc/[pid]/exe`. On Windows, can be set to the result of
|
|
|
|
// `GetProcessImageFileNameW`.
|
|
|
|
//
|
|
|
|
// Type: string
|
2024-08-19 08:01:33 +00:00
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: '/usr/bin/cmd/otelcol'
|
|
|
|
ProcessExecutablePathKey = attribute.Key("process.executable.path")
|
|
|
|
|
|
|
|
// ProcessOwnerKey is the attribute Key conforming to the "process.owner"
|
|
|
|
// semantic conventions. It represents the username of the user that owns
|
|
|
|
// the process.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'root'
|
|
|
|
ProcessOwnerKey = attribute.Key("process.owner")
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ProcessParentPIDKey is the attribute Key conforming to the
|
|
|
|
// "process.parent_pid" semantic conventions. It represents the parent
|
|
|
|
// Process identifier (PPID).
|
|
|
|
//
|
|
|
|
// Type: int
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 111
|
|
|
|
ProcessParentPIDKey = attribute.Key("process.parent_pid")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ProcessPIDKey is the attribute Key conforming to the "process.pid"
|
|
|
|
// semantic conventions. It represents the process identifier (PID).
|
|
|
|
//
|
|
|
|
// Type: int
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 1234
|
|
|
|
ProcessPIDKey = attribute.Key("process.pid")
|
|
|
|
|
|
|
|
// ProcessRuntimeDescriptionKey is the attribute Key conforming to the
|
|
|
|
// "process.runtime.description" semantic conventions. It represents an
|
|
|
|
// additional description about the runtime of the process, for example a
|
|
|
|
// specific vendor customization of the runtime environment.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
|
|
|
|
ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
|
|
|
|
|
|
|
|
// ProcessRuntimeNameKey is the attribute Key conforming to the
|
|
|
|
// "process.runtime.name" semantic conventions. It represents the name of
|
|
|
|
// the runtime of this process. For compiled native binaries, this SHOULD
|
|
|
|
// be the name of the compiler.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'OpenJDK Runtime Environment'
|
|
|
|
ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
|
|
|
|
|
|
|
|
// ProcessRuntimeVersionKey is the attribute Key conforming to the
|
|
|
|
// "process.runtime.version" semantic conventions. It represents the
|
|
|
|
// version of the runtime of this process, as returned by the runtime
|
|
|
|
// without modification.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '14.0.2'
|
|
|
|
ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
|
|
|
|
)
|
|
|
|
|
|
|
|
// ProcessCommand returns an attribute KeyValue conforming to the
|
|
|
|
// "process.command" semantic conventions. It represents the command used to
|
|
|
|
// launch the process (i.e. the command name). On Linux based systems, can be
|
|
|
|
// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
|
|
|
|
// the first parameter extracted from `GetCommandLineW`.
|
|
|
|
func ProcessCommand(val string) attribute.KeyValue {
|
|
|
|
return ProcessCommandKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ProcessCommandArgs returns an attribute KeyValue conforming to the
|
|
|
|
// "process.command_args" semantic conventions. It represents the all the
|
|
|
|
// command arguments (including the command/executable itself) as received by
|
|
|
|
// the process. On Linux-based systems (and some other Unixoid systems
|
|
|
|
// supporting procfs), can be set according to the list of null-delimited
|
|
|
|
// strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
|
|
|
|
// this would be the full argv vector passed to `main`.
|
|
|
|
func ProcessCommandArgs(val ...string) attribute.KeyValue {
|
|
|
|
return ProcessCommandArgsKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ProcessCommandLine returns an attribute KeyValue conforming to the
|
|
|
|
// "process.command_line" semantic conventions. It represents the full command
|
|
|
|
// used to launch the process as a single string representing the full command.
|
|
|
|
// On Windows, can be set to the result of `GetCommandLineW`. Do not set this
|
|
|
|
// if you have to assemble it just for monitoring; use `process.command_args`
|
|
|
|
// instead.
|
|
|
|
func ProcessCommandLine(val string) attribute.KeyValue {
|
|
|
|
return ProcessCommandLineKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ProcessExecutableName returns an attribute KeyValue conforming to the
|
|
|
|
// "process.executable.name" semantic conventions. It represents the name of
|
|
|
|
// the process executable. On Linux based systems, can be set to the `Name` in
|
|
|
|
// `proc/[pid]/status`. On Windows, can be set to the base name of
|
|
|
|
// `GetProcessImageFileNameW`.
|
|
|
|
func ProcessExecutableName(val string) attribute.KeyValue {
|
|
|
|
return ProcessExecutableNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ProcessExecutablePath returns an attribute KeyValue conforming to the
|
|
|
|
// "process.executable.path" semantic conventions. It represents the full path
|
|
|
|
// to the process executable. On Linux based systems, can be set to the target
|
|
|
|
// of `proc/[pid]/exe`. On Windows, can be set to the result of
|
|
|
|
// `GetProcessImageFileNameW`.
|
|
|
|
func ProcessExecutablePath(val string) attribute.KeyValue {
|
|
|
|
return ProcessExecutablePathKey.String(val)
|
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ProcessOwner returns an attribute KeyValue conforming to the
|
|
|
|
// "process.owner" semantic conventions. It represents the username of the user
|
|
|
|
// that owns the process.
|
|
|
|
func ProcessOwner(val string) attribute.KeyValue {
|
|
|
|
return ProcessOwnerKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ProcessParentPID returns an attribute KeyValue conforming to the
|
|
|
|
// "process.parent_pid" semantic conventions. It represents the parent Process
|
|
|
|
// identifier (PPID).
|
|
|
|
func ProcessParentPID(val int) attribute.KeyValue {
|
|
|
|
return ProcessParentPIDKey.Int(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ProcessPID returns an attribute KeyValue conforming to the "process.pid"
|
|
|
|
// semantic conventions. It represents the process identifier (PID).
|
|
|
|
func ProcessPID(val int) attribute.KeyValue {
|
|
|
|
return ProcessPIDKey.Int(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ProcessRuntimeDescription returns an attribute KeyValue conforming to the
|
|
|
|
// "process.runtime.description" semantic conventions. It represents an
|
|
|
|
// additional description about the runtime of the process, for example a
|
|
|
|
// specific vendor customization of the runtime environment.
|
|
|
|
func ProcessRuntimeDescription(val string) attribute.KeyValue {
|
|
|
|
return ProcessRuntimeDescriptionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ProcessRuntimeName returns an attribute KeyValue conforming to the
|
|
|
|
// "process.runtime.name" semantic conventions. It represents the name of the
|
|
|
|
// runtime of this process. For compiled native binaries, this SHOULD be the
|
|
|
|
// name of the compiler.
|
|
|
|
func ProcessRuntimeName(val string) attribute.KeyValue {
|
|
|
|
return ProcessRuntimeNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ProcessRuntimeVersion returns an attribute KeyValue conforming to the
|
|
|
|
// "process.runtime.version" semantic conventions. It represents the version of
|
|
|
|
// the runtime of this process, as returned by the runtime without
|
|
|
|
// modification.
|
|
|
|
func ProcessRuntimeVersion(val string) attribute.KeyValue {
|
|
|
|
return ProcessRuntimeVersionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// The Android platform on which the Android application is running.
|
|
|
|
const (
|
|
|
|
// AndroidOSAPILevelKey is the attribute Key conforming to the
|
|
|
|
// "android.os.api_level" semantic conventions. It represents the uniquely
|
|
|
|
// identifies the framework API revision offered by a version
|
|
|
|
// (`os.version`) of the android operating system. More information can be
|
|
|
|
// found
|
|
|
|
// [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '33', '32'
|
|
|
|
AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
|
|
|
|
)
|
|
|
|
|
|
|
|
// AndroidOSAPILevel returns an attribute KeyValue conforming to the
|
|
|
|
// "android.os.api_level" semantic conventions. It represents the uniquely
|
|
|
|
// identifies the framework API revision offered by a version (`os.version`) of
|
|
|
|
// the android operating system. More information can be found
|
|
|
|
// [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
|
|
|
|
func AndroidOSAPILevel(val string) attribute.KeyValue {
|
|
|
|
return AndroidOSAPILevelKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// The web browser in which the application represented by the resource is
|
|
|
|
// running. The `browser.*` attributes MUST be used only for resources that
|
|
|
|
// represent applications running in a web browser (regardless of whether
|
|
|
|
// running on a mobile or desktop device).
|
|
|
|
const (
|
|
|
|
// BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
|
|
|
|
// semantic conventions. It represents the array of brand name and version
|
|
|
|
// separated by a space
|
|
|
|
//
|
|
|
|
// Type: string[]
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99'
|
|
|
|
// Note: This value is intended to be taken from the [UA client hints
|
|
|
|
// API](https://wicg.github.io/ua-client-hints/#interface)
|
|
|
|
// (`navigator.userAgentData.brands`).
|
|
|
|
BrowserBrandsKey = attribute.Key("browser.brands")
|
|
|
|
|
|
|
|
// BrowserLanguageKey is the attribute Key conforming to the
|
|
|
|
// "browser.language" semantic conventions. It represents the preferred
|
|
|
|
// language of the user using the browser
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'en', 'en-US', 'fr', 'fr-FR'
|
|
|
|
// Note: This value is intended to be taken from the Navigator API
|
|
|
|
// `navigator.language`.
|
|
|
|
BrowserLanguageKey = attribute.Key("browser.language")
|
|
|
|
|
|
|
|
// BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
|
|
|
|
// semantic conventions. It represents a boolean that is true if the
|
|
|
|
// browser is running on a mobile device
|
|
|
|
//
|
|
|
|
// Type: boolean
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Note: This value is intended to be taken from the [UA client hints
|
|
|
|
// API](https://wicg.github.io/ua-client-hints/#interface)
|
|
|
|
// (`navigator.userAgentData.mobile`). If unavailable, this attribute
|
|
|
|
// SHOULD be left unset.
|
|
|
|
BrowserMobileKey = attribute.Key("browser.mobile")
|
|
|
|
|
|
|
|
// BrowserPlatformKey is the attribute Key conforming to the
|
|
|
|
// "browser.platform" semantic conventions. It represents the platform on
|
|
|
|
// which the browser is running
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'Windows', 'macOS', 'Android'
|
|
|
|
// Note: This value is intended to be taken from the [UA client hints
|
|
|
|
// API](https://wicg.github.io/ua-client-hints/#interface)
|
|
|
|
// (`navigator.userAgentData.platform`). If unavailable, the legacy
|
|
|
|
// `navigator.platform` API SHOULD NOT be used instead and this attribute
|
|
|
|
// SHOULD be left unset in order for the values to be consistent.
|
|
|
|
// The list of possible values is defined in the [W3C User-Agent Client
|
|
|
|
// Hints
|
|
|
|
// specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform).
|
|
|
|
// Note that some (but not all) of these values can overlap with values in
|
|
|
|
// the [`os.type` and `os.name` attributes](./os.md). However, for
|
|
|
|
// consistency, the values in the `browser.platform` attribute should
|
|
|
|
// capture the exact value that the user agent provides.
|
|
|
|
BrowserPlatformKey = attribute.Key("browser.platform")
|
|
|
|
)
|
|
|
|
|
|
|
|
// BrowserBrands returns an attribute KeyValue conforming to the
|
|
|
|
// "browser.brands" semantic conventions. It represents the array of brand name
|
|
|
|
// and version separated by a space
|
|
|
|
func BrowserBrands(val ...string) attribute.KeyValue {
|
|
|
|
return BrowserBrandsKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// BrowserLanguage returns an attribute KeyValue conforming to the
|
|
|
|
// "browser.language" semantic conventions. It represents the preferred
|
|
|
|
// language of the user using the browser
|
|
|
|
func BrowserLanguage(val string) attribute.KeyValue {
|
|
|
|
return BrowserLanguageKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// BrowserMobile returns an attribute KeyValue conforming to the
|
|
|
|
// "browser.mobile" semantic conventions. It represents a boolean that is true
|
|
|
|
// if the browser is running on a mobile device
|
|
|
|
func BrowserMobile(val bool) attribute.KeyValue {
|
|
|
|
return BrowserMobileKey.Bool(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// BrowserPlatform returns an attribute KeyValue conforming to the
|
|
|
|
// "browser.platform" semantic conventions. It represents the platform on which
|
|
|
|
// the browser is running
|
|
|
|
func BrowserPlatform(val string) attribute.KeyValue {
|
|
|
|
return BrowserPlatformKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Resources used by AWS Elastic Container Service (ECS).
|
|
|
|
const (
|
|
|
|
// AWSECSClusterARNKey is the attribute Key conforming to the
|
|
|
|
// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
|
|
|
|
// [ECS
|
|
|
|
// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
|
|
|
|
AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
|
|
|
|
|
|
|
|
// AWSECSContainerARNKey is the attribute Key conforming to the
|
|
|
|
// "aws.ecs.container.arn" semantic conventions. It represents the Amazon
|
|
|
|
// Resource Name (ARN) of an [ECS container
|
|
|
|
// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples:
|
|
|
|
// 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'
|
|
|
|
AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
|
|
|
|
|
|
|
|
// AWSECSLaunchtypeKey is the attribute Key conforming to the
|
|
|
|
// "aws.ecs.launchtype" semantic conventions. It represents the [launch
|
|
|
|
// type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
|
|
|
|
// for an ECS task.
|
|
|
|
//
|
|
|
|
// Type: Enum
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
|
|
|
|
|
|
|
|
// AWSECSTaskARNKey is the attribute Key conforming to the
|
|
|
|
// "aws.ecs.task.arn" semantic conventions. It represents the ARN of an
|
|
|
|
// [ECS task
|
|
|
|
// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples:
|
|
|
|
// 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b'
|
|
|
|
AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
|
|
|
|
|
|
|
|
// AWSECSTaskFamilyKey is the attribute Key conforming to the
|
|
|
|
// "aws.ecs.task.family" semantic conventions. It represents the task
|
|
|
|
// definition family this task definition is a member of.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'opentelemetry-family'
|
|
|
|
AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
|
|
|
|
|
|
|
|
// AWSECSTaskRevisionKey is the attribute Key conforming to the
|
|
|
|
// "aws.ecs.task.revision" semantic conventions. It represents the revision
|
|
|
|
// for this task definition.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '8', '26'
|
|
|
|
AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// ec2
|
|
|
|
AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
|
|
|
|
// fargate
|
|
|
|
AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
|
|
|
|
)
|
|
|
|
|
|
|
|
// AWSECSClusterARN returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS
|
|
|
|
// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
|
|
|
|
func AWSECSClusterARN(val string) attribute.KeyValue {
|
|
|
|
return AWSECSClusterARNKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// AWSECSContainerARN returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.ecs.container.arn" semantic conventions. It represents the Amazon
|
|
|
|
// Resource Name (ARN) of an [ECS container
|
|
|
|
// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
|
|
|
|
func AWSECSContainerARN(val string) attribute.KeyValue {
|
|
|
|
return AWSECSContainerARNKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// AWSECSTaskARN returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS
|
|
|
|
// task
|
|
|
|
// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
|
|
|
|
func AWSECSTaskARN(val string) attribute.KeyValue {
|
|
|
|
return AWSECSTaskARNKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// AWSECSTaskFamily returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.ecs.task.family" semantic conventions. It represents the task
|
|
|
|
// definition family this task definition is a member of.
|
|
|
|
func AWSECSTaskFamily(val string) attribute.KeyValue {
|
|
|
|
return AWSECSTaskFamilyKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// AWSECSTaskRevision returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.ecs.task.revision" semantic conventions. It represents the revision for
|
|
|
|
// this task definition.
|
|
|
|
func AWSECSTaskRevision(val string) attribute.KeyValue {
|
|
|
|
return AWSECSTaskRevisionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Resources used by AWS Elastic Kubernetes Service (EKS).
|
|
|
|
const (
|
|
|
|
// AWSEKSClusterARNKey is the attribute Key conforming to the
|
|
|
|
// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an
|
|
|
|
// EKS cluster.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
|
|
|
|
AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
|
|
|
|
)
|
|
|
|
|
|
|
|
// AWSEKSClusterARN returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
|
|
|
|
// cluster.
|
|
|
|
func AWSEKSClusterARN(val string) attribute.KeyValue {
|
|
|
|
return AWSEKSClusterARNKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Resources specific to Amazon Web Services.
|
|
|
|
const (
|
|
|
|
// AWSLogGroupARNsKey is the attribute Key conforming to the
|
|
|
|
// "aws.log.group.arns" semantic conventions. It represents the Amazon
|
|
|
|
// Resource Name(s) (ARN) of the AWS log group(s).
|
|
|
|
//
|
|
|
|
// Type: string[]
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples:
|
|
|
|
// 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*'
|
|
|
|
// Note: See the [log group ARN format
|
|
|
|
// documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
|
|
|
|
AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
|
|
|
|
|
|
|
|
// AWSLogGroupNamesKey is the attribute Key conforming to the
|
|
|
|
// "aws.log.group.names" semantic conventions. It represents the name(s) of
|
|
|
|
// the AWS log group(s) an application is writing to.
|
|
|
|
//
|
|
|
|
// Type: string[]
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '/aws/lambda/my-function', 'opentelemetry-service'
|
|
|
|
// Note: Multiple log groups must be supported for cases like
|
|
|
|
// multi-container applications, where a single application has sidecar
|
|
|
|
// containers, and each write to their own log group.
|
|
|
|
AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
|
|
|
|
|
|
|
|
// AWSLogStreamARNsKey is the attribute Key conforming to the
|
|
|
|
// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of
|
|
|
|
// the AWS log stream(s).
|
|
|
|
//
|
|
|
|
// Type: string[]
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples:
|
|
|
|
// 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
|
|
|
|
// Note: See the [log stream ARN format
|
|
|
|
// documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
|
|
|
|
// One log group can contain several log streams, so these ARNs necessarily
|
|
|
|
// identify both a log group and a log stream.
|
|
|
|
AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
|
|
|
|
|
|
|
|
// AWSLogStreamNamesKey is the attribute Key conforming to the
|
|
|
|
// "aws.log.stream.names" semantic conventions. It represents the name(s)
|
|
|
|
// of the AWS log stream(s) an application is writing to.
|
|
|
|
//
|
|
|
|
// Type: string[]
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
|
|
|
|
AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
|
|
|
|
)
|
|
|
|
|
|
|
|
// AWSLogGroupARNs returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
|
|
|
|
// Name(s) (ARN) of the AWS log group(s).
|
|
|
|
func AWSLogGroupARNs(val ...string) attribute.KeyValue {
|
|
|
|
return AWSLogGroupARNsKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// AWSLogGroupNames returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.log.group.names" semantic conventions. It represents the name(s) of the
|
|
|
|
// AWS log group(s) an application is writing to.
|
|
|
|
func AWSLogGroupNames(val ...string) attribute.KeyValue {
|
|
|
|
return AWSLogGroupNamesKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// AWSLogStreamARNs returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
|
|
|
|
// AWS log stream(s).
|
|
|
|
func AWSLogStreamARNs(val ...string) attribute.KeyValue {
|
|
|
|
return AWSLogStreamARNsKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// AWSLogStreamNames returns an attribute KeyValue conforming to the
|
|
|
|
// "aws.log.stream.names" semantic conventions. It represents the name(s) of
|
|
|
|
// the AWS log stream(s) an application is writing to.
|
|
|
|
func AWSLogStreamNames(val ...string) attribute.KeyValue {
|
|
|
|
return AWSLogStreamNamesKey.StringSlice(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Resource used by Google Cloud Run.
|
|
|
|
const (
|
|
|
|
// GCPCloudRunJobExecutionKey is the attribute Key conforming to the
|
|
|
|
// "gcp.cloud_run.job.execution" semantic conventions. It represents the
|
|
|
|
// name of the Cloud Run
|
|
|
|
// [execution](https://cloud.google.com/run/docs/managing/job-executions)
|
|
|
|
// being run for the Job, as set by the
|
|
|
|
// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
|
|
|
|
// environment variable.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'job-name-xxxx', 'sample-job-mdw84'
|
|
|
|
GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
|
|
|
|
|
|
|
|
// GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
|
|
|
|
// "gcp.cloud_run.job.task_index" semantic conventions. It represents the
|
|
|
|
// index for a task within an execution as provided by the
|
|
|
|
// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
|
|
|
|
// environment variable.
|
|
|
|
//
|
|
|
|
// Type: int
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 0, 1
|
|
|
|
GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
|
|
|
|
)
|
|
|
|
|
|
|
|
// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
|
|
|
|
// "gcp.cloud_run.job.execution" semantic conventions. It represents the name
|
|
|
|
// of the Cloud Run
|
|
|
|
// [execution](https://cloud.google.com/run/docs/managing/job-executions) being
|
|
|
|
// run for the Job, as set by the
|
|
|
|
// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
|
|
|
|
// environment variable.
|
|
|
|
func GCPCloudRunJobExecution(val string) attribute.KeyValue {
|
|
|
|
return GCPCloudRunJobExecutionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
|
|
|
|
// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
|
|
|
|
// for a task within an execution as provided by the
|
|
|
|
// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
|
|
|
|
// environment variable.
|
|
|
|
func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
|
|
|
|
return GCPCloudRunJobTaskIndexKey.Int(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Resources used by Google Compute Engine (GCE).
|
|
|
|
const (
|
|
|
|
// GCPGceInstanceHostnameKey is the attribute Key conforming to the
|
|
|
|
// "gcp.gce.instance.hostname" semantic conventions. It represents the
|
|
|
|
// hostname of a GCE instance. This is the full value of the default or
|
|
|
|
// [custom
|
|
|
|
// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'my-host1234.example.com',
|
|
|
|
// 'sample-vm.us-west1-b.c.my-project.internal'
|
|
|
|
GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
|
|
|
|
|
|
|
|
// GCPGceInstanceNameKey is the attribute Key conforming to the
|
|
|
|
// "gcp.gce.instance.name" semantic conventions. It represents the instance
|
|
|
|
// name of a GCE instance. This is the value provided by `host.name`, the
|
|
|
|
// visible name of the instance in the Cloud Console UI, and the prefix for
|
|
|
|
// the default hostname of the instance as defined by the [default internal
|
|
|
|
// DNS
|
|
|
|
// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'instance-1', 'my-vm-name'
|
|
|
|
GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name")
|
|
|
|
)
|
|
|
|
|
|
|
|
// GCPGceInstanceHostname returns an attribute KeyValue conforming to the
|
|
|
|
// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
|
|
|
|
// of a GCE instance. This is the full value of the default or [custom
|
|
|
|
// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
|
|
|
|
func GCPGceInstanceHostname(val string) attribute.KeyValue {
|
|
|
|
return GCPGceInstanceHostnameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// GCPGceInstanceName returns an attribute KeyValue conforming to the
|
|
|
|
// "gcp.gce.instance.name" semantic conventions. It represents the instance
|
|
|
|
// name of a GCE instance. This is the value provided by `host.name`, the
|
|
|
|
// visible name of the instance in the Cloud Console UI, and the prefix for the
|
|
|
|
// default hostname of the instance as defined by the [default internal DNS
|
|
|
|
// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
|
|
|
|
func GCPGceInstanceName(val string) attribute.KeyValue {
|
|
|
|
return GCPGceInstanceNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Heroku dyno metadata
|
|
|
|
const (
|
|
|
|
// HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
|
|
|
|
// semantic conventions. It represents the unique identifier for the
|
|
|
|
// application
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '2daa2797-e42b-4624-9322-ec3f968df4da'
|
|
|
|
HerokuAppIDKey = attribute.Key("heroku.app.id")
|
|
|
|
|
|
|
|
// HerokuReleaseCommitKey is the attribute Key conforming to the
|
|
|
|
// "heroku.release.commit" semantic conventions. It represents the commit
|
|
|
|
// hash for the current release
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'e6134959463efd8966b20e75b913cafe3f5ec'
|
|
|
|
HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
|
|
|
|
|
|
|
|
// HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
|
|
|
|
// "heroku.release.creation_timestamp" semantic conventions. It represents
|
|
|
|
// the time and date the release was created
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '2022-10-23T18:00:42Z'
|
|
|
|
HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
|
|
|
|
)
|
|
|
|
|
|
|
|
// HerokuAppID returns an attribute KeyValue conforming to the
|
|
|
|
// "heroku.app.id" semantic conventions. It represents the unique identifier
|
|
|
|
// for the application
|
|
|
|
func HerokuAppID(val string) attribute.KeyValue {
|
|
|
|
return HerokuAppIDKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HerokuReleaseCommit returns an attribute KeyValue conforming to the
|
|
|
|
// "heroku.release.commit" semantic conventions. It represents the commit hash
|
|
|
|
// for the current release
|
|
|
|
func HerokuReleaseCommit(val string) attribute.KeyValue {
|
|
|
|
return HerokuReleaseCommitKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming
|
|
|
|
// to the "heroku.release.creation_timestamp" semantic conventions. It
|
|
|
|
// represents the time and date the release was created
|
|
|
|
func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
|
|
|
|
return HerokuReleaseCreationTimestampKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// The software deployment.
|
|
|
|
const (
|
|
|
|
// DeploymentEnvironmentKey is the attribute Key conforming to the
|
|
|
|
// "deployment.environment" semantic conventions. It represents the name of
|
|
|
|
// the [deployment
|
|
|
|
// environment](https://wikipedia.org/wiki/Deployment_environment) (aka
|
|
|
|
// deployment tier).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'staging', 'production'
|
|
|
|
// Note: `deployment.environment` does not affect the uniqueness
|
|
|
|
// constraints defined through
|
|
|
|
// the `service.namespace`, `service.name` and `service.instance.id`
|
|
|
|
// resource attributes.
|
|
|
|
// This implies that resources carrying the following attribute
|
|
|
|
// combinations MUST be
|
|
|
|
// considered to be identifying the same service:
|
|
|
|
//
|
|
|
|
// * `service.name=frontend`, `deployment.environment=production`
|
|
|
|
// * `service.name=frontend`, `deployment.environment=staging`.
|
|
|
|
DeploymentEnvironmentKey = attribute.Key("deployment.environment")
|
|
|
|
)
|
|
|
|
|
|
|
|
// DeploymentEnvironment returns an attribute KeyValue conforming to the
|
|
|
|
// "deployment.environment" semantic conventions. It represents the name of the
|
|
|
|
// [deployment environment](https://wikipedia.org/wiki/Deployment_environment)
|
|
|
|
// (aka deployment tier).
|
|
|
|
func DeploymentEnvironment(val string) attribute.KeyValue {
|
|
|
|
return DeploymentEnvironmentKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// A serverless instance.
|
2023-12-18 20:31:00 +00:00
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
|
|
|
|
// semantic conventions. It represents the execution environment ID as a
|
|
|
|
// string, that will be potentially reused for other invocations to the
|
|
|
|
// same function/function version.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
|
|
|
|
// Note: * **AWS Lambda:** Use the (full) log stream name.
|
|
|
|
FaaSInstanceKey = attribute.Key("faas.instance")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// FaaSMaxMemoryKey is the attribute Key conforming to the
|
|
|
|
// "faas.max_memory" semantic conventions. It represents the amount of
|
|
|
|
// memory available to the serverless function converted to Bytes.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
2024-08-19 08:01:33 +00:00
|
|
|
// Type: int
|
2023-12-18 20:31:00 +00:00
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 134217728
|
|
|
|
// Note: It's recommended to set this attribute since e.g. too little
|
|
|
|
// memory can easily stop a Java AWS Lambda function from working
|
|
|
|
// correctly. On AWS Lambda, the environment variable
|
|
|
|
// `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must
|
|
|
|
// be multiplied by 1,048,576).
|
|
|
|
FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
|
2023-12-18 20:31:00 +00:00
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
|
|
|
|
// conventions. It represents the name of the single function that this
|
|
|
|
// runtime instance executes.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Required
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'my-function', 'myazurefunctionapp/some-function-name'
|
|
|
|
// Note: This is the name of the function as configured/deployed on the
|
|
|
|
// FaaS
|
|
|
|
// platform and is usually different from the name of the callback
|
|
|
|
// function (which may be stored in the
|
|
|
|
// [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
|
|
|
|
// span attributes).
|
|
|
|
//
|
|
|
|
// For some cloud providers, the above definition is ambiguous. The
|
|
|
|
// following
|
|
|
|
// definition of function name MUST be used for this attribute
|
|
|
|
// (and consequently the span name) for the listed cloud
|
|
|
|
// providers/products:
|
|
|
|
//
|
|
|
|
// * **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
|
|
|
|
// followed by a forward slash followed by the function name (this form
|
|
|
|
// can also be seen in the resource JSON for the function).
|
|
|
|
// This means that a span attribute MUST be used, as an Azure function
|
|
|
|
// app can host multiple functions that would usually share
|
|
|
|
// a TracerProvider (see also the `cloud.resource_id` attribute).
|
|
|
|
FaaSNameKey = attribute.Key("faas.name")
|
|
|
|
|
|
|
|
// FaaSVersionKey is the attribute Key conforming to the "faas.version"
|
|
|
|
// semantic conventions. It represents the immutable version of the
|
|
|
|
// function being executed.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
|
|
|
// Examples: '26', 'pinkfroid-00002'
|
|
|
|
// Note: Depending on the cloud provider and platform, use:
|
|
|
|
//
|
|
|
|
// * **AWS Lambda:** The [function
|
|
|
|
// version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
|
|
|
|
// (an integer represented as a decimal string).
|
|
|
|
// * **Google Cloud Run (Services):** The
|
|
|
|
// [revision](https://cloud.google.com/run/docs/managing/revisions)
|
|
|
|
// (i.e., the function name plus the revision suffix).
|
|
|
|
// * **Google Cloud Functions:** The value of the
|
|
|
|
// [`K_REVISION` environment
|
|
|
|
// variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
|
|
|
|
// * **Azure Functions:** Not applicable. Do not set this attribute.
|
|
|
|
FaaSVersionKey = attribute.Key("faas.version")
|
2023-12-18 20:31:00 +00:00
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// FaaSInstance returns an attribute KeyValue conforming to the
|
|
|
|
// "faas.instance" semantic conventions. It represents the execution
|
|
|
|
// environment ID as a string, that will be potentially reused for other
|
|
|
|
// invocations to the same function/function version.
|
|
|
|
func FaaSInstance(val string) attribute.KeyValue {
|
|
|
|
return FaaSInstanceKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// FaaSMaxMemory returns an attribute KeyValue conforming to the
|
|
|
|
// "faas.max_memory" semantic conventions. It represents the amount of memory
|
|
|
|
// available to the serverless function converted to Bytes.
|
|
|
|
func FaaSMaxMemory(val int) attribute.KeyValue {
|
|
|
|
return FaaSMaxMemoryKey.Int(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// FaaSName returns an attribute KeyValue conforming to the "faas.name"
|
|
|
|
// semantic conventions. It represents the name of the single function that
|
|
|
|
// this runtime instance executes.
|
|
|
|
func FaaSName(val string) attribute.KeyValue {
|
|
|
|
return FaaSNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// FaaSVersion returns an attribute KeyValue conforming to the
|
|
|
|
// "faas.version" semantic conventions. It represents the immutable version of
|
|
|
|
// the function being executed.
|
|
|
|
func FaaSVersion(val string) attribute.KeyValue {
|
|
|
|
return FaaSVersionKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// A service instance.
|
|
|
|
const (
|
|
|
|
// ServiceNameKey is the attribute Key conforming to the "service.name"
|
|
|
|
// semantic conventions. It represents the logical name of the service.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Required
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'shoppingcart'
|
|
|
|
// Note: MUST be the same for all instances of horizontally scaled
|
|
|
|
// services. If the value was not specified, SDKs MUST fallback to
|
|
|
|
// `unknown_service:` concatenated with
|
|
|
|
// [`process.executable.name`](process.md#process), e.g.
|
|
|
|
// `unknown_service:bash`. If `process.executable.name` is not available,
|
|
|
|
// the value MUST be set to `unknown_service`.
|
|
|
|
ServiceNameKey = attribute.Key("service.name")
|
|
|
|
|
|
|
|
// ServiceVersionKey is the attribute Key conforming to the
|
|
|
|
// "service.version" semantic conventions. It represents the version string
|
|
|
|
// of the service API or implementation. The format is not defined by these
|
|
|
|
// conventions.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: '2.0.0', 'a01dbef8a'
|
|
|
|
ServiceVersionKey = attribute.Key("service.version")
|
|
|
|
)
|
|
|
|
|
|
|
|
// ServiceName returns an attribute KeyValue conforming to the
|
|
|
|
// "service.name" semantic conventions. It represents the logical name of the
|
|
|
|
// service.
|
|
|
|
func ServiceName(val string) attribute.KeyValue {
|
|
|
|
return ServiceNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ServiceVersion returns an attribute KeyValue conforming to the
|
|
|
|
// "service.version" semantic conventions. It represents the version string of
|
|
|
|
// the service API or implementation. The format is not defined by these
|
|
|
|
// conventions.
|
|
|
|
func ServiceVersion(val string) attribute.KeyValue {
|
|
|
|
return ServiceVersionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// A service instance.
|
|
|
|
const (
|
|
|
|
// ServiceInstanceIDKey is the attribute Key conforming to the
|
|
|
|
// "service.instance.id" semantic conventions. It represents the string ID
|
|
|
|
// of the service instance.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'my-k8s-pod-deployment-1',
|
|
|
|
// '627cc493-f310-47de-96bd-71410b7dec09'
|
|
|
|
// Note: MUST be unique for each instance of the same
|
|
|
|
// `service.namespace,service.name` pair (in other words
|
|
|
|
// `service.namespace,service.name,service.instance.id` triplet MUST be
|
|
|
|
// globally unique). The ID helps to distinguish instances of the same
|
|
|
|
// service that exist at the same time (e.g. instances of a horizontally
|
|
|
|
// scaled service). It is preferable for the ID to be persistent and stay
|
|
|
|
// the same for the lifetime of the service instance, however it is
|
|
|
|
// acceptable that the ID is ephemeral and changes during important
|
|
|
|
// lifetime events for the service (e.g. service restarts). If the service
|
|
|
|
// has no inherent unique ID that can be used as the value of this
|
|
|
|
// attribute it is recommended to generate a random Version 1 or Version 4
|
|
|
|
// RFC 4122 UUID (services aiming for reproducible UUIDs may also use
|
|
|
|
// Version 5, see RFC 4122 for more recommendations).
|
|
|
|
ServiceInstanceIDKey = attribute.Key("service.instance.id")
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ServiceNamespaceKey is the attribute Key conforming to the
|
|
|
|
// "service.namespace" semantic conventions. It represents a namespace for
|
|
|
|
// `service.name`.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'Shop'
|
|
|
|
// Note: A string value having a meaning that helps to distinguish a group
|
|
|
|
// of services, for example the team name that owns a group of services.
|
|
|
|
// `service.name` is expected to be unique within the same namespace. If
|
|
|
|
// `service.namespace` is not specified in the Resource then `service.name`
|
|
|
|
// is expected to be unique for all services that have no explicit
|
|
|
|
// namespace defined (so the empty/unspecified namespace is simply one more
|
|
|
|
// valid namespace). Zero-length namespace string is assumed equal to
|
|
|
|
// unspecified namespace.
|
|
|
|
ServiceNamespaceKey = attribute.Key("service.namespace")
|
|
|
|
)
|
2023-12-18 20:31:00 +00:00
|
|
|
|
|
|
|
// ServiceInstanceID returns an attribute KeyValue conforming to the
|
|
|
|
// "service.instance.id" semantic conventions. It represents the string ID of
|
|
|
|
// the service instance.
|
|
|
|
func ServiceInstanceID(val string) attribute.KeyValue {
|
|
|
|
return ServiceInstanceIDKey.String(val)
|
|
|
|
}
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// ServiceNamespace returns an attribute KeyValue conforming to the
|
|
|
|
// "service.namespace" semantic conventions. It represents a namespace for
|
|
|
|
// `service.name`.
|
|
|
|
func ServiceNamespace(val string) attribute.KeyValue {
|
|
|
|
return ServiceNamespaceKey.String(val)
|
|
|
|
}
|
|
|
|
|
2023-12-18 20:31:00 +00:00
|
|
|
// The telemetry SDK used to capture data recorded by the instrumentation
|
|
|
|
// libraries.
|
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// TelemetrySDKLanguageKey is the attribute Key conforming to the
|
|
|
|
// "telemetry.sdk.language" semantic conventions. It represents the
|
|
|
|
// language of the telemetry SDK.
|
|
|
|
//
|
|
|
|
// Type: Enum
|
|
|
|
// RequirementLevel: Required
|
|
|
|
// Stability: experimental
|
|
|
|
TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
|
|
|
|
|
2023-12-18 20:31:00 +00:00
|
|
|
// TelemetrySDKNameKey is the attribute Key conforming to the
|
|
|
|
// "telemetry.sdk.name" semantic conventions. It represents the name of the
|
|
|
|
// telemetry SDK as defined above.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Required
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'opentelemetry'
|
|
|
|
// Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute
|
|
|
|
// to `opentelemetry`.
|
|
|
|
// If another SDK, like a fork or a vendor-provided implementation, is
|
|
|
|
// used, this SDK MUST set the
|
|
|
|
// `telemetry.sdk.name` attribute to the fully-qualified class or module
|
|
|
|
// name of this SDK's main entry point
|
|
|
|
// or another suitable identifier depending on the language.
|
|
|
|
// The identifier `opentelemetry` is reserved and MUST NOT be used in this
|
|
|
|
// case.
|
|
|
|
// All custom identifiers SHOULD be stable across different versions of an
|
|
|
|
// implementation.
|
|
|
|
TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
|
|
|
|
|
|
|
|
// TelemetrySDKVersionKey is the attribute Key conforming to the
|
|
|
|
// "telemetry.sdk.version" semantic conventions. It represents the version
|
|
|
|
// string of the telemetry SDK.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Required
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: '1.2.3'
|
|
|
|
TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// cpp
|
|
|
|
TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
|
|
|
|
// dotnet
|
|
|
|
TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
|
|
|
|
// erlang
|
|
|
|
TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
|
|
|
|
// go
|
|
|
|
TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
|
|
|
|
// java
|
|
|
|
TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
|
|
|
|
// nodejs
|
|
|
|
TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
|
|
|
|
// php
|
|
|
|
TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
|
|
|
|
// python
|
|
|
|
TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
|
|
|
|
// ruby
|
|
|
|
TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
|
|
|
|
// rust
|
|
|
|
TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
|
|
|
|
// swift
|
|
|
|
TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
|
|
|
|
// webjs
|
|
|
|
TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
|
|
|
|
)
|
|
|
|
|
|
|
|
// TelemetrySDKName returns an attribute KeyValue conforming to the
|
|
|
|
// "telemetry.sdk.name" semantic conventions. It represents the name of the
|
|
|
|
// telemetry SDK as defined above.
|
|
|
|
func TelemetrySDKName(val string) attribute.KeyValue {
|
|
|
|
return TelemetrySDKNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// TelemetrySDKVersion returns an attribute KeyValue conforming to the
|
|
|
|
// "telemetry.sdk.version" semantic conventions. It represents the version
|
|
|
|
// string of the telemetry SDK.
|
|
|
|
func TelemetrySDKVersion(val string) attribute.KeyValue {
|
|
|
|
return TelemetrySDKVersionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// The telemetry SDK used to capture data recorded by the instrumentation
|
|
|
|
// libraries.
|
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// TelemetryDistroNameKey is the attribute Key conforming to the
|
|
|
|
// "telemetry.distro.name" semantic conventions. It represents the name of
|
|
|
|
// the auto instrumentation agent or distribution, if used.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'parts-unlimited-java'
|
|
|
|
// Note: Official auto instrumentation agents and distributions SHOULD set
|
|
|
|
// the `telemetry.distro.name` attribute to
|
|
|
|
// a string starting with `opentelemetry-`, e.g.
|
|
|
|
// `opentelemetry-java-instrumentation`.
|
|
|
|
TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
|
|
|
|
|
|
|
|
// TelemetryDistroVersionKey is the attribute Key conforming to the
|
|
|
|
// "telemetry.distro.version" semantic conventions. It represents the
|
|
|
|
// version string of the auto instrumentation agent or distribution, if
|
|
|
|
// used.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: '1.2.3'
|
2024-08-19 08:01:33 +00:00
|
|
|
TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
|
2023-12-18 20:31:00 +00:00
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// TelemetryDistroName returns an attribute KeyValue conforming to the
|
|
|
|
// "telemetry.distro.name" semantic conventions. It represents the name of the
|
|
|
|
// auto instrumentation agent or distribution, if used.
|
|
|
|
func TelemetryDistroName(val string) attribute.KeyValue {
|
|
|
|
return TelemetryDistroNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// TelemetryDistroVersion returns an attribute KeyValue conforming to the
|
|
|
|
// "telemetry.distro.version" semantic conventions. It represents the version
|
|
|
|
// string of the auto instrumentation agent or distribution, if used.
|
|
|
|
func TelemetryDistroVersion(val string) attribute.KeyValue {
|
|
|
|
return TelemetryDistroVersionKey.String(val)
|
2023-12-18 20:31:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Resource describing the packaged software running the application code. Web
|
|
|
|
// engines are typically executed using process.runtime.
|
|
|
|
const (
|
2024-08-19 08:01:33 +00:00
|
|
|
// WebEngineDescriptionKey is the attribute Key conforming to the
|
|
|
|
// "webengine.description" semantic conventions. It represents the
|
|
|
|
// additional description of the web engine (e.g. detailed version and
|
|
|
|
// edition information).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: experimental
|
|
|
|
// Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
|
|
|
|
// 2.2.2.Final'
|
|
|
|
WebEngineDescriptionKey = attribute.Key("webengine.description")
|
|
|
|
|
2023-12-18 20:31:00 +00:00
|
|
|
// WebEngineNameKey is the attribute Key conforming to the "webengine.name"
|
|
|
|
// semantic conventions. It represents the name of the web engine.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Required
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'WildFly'
|
|
|
|
WebEngineNameKey = attribute.Key("webengine.name")
|
|
|
|
|
|
|
|
// WebEngineVersionKey is the attribute Key conforming to the
|
|
|
|
// "webengine.version" semantic conventions. It represents the version of
|
|
|
|
// the web engine.
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: '21.0.0'
|
|
|
|
WebEngineVersionKey = attribute.Key("webengine.version")
|
|
|
|
)
|
|
|
|
|
2024-08-19 08:01:33 +00:00
|
|
|
// WebEngineDescription returns an attribute KeyValue conforming to the
|
|
|
|
// "webengine.description" semantic conventions. It represents the additional
|
|
|
|
// description of the web engine (e.g. detailed version and edition
|
|
|
|
// information).
|
|
|
|
func WebEngineDescription(val string) attribute.KeyValue {
|
|
|
|
return WebEngineDescriptionKey.String(val)
|
|
|
|
}
|
|
|
|
|
2023-12-18 20:31:00 +00:00
|
|
|
// WebEngineName returns an attribute KeyValue conforming to the
|
|
|
|
// "webengine.name" semantic conventions. It represents the name of the web
|
|
|
|
// engine.
|
|
|
|
func WebEngineName(val string) attribute.KeyValue {
|
|
|
|
return WebEngineNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// WebEngineVersion returns an attribute KeyValue conforming to the
|
|
|
|
// "webengine.version" semantic conventions. It represents the version of the
|
|
|
|
// web engine.
|
|
|
|
func WebEngineVersion(val string) attribute.KeyValue {
|
|
|
|
return WebEngineVersionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's
|
|
|
|
// concepts.
|
|
|
|
const (
|
|
|
|
// OTelScopeNameKey is the attribute Key conforming to the
|
|
|
|
// "otel.scope.name" semantic conventions. It represents the name of the
|
|
|
|
// instrumentation scope - (`InstrumentationScope.Name` in OTLP).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: 'io.opentelemetry.contrib.mongodb'
|
|
|
|
OTelScopeNameKey = attribute.Key("otel.scope.name")
|
|
|
|
|
|
|
|
// OTelScopeVersionKey is the attribute Key conforming to the
|
|
|
|
// "otel.scope.version" semantic conventions. It represents the version of
|
|
|
|
// the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
|
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
2024-08-19 08:01:33 +00:00
|
|
|
// Stability: experimental
|
2023-12-18 20:31:00 +00:00
|
|
|
// Examples: '1.0.0'
|
|
|
|
OTelScopeVersionKey = attribute.Key("otel.scope.version")
|
|
|
|
)
|
|
|
|
|
|
|
|
// OTelScopeName returns an attribute KeyValue conforming to the
|
|
|
|
// "otel.scope.name" semantic conventions. It represents the name of the
|
|
|
|
// instrumentation scope - (`InstrumentationScope.Name` in OTLP).
|
|
|
|
func OTelScopeName(val string) attribute.KeyValue {
|
|
|
|
return OTelScopeNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// OTelScopeVersion returns an attribute KeyValue conforming to the
|
|
|
|
// "otel.scope.version" semantic conventions. It represents the version of the
|
|
|
|
// instrumentation scope - (`InstrumentationScope.Version` in OTLP).
|
|
|
|
func OTelScopeVersion(val string) attribute.KeyValue {
|
|
|
|
return OTelScopeVersionKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Span attributes used by non-OTLP exporters to represent OpenTelemetry
|
|
|
|
// Scope's concepts.
|
|
|
|
const (
|
|
|
|
// OTelLibraryNameKey is the attribute Key conforming to the
|
2024-08-19 08:01:33 +00:00
|
|
|
// "otel.library.name" semantic conventions.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: deprecated
|
|
|
|
// Examples: 'io.opentelemetry.contrib.mongodb'
|
2024-08-19 08:01:33 +00:00
|
|
|
// Deprecated: use the `otel.scope.name` attribute.
|
2023-12-18 20:31:00 +00:00
|
|
|
OTelLibraryNameKey = attribute.Key("otel.library.name")
|
|
|
|
|
|
|
|
// OTelLibraryVersionKey is the attribute Key conforming to the
|
2024-08-19 08:01:33 +00:00
|
|
|
// "otel.library.version" semantic conventions.
|
2023-12-18 20:31:00 +00:00
|
|
|
//
|
|
|
|
// Type: string
|
|
|
|
// RequirementLevel: Optional
|
|
|
|
// Stability: deprecated
|
|
|
|
// Examples: '1.0.0'
|
2024-08-19 08:01:33 +00:00
|
|
|
// Deprecated: use the `otel.scope.version` attribute.
|
2023-12-18 20:31:00 +00:00
|
|
|
OTelLibraryVersionKey = attribute.Key("otel.library.version")
|
|
|
|
)
|
|
|
|
|
|
|
|
// OTelLibraryName returns an attribute KeyValue conforming to the
|
2024-08-19 08:01:33 +00:00
|
|
|
// "otel.library.name" semantic conventions.
|
|
|
|
//
|
|
|
|
// Deprecated: use the `otel.scope.name` attribute.
|
2023-12-18 20:31:00 +00:00
|
|
|
func OTelLibraryName(val string) attribute.KeyValue {
|
|
|
|
return OTelLibraryNameKey.String(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
// OTelLibraryVersion returns an attribute KeyValue conforming to the
|
2024-08-19 08:01:33 +00:00
|
|
|
// "otel.library.version" semantic conventions.
|
|
|
|
//
|
|
|
|
// Deprecated: use the `otel.scope.version` attribute.
|
2023-12-18 20:31:00 +00:00
|
|
|
func OTelLibraryVersion(val string) attribute.KeyValue {
|
|
|
|
return OTelLibraryVersionKey.String(val)
|
|
|
|
}
|