diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ResourceAttributes.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ResourceAttributes.java index 0c270f8433979..783222a5faa9e 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ResourceAttributes.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ResourceAttributes.java @@ -13,46 +13,85 @@ import java.util.List; +import static io.opentelemetry.api.common.AttributeKey.booleanKey; import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; -// this is a copy of io.opentelemetry.semconv.resource.attributes.ResourceAttributes -// because the module that contains that class is not stable, so don't want to take a dependency on -// it +// this is a copy of io.opentelemetry.semconv.ResourceAttributes +// because the module that contains that class is not stable, +// so don't want to take a dependency on it +@SuppressWarnings("unused") public final class ResourceAttributes { + /** The URL of the OpenTelemetry schema for these keys and values. */ + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.22.0"; + /** - * The URL of the OpenTelemetry schema for these keys and values. + * Uniquely identifies the framework API revision offered by a version ({@code os.version}) of the + * android operating system. More information can be found here. */ - public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.9.0"; + public static final AttributeKey ANDROID_OS_API_LEVEL = stringKey("android.os.api_level"); /** - * Name of the cloud provider. + * Array of brand name and version separated by a space + * + *

Notes: + * + *

*/ - public static final AttributeKey CLOUD_PROVIDER = stringKey("cloud.provider"); + public static final AttributeKey> BROWSER_BRANDS = stringArrayKey("browser.brands"); /** - * The cloud account ID the resource is assigned to. + * Preferred language of the user using the browser + * + *

Notes: + * + *

    + *
  • This value is intended to be taken from the Navigator API {@code navigator.language}. + *
*/ - public static final AttributeKey CLOUD_ACCOUNT_ID = stringKey("cloud.account.id"); + public static final AttributeKey BROWSER_LANGUAGE = stringKey("browser.language"); /** - * The geographical region the resource is running. + * A boolean that is true if the browser is running on a mobile device * *

Notes: * *

*/ - public static final AttributeKey CLOUD_REGION = stringKey("cloud.region"); + public static final AttributeKey BROWSER_MOBILE = booleanKey("browser.mobile"); + + /** + * The platform on which the browser is running + * + *

Notes: + * + *

    + *
  • This value is intended to be taken from the UA client hints API ({@code + * navigator.userAgentData.platform}). If unavailable, the legacy {@code 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. Note that some (but not all) of these values can overlap with + * values in the {@code os.type} and {@code os.name} attributes. + * However, for consistency, the values in the {@code browser.platform} attribute should + * capture the exact value that the user agent provides. + *
+ */ + public static final AttributeKey BROWSER_PLATFORM = stringKey("browser.platform"); + + /** The cloud account ID the resource is assigned to. */ + public static final AttributeKey CLOUD_ACCOUNT_ID = stringKey("cloud.account.id"); /** * Cloud regions often have multiple, isolated locations known as zones to increase availability. @@ -78,13 +117,60 @@ public final class ResourceAttributes { */ public static final AttributeKey CLOUD_PLATFORM = stringKey("cloud.platform"); + /** Name of the cloud provider. */ + public static final AttributeKey CLOUD_PROVIDER = stringKey("cloud.provider"); + /** - * The Amazon Resource Name (ARN) of an ECS - * container instance. + * The geographical region the resource is running. + * + *

Notes: + * + *

*/ - public static final AttributeKey AWS_ECS_CONTAINER_ARN = - stringKey("aws.ecs.container.arn"); + public static final AttributeKey CLOUD_REGION = stringKey("cloud.region"); + + /** + * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on + * AWS, a fully + * qualified resource ID on Azure, a full resource + * name on GCP) + * + *

Notes: + * + *

    + *
  • On some cloud providers, it may not be possible to determine the full ID at startup, so + * it may be necessary to set {@code cloud.resource_id} as a span attribute instead. + *
  • The exact value to use for {@code 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. + * Take care not to use the "invoked ARN" directly but replace any alias + * suffix with the resolved function version, as the same runtime instance may be + * invokable with multiple different aliases. + *
  • GCP: The URI of the resource + *
  • Azure: The Fully + * Qualified Resource ID of the invoked function, not the function app, having + * the form {@code + * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. + * This means that a span attribute MUST be used, as an Azure function app can host multiple + * functions that would usually share a TracerProvider. + *
+ */ + public static final AttributeKey CLOUD_RESOURCE_ID = stringKey("cloud.resource_id"); /** * The ARN of an AWS_ECS_CLUSTER_ARN = stringKey("aws.ecs.cluster.arn"); + /** + * The Amazon Resource Name (ARN) of an ECS + * container instance. + */ + public static final AttributeKey AWS_ECS_CONTAINER_ARN = + stringKey("aws.ecs.container.arn"); + /** * The launch @@ -107,21 +201,29 @@ public final class ResourceAttributes { */ public static final AttributeKey AWS_ECS_TASK_ARN = stringKey("aws.ecs.task.arn"); - /** - * The task definition family this task definition is a member of. - */ + /** The task definition family this task definition is a member of. */ public static final AttributeKey AWS_ECS_TASK_FAMILY = stringKey("aws.ecs.task.family"); - /** - * The revision for this task definition. - */ + /** The revision for this task definition. */ public static final AttributeKey AWS_ECS_TASK_REVISION = stringKey("aws.ecs.task.revision"); + /** The ARN of an EKS cluster. */ + public static final AttributeKey AWS_EKS_CLUSTER_ARN = stringKey("aws.eks.cluster.arn"); + /** - * The ARN of an EKS cluster. + * The Amazon Resource Name(s) (ARN) of the AWS log group(s). + * + *

Notes: + * + *

*/ - public static final AttributeKey AWS_EKS_CLUSTER_ARN = stringKey("aws.eks.cluster.arn"); + public static final AttributeKey> AWS_LOG_GROUP_ARNS = + stringArrayKey("aws.log.group.arns"); /** * The name(s) of the AWS log group(s) an application is writing to. @@ -137,44 +239,91 @@ public final class ResourceAttributes { stringArrayKey("aws.log.group.names"); /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). + * The ARN(s) of the AWS log stream(s). * *

Notes: * *

    *
  • See the log - * group ARN format documentation. + * stream ARN format documentation. One log group can contain several log streams, so + * these ARNs necessarily identify both a log group and a log stream. *
*/ - public static final AttributeKey> AWS_LOG_GROUP_ARNS = - stringArrayKey("aws.log.group.arns"); + public static final AttributeKey> AWS_LOG_STREAM_ARNS = + stringArrayKey("aws.log.stream.arns"); - /** - * The name(s) of the AWS log stream(s) an application is writing to. - */ + /** The name(s) of the AWS log stream(s) an application is writing to. */ public static final AttributeKey> AWS_LOG_STREAM_NAMES = stringArrayKey("aws.log.stream.names"); /** - * The ARN(s) of the AWS log stream(s). + * The name of the Cloud Run execution being run for + * the Job, as set by the {@code + * CLOUD_RUN_EXECUTION} environment variable. + */ + public static final AttributeKey GCP_CLOUD_RUN_JOB_EXECUTION = + stringKey("gcp.cloud_run.job.execution"); + + /** + * The index for a task within an execution as provided by the {@code + * CLOUD_RUN_TASK_INDEX} environment variable. + */ + public static final AttributeKey GCP_CLOUD_RUN_JOB_TASK_INDEX = + longKey("gcp.cloud_run.job.task_index"); + + /** + * The hostname of a GCE instance. This is the full value of the default or custom hostname. + */ + public static final AttributeKey GCP_GCE_INSTANCE_HOSTNAME = + stringKey("gcp.gce.instance.hostname"); + + /** + * The instance name of a GCE instance. This is the value provided by {@code 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. + */ + public static final AttributeKey GCP_GCE_INSTANCE_NAME = + stringKey("gcp.gce.instance.name"); + + /** Unique identifier for the application */ + public static final AttributeKey HEROKU_APP_ID = stringKey("heroku.app.id"); + + /** Commit hash for the current release */ + public static final AttributeKey HEROKU_RELEASE_COMMIT = + stringKey("heroku.release.commit"); + + /** Time and date the release was created */ + public static final AttributeKey HEROKU_RELEASE_CREATION_TIMESTAMP = + stringKey("heroku.release.creation_timestamp"); + + /** + * The command used to run the container (i.e. the command name). * *

Notes: * *

    - *
  • See the log - * stream ARN format documentation. One log group can contain several log streams, so - * these ARNs necessarily identify both a log group and a log stream. + *
  • If using embedded credentials or sensitive data, it is recommended to remove them to + * prevent potential leakage. *
*/ - public static final AttributeKey> AWS_LOG_STREAM_ARNS = - stringArrayKey("aws.log.stream.arns"); + public static final AttributeKey CONTAINER_COMMAND = stringKey("container.command"); /** - * Container name used by container runtime. + * All the command arguments (including the command/executable itself) run by the container. [2] */ - public static final AttributeKey CONTAINER_NAME = stringKey("container.name"); + public static final AttributeKey> CONTAINER_COMMAND_ARGS = + stringArrayKey("container.command_args"); + + /** The full command run by the container as a single string representing the full command. [2] */ + public static final AttributeKey CONTAINER_COMMAND_LINE = + stringKey("container.command_line"); /** * Container ID. Usually a UUID, as for example used to CONTAINER_ID = stringKey("container.id"); /** - * The container runtime managing this container. + * Runtime specific image identifier. Usually a hash algorithm followed by a UUID. + * + *

Notes: + * + *

*/ - public static final AttributeKey CONTAINER_RUNTIME = stringKey("container.runtime"); + public static final AttributeKey CONTAINER_IMAGE_ID = stringKey("container.image.id"); + + /** Name of the image the container was built on. */ + public static final AttributeKey CONTAINER_IMAGE_NAME = stringKey("container.image.name"); /** - * Name of the image the container was built on. + * Repo digests of the container image as provided by the container runtime. + * + *

Notes: + * + *

    + *
  • Docker + * and CRI + * report those under the {@code RepoDigests} field. + *
*/ - public static final AttributeKey CONTAINER_IMAGE_NAME = stringKey("container.image.name"); + public static final AttributeKey> CONTAINER_IMAGE_REPO_DIGESTS = + stringArrayKey("container.image.repo_digests"); /** - * Container image tag. + * Container image tags. An example can be found in Docker Image + * Inspect. Should be only the {@code } section of the full name for example from {@code + * registry.example.com/my-org/my-image:}. */ - public static final AttributeKey CONTAINER_IMAGE_TAG = stringKey("container.image.tag"); + public static final AttributeKey> CONTAINER_IMAGE_TAGS = + stringArrayKey("container.image.tags"); + + /** Container name used by container runtime. */ + public static final AttributeKey CONTAINER_NAME = stringKey("container.name"); + + /** The container runtime managing this container. */ + public static final AttributeKey CONTAINER_RUNTIME = stringKey("container.runtime"); /** * Name of the deployment @@ -226,6 +413,19 @@ public final class ResourceAttributes { */ public static final AttributeKey DEVICE_ID = stringKey("device.id"); + /** + * The name of the device manufacturer + * + *

Notes: + * + *

+ */ + public static final AttributeKey DEVICE_MANUFACTURER = stringKey("device.manufacturer"); + /** * The model identifier for the device * @@ -252,58 +452,52 @@ public final class ResourceAttributes { public static final AttributeKey DEVICE_MODEL_NAME = stringKey("device.model.name"); /** - * The name of the device manufacturer + * The execution environment ID as a string, that will be potentially reused for other invocations + * to the same function/function version. * *

Notes: * *

    - *
  • The Android OS provides this field via Build. - * iOS apps SHOULD hardcode the value {@code Apple}. + *
  • AWS Lambda: Use the (full) log stream name. *
*/ - public static final AttributeKey DEVICE_MANUFACTURER = stringKey("device.manufacturer"); + public static final AttributeKey FAAS_INSTANCE = stringKey("faas.instance"); /** - * The name of the single function that this runtime instance executes. + * The amount of memory available to the serverless function converted to Bytes. * *

Notes: * *

    - *
  • 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 - * code.namespace}/{@code code.function} span attributes). + *
  • 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 + * {@code AWS_LAMBDA_FUNCTION_MEMORY_SIZE} provides this information (which must be + * multiplied by 1,048,576). *
*/ - public static final AttributeKey FAAS_NAME = stringKey("faas.name"); + public static final AttributeKey FAAS_MAX_MEMORY = longKey("faas.max_memory"); /** - * The unique ID of the single function that this runtime instance executes. + * The name of the single function that this runtime instance executes. * *

Notes: * *

    - *
  • Depending on the cloud provider, use: - *
  • AWS Lambda: The function ARN. - *
  • Take care not to use the "invoked ARN" directly but replace any alias - * suffix with the resolved function version, as the same runtime instance may be - * invokable with multiple different aliases. - *
  • GCP: The URI of the resource - *
  • Azure: The Fully - * Qualified Resource ID. - *
  • On some providers, it may not be possible to determine the full ID at startup, which is - * why this field cannot be made required. For example, on AWS the account ID part of the - * ARN is not available without calling another AWS API which may be deemed too slow for a - * short-running lambda function. As an alternative, consider setting {@code faas.id} as a - * span attribute instead. + *
  • 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 code.namespace}/{@code + * code.function} 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 {@code /}, 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 {@code cloud.resource_id} attribute). *
*/ - public static final AttributeKey FAAS_ID = stringKey("faas.id"); + public static final AttributeKey FAAS_NAME = stringKey("faas.name"); /** * The immutable version of the function being executed. @@ -315,7 +509,7 @@ public final class ResourceAttributes { *
  • AWS Lambda: The function * version (an integer represented as a decimal string). - *
  • Google Cloud Run: The Google Cloud Run (Services): The revision (i.e., the * function name plus the revision suffix). *
  • Google Cloud Functions: The value of the FAAS_VERSION = stringKey("faas.version"); + /** The CPU architecture the host system is running on. */ + public static final AttributeKey HOST_ARCH = stringKey("host.arch"); + /** - * The execution environment ID as a string, that will be potentially reused for other invocations - * to the same function/function version. - * - *

    Notes: - * - *

      - *
    • AWS Lambda: Use the (full) log stream name. - *
    + * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For + * non-containerized systems, this should be the {@code machine-id}. See the table below for the + * sources to use to determine the {@code machine-id} based on operating system. */ - public static final AttributeKey FAAS_INSTANCE = stringKey("faas.instance"); + public static final AttributeKey HOST_ID = stringKey("host.id"); + + /** VM image ID or host OS image ID. For Cloud, this value is from the provider. */ + public static final AttributeKey HOST_IMAGE_ID = stringKey("host.image.id"); + + /** Name of the VM image or OS install the host was instantiated from. */ + public static final AttributeKey HOST_IMAGE_NAME = stringKey("host.image.name"); + + /** + * The version string of the VM image or host OS as defined in
    Version Attributes. + */ + public static final AttributeKey HOST_IMAGE_VERSION = stringKey("host.image.version"); /** - * The amount of memory available to the serverless function in MiB. + * Available IP addresses of the host, excluding loopback interfaces. * *

    Notes: * *

      - *
    • 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 - * {@code AWS_LAMBDA_FUNCTION_MEMORY_SIZE} provides this information. + *
    • IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be + * specified in the RFC 5952 + * format. *
    */ - public static final AttributeKey FAAS_MAX_MEMORY = longKey("faas.max_memory"); - - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. - */ - public static final AttributeKey HOST_ID = stringKey("host.id"); + public static final AttributeKey> HOST_IP = stringArrayKey("host.ip"); /** * Name of the host. On Unix systems, it may contain what the hostname command returns, or the @@ -362,62 +561,83 @@ public final class ResourceAttributes { */ public static final AttributeKey HOST_NAME = stringKey("host.name"); - /** - * Type of host. For Cloud, this must be the machine type. - */ + /** Type of host. For Cloud, this must be the machine type. */ public static final AttributeKey HOST_TYPE = stringKey("host.type"); - /** - * The CPU architecture the host system is running on. - */ - public static final AttributeKey HOST_ARCH = stringKey("host.arch"); + /** The amount of level 2 memory cache available to the processor (in Bytes). */ + public static final AttributeKey HOST_CPU_CACHE_L2_SIZE = longKey("host.cpu.cache.l2.size"); - /** - * Name of the VM image or OS install the host was instantiated from. - */ - public static final AttributeKey HOST_IMAGE_NAME = stringKey("host.image.name"); + /** Numeric value specifying the family or generation of the CPU. */ + public static final AttributeKey HOST_CPU_FAMILY = longKey("host.cpu.family"); /** - * VM image ID. For Cloud, this value is from the provider. + * Model identifier. It provides more granular information about the CPU, distinguishing it from + * other CPUs within the same family. */ - public static final AttributeKey HOST_IMAGE_ID = stringKey("host.image.id"); + public static final AttributeKey HOST_CPU_MODEL_ID = longKey("host.cpu.model.id"); - /** - * The version string of the VM image as defined in Version - * Attributes. - */ - public static final AttributeKey HOST_IMAGE_VERSION = stringKey("host.image.version"); + /** Model designation of the processor. */ + public static final AttributeKey HOST_CPU_MODEL_NAME = stringKey("host.cpu.model.name"); + + /** Stepping or core revisions. */ + public static final AttributeKey HOST_CPU_STEPPING = longKey("host.cpu.stepping"); /** - * The name of the cluster. + * Processor manufacturer identifier. A maximum 12-character string. + * + *

    Notes: + * + *

      + *
    • 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. + *
    */ + public static final AttributeKey HOST_CPU_VENDOR_ID = stringKey("host.cpu.vendor.id"); + + /** The name of the cluster. */ public static final AttributeKey K8S_CLUSTER_NAME = stringKey("k8s.cluster.name"); /** - * The name of the Node. + * A pseudo-ID for the cluster, set to the UID of the {@code kube-system} namespace. + * + *

    Notes: + * + *

      + *
    • K8s does not have support for obtaining a cluster ID. If this is ever added, we will + * recommend collecting the {@code k8s.cluster.uid} through the official APIs. In the + * meantime, we are able to use the {@code uid} of the {@code 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 {@code kube-system} + * namespace is used by Kubernetes itself and will exist for the lifetime of the cluster. + * Using the {@code uid} of the {@code 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. 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. + *
    */ + public static final AttributeKey K8S_CLUSTER_UID = stringKey("k8s.cluster.uid"); + + /** The name of the Node. */ public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); - /** - * The UID of the Node. - */ + /** The UID of the Node. */ public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); - /** - * The name of the namespace that the pod is running in. - */ + /** The name of the namespace that the pod is running in. */ public static final AttributeKey K8S_NAMESPACE_NAME = stringKey("k8s.namespace.name"); - /** - * The UID of the Pod. - */ - public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); - - /** - * The name of the Pod. - */ + /** The name of the Pod. */ public static final AttributeKey K8S_POD_NAME = stringKey("k8s.pod.name"); + /** The UID of the Pod. */ + public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); + /** * The name of the Container from Pod specification, must be unique within a Pod. Container * runtime usually uses different globally unique name ({@code container.name}). @@ -431,70 +651,61 @@ public final class ResourceAttributes { public static final AttributeKey K8S_CONTAINER_RESTART_COUNT = longKey("k8s.container.restart_count"); - /** - * The UID of the ReplicaSet. - */ + /** The name of the ReplicaSet. */ + public static final AttributeKey K8S_REPLICASET_NAME = stringKey("k8s.replicaset.name"); + + /** The UID of the ReplicaSet. */ public static final AttributeKey K8S_REPLICASET_UID = stringKey("k8s.replicaset.uid"); - /** - * The name of the ReplicaSet. - */ - public static final AttributeKey K8S_REPLICASET_NAME = stringKey("k8s.replicaset.name"); + /** The name of the Deployment. */ + public static final AttributeKey K8S_DEPLOYMENT_NAME = stringKey("k8s.deployment.name"); - /** - * The UID of the Deployment. - */ + /** The UID of the Deployment. */ public static final AttributeKey K8S_DEPLOYMENT_UID = stringKey("k8s.deployment.uid"); - /** - * The name of the Deployment. - */ - public static final AttributeKey K8S_DEPLOYMENT_NAME = stringKey("k8s.deployment.name"); + /** The name of the StatefulSet. */ + public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); - /** - * The UID of the StatefulSet. - */ + /** The UID of the StatefulSet. */ public static final AttributeKey K8S_STATEFULSET_UID = stringKey("k8s.statefulset.uid"); - /** - * The name of the StatefulSet. - */ - public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); + /** The name of the DaemonSet. */ + public static final AttributeKey K8S_DAEMONSET_NAME = stringKey("k8s.daemonset.name"); - /** - * The UID of the DaemonSet. - */ + /** The UID of the DaemonSet. */ public static final AttributeKey K8S_DAEMONSET_UID = stringKey("k8s.daemonset.uid"); - /** - * The name of the DaemonSet. - */ - public static final AttributeKey K8S_DAEMONSET_NAME = stringKey("k8s.daemonset.name"); + /** The name of the Job. */ + public static final AttributeKey K8S_JOB_NAME = stringKey("k8s.job.name"); - /** - * The UID of the Job. - */ + /** The UID of the Job. */ public static final AttributeKey K8S_JOB_UID = stringKey("k8s.job.uid"); - /** - * The name of the Job. - */ - public static final AttributeKey K8S_JOB_NAME = stringKey("k8s.job.name"); + /** The name of the CronJob. */ + public static final AttributeKey K8S_CRONJOB_NAME = stringKey("k8s.cronjob.name"); - /** - * The UID of the CronJob. - */ + /** The UID of the CronJob. */ public static final AttributeKey K8S_CRONJOB_UID = stringKey("k8s.cronjob.uid"); /** - * The name of the CronJob. + * The digest of the OCI image manifest. For container images specifically is the digest by which + * the container image is known. + * + *

    Notes: + * + *

    */ - public static final AttributeKey K8S_CRONJOB_NAME = stringKey("k8s.cronjob.name"); + public static final AttributeKey OCI_MANIFEST_DIGEST = stringKey("oci.manifest.digest"); - /** - * The operating system type. - */ - public static final AttributeKey OS_TYPE = stringKey("os.type"); + /** Unique identifier for a particular build or compilation of the operating system. */ + public static final AttributeKey OS_BUILD_ID = stringKey("os.build_id"); /** * Human readable (not intended to be parsed) OS version information, like e.g. reported by {@code @@ -502,21 +713,40 @@ public final class ResourceAttributes { */ public static final AttributeKey OS_DESCRIPTION = stringKey("os.description"); - /** - * Human readable operating system name. - */ + /** Human readable operating system name. */ public static final AttributeKey OS_NAME = stringKey("os.name"); + /** The operating system type. */ + public static final AttributeKey OS_TYPE = stringKey("os.type"); + /** * The version string of the operating system as defined in Version Attributes. + * href="/docs/resource/README.md#version-attributes">Version Attributes. */ public static final AttributeKey OS_VERSION = stringKey("os.version"); /** - * Process identifier (PID). + * The command used to launch the process (i.e. the command name). On Linux based systems, can be + * set to the zeroth string in {@code proc/[pid]/cmdline}. On Windows, can be set to the first + * parameter extracted from {@code GetCommandLineW}. */ - public static final AttributeKey PROCESS_PID = longKey("process.pid"); + public static final AttributeKey PROCESS_COMMAND = stringKey("process.command"); + + /** + * 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 {@code proc/[pid]/cmdline}. For libc-based + * executables, this would be the full argv vector passed to {@code main}. + */ + public static final AttributeKey> PROCESS_COMMAND_ARGS = + stringArrayKey("process.command_args"); + + /** + * 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 {@code GetCommandLineW}. Do not set this if you have to + * assemble it just for monitoring; use {@code process.command_args} instead. + */ + public static final AttributeKey PROCESS_COMMAND_LINE = stringKey("process.command_line"); /** * The name of the process executable. On Linux based systems, can be set to the {@code Name} in @@ -534,33 +764,21 @@ public final class ResourceAttributes { public static final AttributeKey PROCESS_EXECUTABLE_PATH = stringKey("process.executable.path"); - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be - * set to the zeroth string in {@code proc/[pid]/cmdline}. On Windows, can be set to the first - * parameter extracted from {@code GetCommandLineW}. - */ - public static final AttributeKey PROCESS_COMMAND = stringKey("process.command"); + /** The username of the user that owns the process. */ + public static final AttributeKey PROCESS_OWNER = stringKey("process.owner"); - /** - * 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 {@code GetCommandLineW}. Do not set this if you have to - * assemble it just for monitoring; use {@code process.command_args} instead. - */ - public static final AttributeKey PROCESS_COMMAND_LINE = stringKey("process.command_line"); + /** Parent Process identifier (PID). */ + public static final AttributeKey PROCESS_PARENT_PID = longKey("process.parent_pid"); - /** - * 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 {@code proc/[pid]/cmdline}. For libc-based - * executables, this would be the full argv vector passed to {@code main}. - */ - public static final AttributeKey> PROCESS_COMMAND_ARGS = - stringArrayKey("process.command_args"); + /** Process identifier (PID). */ + public static final AttributeKey PROCESS_PID = longKey("process.pid"); /** - * The username of the user that owns the process. + * An additional description about the runtime of the process, for example a specific vendor + * customization of the runtime environment. */ - public static final AttributeKey PROCESS_OWNER = stringKey("process.owner"); + public static final AttributeKey PROCESS_RUNTIME_DESCRIPTION = + stringKey("process.runtime.description"); /** * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name @@ -574,13 +792,6 @@ public final class ResourceAttributes { public static final AttributeKey PROCESS_RUNTIME_VERSION = stringKey("process.runtime.version"); - /** - * An additional description about the runtime of the process, for example a specific vendor - * customization of the runtime environment. - */ - public static final AttributeKey PROCESS_RUNTIME_DESCRIPTION = - stringKey("process.runtime.description"); - /** * Logical name of the service. * @@ -597,20 +808,10 @@ public final class ResourceAttributes { public static final AttributeKey SERVICE_NAME = stringKey("service.name"); /** - * A namespace for {@code service.name}. - * - *

    Notes: - * - *

      - *
    • 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. {@code service.name} is expected to - * be unique within the same namespace. If {@code service.namespace} is not specified in the - * Resource then {@code 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. - *
    + * The version string of the service API or implementation. The format is not defined by these + * conventions. */ - public static final AttributeKey SERVICE_NAMESPACE = stringKey("service.namespace"); + public static final AttributeKey SERVICE_VERSION = stringKey("service.version"); /** * The string ID of the service instance. @@ -633,370 +834,396 @@ public final class ResourceAttributes { public static final AttributeKey SERVICE_INSTANCE_ID = stringKey("service.instance.id"); /** - * The version string of the service API or implementation. - */ - public static final AttributeKey SERVICE_VERSION = stringKey("service.version"); - - /** - * The name of the telemetry SDK as defined above. + * A namespace for {@code service.name}. + * + *

    Notes: + * + *

      + *
    • 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. {@code service.name} is expected to + * be unique within the same namespace. If {@code service.namespace} is not specified in the + * Resource then {@code 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. + *
    */ - public static final AttributeKey TELEMETRY_SDK_NAME = stringKey("telemetry.sdk.name"); + public static final AttributeKey SERVICE_NAMESPACE = stringKey("service.namespace"); - /** - * The language of the telemetry SDK. - */ + /** The language of the telemetry SDK. */ public static final AttributeKey TELEMETRY_SDK_LANGUAGE = stringKey("telemetry.sdk.language"); /** - * The version string of the telemetry SDK. + * The name of the telemetry SDK as defined above. + * + *

    Notes: + * + *

      + *
    • The OpenTelemetry SDK MUST set the {@code telemetry.sdk.name} attribute to {@code + * opentelemetry}. If another SDK, like a fork or a vendor-provided implementation, is used, + * this SDK MUST set the {@code 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 {@code opentelemetry} is reserved and MUST NOT be used in + * this case. All custom identifiers SHOULD be stable across different versions of an + * implementation. + *
    */ + public static final AttributeKey TELEMETRY_SDK_NAME = stringKey("telemetry.sdk.name"); + + /** The version string of the telemetry SDK. */ public static final AttributeKey TELEMETRY_SDK_VERSION = stringKey("telemetry.sdk.version"); /** - * The version string of the auto instrumentation agent, if used. - */ - public static final AttributeKey TELEMETRY_AUTO_VERSION = - stringKey("telemetry.auto.version"); - - /** - * The name of the web engine. + * The name of the auto instrumentation agent or distribution, if used. + * + *

    Notes: + * + *

      + *
    • Official auto instrumentation agents and distributions SHOULD set the {@code + * telemetry.distro.name} attribute to a string starting with {@code opentelemetry-}, e.g. + * {@code opentelemetry-java-instrumentation}. + *
    */ - public static final AttributeKey WEBENGINE_NAME = stringKey("webengine.name"); + public static final AttributeKey TELEMETRY_DISTRO_NAME = + stringKey("telemetry.distro.name"); - /** - * The version of the web engine. - */ - public static final AttributeKey WEBENGINE_VERSION = stringKey("webengine.version"); + /** The version string of the auto instrumentation agent or distribution, if used. */ + public static final AttributeKey TELEMETRY_DISTRO_VERSION = + stringKey("telemetry.distro.version"); - /** - * Additional description of the web engine (e.g. detailed version and edition information). - */ + /** Additional description of the web engine (e.g. detailed version and edition information). */ public static final AttributeKey WEBENGINE_DESCRIPTION = stringKey("webengine.description"); - // Enum definitions - public static final class CloudProviderValues { - /** - * Alibaba Cloud. - */ - public static final String ALIBABA_CLOUD = "alibaba_cloud"; + /** The name of the web engine. */ + public static final AttributeKey WEBENGINE_NAME = stringKey("webengine.name"); - /** - * Amazon Web Services. - */ - public static final String AWS = "aws"; + /** The version of the web engine. */ + public static final AttributeKey WEBENGINE_VERSION = stringKey("webengine.version"); - /** - * Microsoft Azure. - */ - public static final String AZURE = "azure"; + /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ + public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); - /** - * Google Cloud Platform. - */ - public static final String GCP = "gcp"; + /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ + public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); - /** - * Tencent Cloud. - */ - public static final String TENCENT_CLOUD = "tencent_cloud"; + /** + * Deprecated, use the {@code otel.scope.name} attribute. + * + * @deprecated Deprecated, use the `otel.scope.name` attribute. + */ + @Deprecated + public static final AttributeKey OTEL_LIBRARY_NAME = stringKey("otel.library.name"); - private CloudProviderValues() { - } - } + /** + * Deprecated, use the {@code otel.scope.version} attribute. + * + * @deprecated Deprecated, use the `otel.scope.version` attribute. + */ + @Deprecated + public static final AttributeKey OTEL_LIBRARY_VERSION = stringKey("otel.library.version"); + // Enum definitions public static final class CloudPlatformValues { - /** - * Alibaba Cloud Elastic Compute Service. - */ + /** Alibaba Cloud Elastic Compute Service. */ public static final String ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs"; - /** - * Alibaba Cloud Function Compute. - */ + /** Alibaba Cloud Function Compute. */ public static final String ALIBABA_CLOUD_FC = "alibaba_cloud_fc"; - /** - * AWS Elastic Compute Cloud. - */ + /** Red Hat OpenShift on Alibaba Cloud. */ + public static final String ALIBABA_CLOUD_OPENSHIFT = "alibaba_cloud_openshift"; + + /** AWS Elastic Compute Cloud. */ public static final String AWS_EC2 = "aws_ec2"; - /** - * AWS Elastic Container Service. - */ + /** AWS Elastic Container Service. */ public static final String AWS_ECS = "aws_ecs"; - /** - * AWS Elastic Kubernetes Service. - */ + /** AWS Elastic Kubernetes Service. */ public static final String AWS_EKS = "aws_eks"; - /** - * AWS Lambda. - */ + /** AWS Lambda. */ public static final String AWS_LAMBDA = "aws_lambda"; - /** - * AWS Elastic Beanstalk. - */ + /** AWS Elastic Beanstalk. */ public static final String AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk"; - /** - * AWS App Runner. - */ + /** AWS App Runner. */ public static final String AWS_APP_RUNNER = "aws_app_runner"; - /** - * Azure Virtual Machines. - */ + /** Red Hat OpenShift on AWS (ROSA). */ + public static final String AWS_OPENSHIFT = "aws_openshift"; + + /** Azure Virtual Machines. */ public static final String AZURE_VM = "azure_vm"; - /** - * Azure Container Instances. - */ + /** Azure Container Instances. */ public static final String AZURE_CONTAINER_INSTANCES = "azure_container_instances"; - /** - * Azure Kubernetes Service. - */ + /** Azure Kubernetes Service. */ public static final String AZURE_AKS = "azure_aks"; - /** - * Azure Functions. - */ + /** Azure Functions. */ public static final String AZURE_FUNCTIONS = "azure_functions"; - /** - * Azure App Service. - */ + /** Azure App Service. */ public static final String AZURE_APP_SERVICE = "azure_app_service"; - /** - * Google Cloud Compute Engine (GCE). - */ + /** Azure Red Hat OpenShift. */ + public static final String AZURE_OPENSHIFT = "azure_openshift"; + + /** Google Bare Metal Solution (BMS). */ + public static final String GCP_BARE_METAL_SOLUTION = "gcp_bare_metal_solution"; + + /** Google Cloud Compute Engine (GCE). */ public static final String GCP_COMPUTE_ENGINE = "gcp_compute_engine"; - /** - * Google Cloud Run. - */ + /** Google Cloud Run. */ public static final String GCP_CLOUD_RUN = "gcp_cloud_run"; - /** - * Google Cloud Kubernetes Engine (GKE). - */ + /** Google Cloud Kubernetes Engine (GKE). */ public static final String GCP_KUBERNETES_ENGINE = "gcp_kubernetes_engine"; - /** - * Google Cloud Functions (GCF). - */ + /** Google Cloud Functions (GCF). */ public static final String GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions"; - /** - * Google Cloud App Engine (GAE). - */ + /** Google Cloud App Engine (GAE). */ public static final String GCP_APP_ENGINE = "gcp_app_engine"; - /** - * Tencent Cloud Cloud Virtual Machine (CVM). - */ + /** Red Hat OpenShift on Google Cloud. */ + public static final String GCP_OPENSHIFT = "gcp_openshift"; + + /** Red Hat OpenShift on IBM Cloud. */ + public static final String IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift"; + + /** Tencent Cloud Cloud Virtual Machine (CVM). */ public static final String TENCENT_CLOUD_CVM = "tencent_cloud_cvm"; - /** - * Tencent Cloud Elastic Kubernetes Service (EKS). - */ + /** Tencent Cloud Elastic Kubernetes Service (EKS). */ public static final String TENCENT_CLOUD_EKS = "tencent_cloud_eks"; - /** - * Tencent Cloud Serverless Cloud Function (SCF). - */ + /** Tencent Cloud Serverless Cloud Function (SCF). */ public static final String TENCENT_CLOUD_SCF = "tencent_cloud_scf"; - private CloudPlatformValues() { - } + private CloudPlatformValues() {} + } + + public static final class CloudProviderValues { + /** Alibaba Cloud. */ + public static final String ALIBABA_CLOUD = "alibaba_cloud"; + + /** Amazon Web Services. */ + public static final String AWS = "aws"; + + /** Microsoft Azure. */ + public static final String AZURE = "azure"; + + /** Google Cloud Platform. */ + public static final String GCP = "gcp"; + + /** Heroku Platform as a Service. */ + public static final String HEROKU = "heroku"; + + /** IBM Cloud. */ + public static final String IBM_CLOUD = "ibm_cloud"; + + /** Tencent Cloud. */ + public static final String TENCENT_CLOUD = "tencent_cloud"; + + private CloudProviderValues() {} } public static final class AwsEcsLaunchtypeValues { - /** - * ec2. - */ + /** ec2. */ public static final String EC2 = "ec2"; - /** - * fargate. - */ + /** fargate. */ public static final String FARGATE = "fargate"; - private AwsEcsLaunchtypeValues() { - } + private AwsEcsLaunchtypeValues() {} } public static final class HostArchValues { - /** - * AMD64. - */ + /** AMD64. */ public static final String AMD64 = "amd64"; - /** - * ARM32. - */ + /** ARM32. */ public static final String ARM32 = "arm32"; - /** - * ARM64. - */ + /** ARM64. */ public static final String ARM64 = "arm64"; - /** - * Itanium. - */ + /** Itanium. */ public static final String IA64 = "ia64"; - /** - * 32-bit PowerPC. - */ + /** 32-bit PowerPC. */ public static final String PPC32 = "ppc32"; - /** - * 64-bit PowerPC. - */ + /** 64-bit PowerPC. */ public static final String PPC64 = "ppc64"; - /** - * IBM z/Architecture. - */ + /** IBM z/Architecture. */ public static final String S390X = "s390x"; - /** - * 32-bit x86. - */ + /** 32-bit x86. */ public static final String X86 = "x86"; - private HostArchValues() { - } + private HostArchValues() {} } public static final class OsTypeValues { - /** - * Microsoft Windows. - */ + /** Microsoft Windows. */ public static final String WINDOWS = "windows"; - /** - * Linux. - */ + /** Linux. */ public static final String LINUX = "linux"; - /** - * Apple Darwin. - */ + /** Apple Darwin. */ public static final String DARWIN = "darwin"; - /** - * FreeBSD. - */ + /** FreeBSD. */ public static final String FREEBSD = "freebsd"; - /** - * NetBSD. - */ + /** NetBSD. */ public static final String NETBSD = "netbsd"; - /** - * OpenBSD. - */ + /** OpenBSD. */ public static final String OPENBSD = "openbsd"; - /** - * DragonFly BSD. - */ + /** DragonFly BSD. */ public static final String DRAGONFLYBSD = "dragonflybsd"; - /** - * HP-UX (Hewlett Packard Unix). - */ + /** HP-UX (Hewlett Packard Unix). */ public static final String HPUX = "hpux"; - /** - * AIX (Advanced Interactive eXecutive). - */ + /** AIX (Advanced Interactive eXecutive). */ public static final String AIX = "aix"; - /** - * Oracle Solaris. - */ + /** SunOS, Oracle Solaris. */ public static final String SOLARIS = "solaris"; - /** - * IBM z/OS. - */ + /** IBM z/OS. */ public static final String Z_OS = "z_os"; - private OsTypeValues() { - } + private OsTypeValues() {} } public static final class TelemetrySdkLanguageValues { - /** - * cpp. - */ + /** cpp. */ public static final String CPP = "cpp"; - /** - * dotnet. - */ + /** dotnet. */ public static final String DOTNET = "dotnet"; - /** - * erlang. - */ + /** erlang. */ public static final String ERLANG = "erlang"; - /** - * go. - */ + /** go. */ public static final String GO = "go"; - /** - * java. - */ + /** java. */ public static final String JAVA = "java"; - /** - * nodejs. - */ + /** nodejs. */ public static final String NODEJS = "nodejs"; - /** - * php. - */ + /** php. */ public static final String PHP = "php"; - /** - * python. - */ + /** python. */ public static final String PYTHON = "python"; - /** - * ruby. - */ + /** ruby. */ public static final String RUBY = "ruby"; - /** - * webjs. - */ - public static final String WEBJS = "webjs"; + /** rust. */ + public static final String RUST = "rust"; - /** - * swift. - */ + /** swift. */ public static final String SWIFT = "swift"; - private TelemetrySdkLanguageValues() { - } - } + /** webjs. */ + public static final String WEBJS = "webjs"; - private ResourceAttributes() { + private TelemetrySdkLanguageValues() {} } + + /** + * Red Hat OpenShift on Google Cloud. + * + * @deprecated This item has been removed as of 1.18.0 of the semantic conventions. Use {@link + * ResourceAttributes#GCP_OPENSHIFT} instead. + */ + @Deprecated public static final String GCP_OPENSHIFT = "gcp_openshift"; + + /** + * Full user-agent string provided by the browser + * + *

    Notes: + * + *

      + *
    • The user-agent value SHOULD be provided only from browsers that do not have a mechanism + * to retrieve brands and platform individually from the User-Agent Client Hints API. To + * retrieve the value, the legacy {@code navigator.userAgent} API can be used. + *
    + * + * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use + * {@link SemanticAttributes#USER_AGENT_ORIGINAL} instead. + */ + @Deprecated + public static final AttributeKey BROWSER_USER_AGENT = stringKey("browser.user_agent"); + + /** + * The unique ID of the single function that this runtime instance executes. + * + *

    Notes: + * + *

      + *
    • On some cloud providers, it may not be possible to determine the full ID at startup, so + * consider setting {@code faas.id} as a span attribute instead. + *
    • The exact value to use for {@code faas.id} depends on the cloud provider: + *
    • AWS Lambda: The function ARN. + * Take care not to use the "invoked ARN" directly but replace any alias + * suffix with the resolved function version, as the same runtime instance may be + * invokable with multiple different aliases. + *
    • GCP: The URI of the resource + *
    • Azure: The Fully + * Qualified Resource ID of the invoked function, not the function app, having + * the form {@code + * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. + * This means that a span attribute MUST be used, as an Azure function app can host multiple + * functions that would usually share a TracerProvider. + *
    + * + * @deprecated This item has been removed in 1.19.0 version of the semantic conventions. Use + * {@link ResourceAttributes#CLOUD_RESOURCE_ID} instead. + */ + @Deprecated public static final AttributeKey FAAS_ID = stringKey("faas.id"); + + /** + * The version string of the auto instrumentation agent, if used. + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * ResourceAttributes#TELEMETRY_DISTRO_VERSION} instead. + */ + @Deprecated + public static final AttributeKey TELEMETRY_AUTO_VERSION = + stringKey("telemetry.auto.version"); + + /** + * Container image tag. + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * ResourceAttributes#CONTAINER_IMAGE_TAGS} instead. + */ + @Deprecated + public static final AttributeKey CONTAINER_IMAGE_TAG = stringKey("container.image.tag"); + + private ResourceAttributes() {} } diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java index ded4d8170c1c5..78dd075565cfd 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java @@ -19,288 +19,301 @@ import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; -// this is a copy of io.opentelemetry.semconv.trace.attributes.SemanticAttributes +// this is a copy of io.opentelemetry.semconv.SemanticAttributes // because the module that contains that class is not stable, // so don't want to take a dependency on it @SuppressWarnings("unused") public final class SemanticAttributes { /** The URL of the OpenTelemetry schema for these keys and values. */ - public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.21.0"; + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.22.0"; /** - * Client address - unix domain socket name, IPv4 or IPv6 address. + * Client address - domain name if available without reverse DNS lookup, otherwise IP address or + * Unix domain socket name. * *

    Notes: * *

      *
    • When observed from the server side, and when communicating through an intermediary, - * {@code client.address} SHOULD represent client address behind any intermediaries (e.g. - * proxies) if it's available. + * {@code client.address} SHOULD represent the client address behind any intermediaries + * (e.g. proxies) if it's available. *
    */ public static final AttributeKey CLIENT_ADDRESS = stringKey("client.address"); /** - * Client port number + * Client port number. * *

    Notes: * *

      *
    • When observed from the server side, and when communicating through an intermediary, - * {@code client.port} SHOULD represent client port behind any intermediaries (e.g. proxies) - * if it's available. + * {@code client.port} SHOULD represent the client port behind any intermediaries (e.g. + * proxies) if it's available. *
    */ public static final AttributeKey CLIENT_PORT = longKey("client.port"); - /** Immediate client peer address - unix domain socket name, IPv4 or IPv6 address. */ - public static final AttributeKey CLIENT_SOCKET_ADDRESS = - stringKey("client.socket.address"); - - /** Immediate client peer port number */ - public static final AttributeKey CLIENT_SOCKET_PORT = longKey("client.socket.port"); - /** - * Deprecated, use {@code http.request.method} instead. + * Deprecated, use {@code server.address}. * - * @deprecated Deprecated, use `http.request.method` instead. + * @deprecated Deprecated, use `server.address`. */ - @Deprecated public static final AttributeKey HTTP_METHOD = stringKey("http.method"); + @Deprecated public static final AttributeKey NET_HOST_NAME = stringKey("net.host.name"); /** - * Deprecated, use {@code http.response.status_code} instead. + * Deprecated, use {@code server.port}. * - * @deprecated Deprecated, use `http.response.status_code` instead. + * @deprecated Deprecated, use `server.port`. */ - @Deprecated public static final AttributeKey HTTP_STATUS_CODE = longKey("http.status_code"); + @Deprecated public static final AttributeKey NET_HOST_PORT = longKey("net.host.port"); /** - * Deprecated, use {@code url.scheme} instead. + * Deprecated, use {@code server.address} on client spans and {@code client.address} on server + * spans. * - * @deprecated Deprecated, use `url.scheme` instead. + * @deprecated Deprecated, use `server.address` on client spans and `client.address` on server + * spans. */ - @Deprecated public static final AttributeKey HTTP_SCHEME = stringKey("http.scheme"); + @Deprecated public static final AttributeKey NET_PEER_NAME = stringKey("net.peer.name"); /** - * Deprecated, use {@code url.full} instead. + * Deprecated, use {@code server.port} on client spans and {@code client.port} on server spans. * - * @deprecated Deprecated, use `url.full` instead. + * @deprecated Deprecated, use `server.port` on client spans and `client.port` on server spans. */ - @Deprecated public static final AttributeKey HTTP_URL = stringKey("http.url"); + @Deprecated public static final AttributeKey NET_PEER_PORT = longKey("net.peer.port"); /** - * Deprecated, use {@code url.path} and {@code url.query} instead. + * Deprecated, use {@code network.protocol.name}. * - * @deprecated Deprecated, use `url.path` and `url.query` instead. + * @deprecated Deprecated, use `network.protocol.name`. */ - @Deprecated public static final AttributeKey HTTP_TARGET = stringKey("http.target"); + @Deprecated + public static final AttributeKey NET_PROTOCOL_NAME = stringKey("net.protocol.name"); /** - * Deprecated, use {@code http.request.body.size} instead. + * Deprecated, use {@code network.protocol.version}. * - * @deprecated Deprecated, use `http.request.body.size` instead. + * @deprecated Deprecated, use `network.protocol.version`. */ @Deprecated - public static final AttributeKey HTTP_REQUEST_CONTENT_LENGTH = - longKey("http.request_content_length"); + public static final AttributeKey NET_PROTOCOL_VERSION = stringKey("net.protocol.version"); /** - * Deprecated, use {@code http.response.body.size} instead. + * Deprecated, use {@code network.transport} and {@code network.type}. * - * @deprecated Deprecated, use `http.response.body.size` instead. + * @deprecated Deprecated, use `network.transport` and `network.type`. */ @Deprecated - public static final AttributeKey HTTP_RESPONSE_CONTENT_LENGTH = - longKey("http.response_content_length"); + public static final AttributeKey NET_SOCK_FAMILY = stringKey("net.sock.family"); /** - * Deprecated, use {@code server.socket.domain} on client spans. + * Deprecated, use {@code network.local.address}. * - * @deprecated Deprecated, use `server.socket.domain` on client spans. + * @deprecated Deprecated, use `network.local.address`. */ @Deprecated - public static final AttributeKey NET_SOCK_PEER_NAME = stringKey("net.sock.peer.name"); + public static final AttributeKey NET_SOCK_HOST_ADDR = stringKey("net.sock.host.addr"); /** - * Deprecated, use {@code server.socket.address} on client spans and {@code client.socket.address} - * on server spans. + * Deprecated, use {@code network.local.port}. * - * @deprecated Deprecated, use `server.socket.address` on client spans and `client.socket.address` - * on server spans. + * @deprecated Deprecated, use `network.local.port`. */ @Deprecated - public static final AttributeKey NET_SOCK_PEER_ADDR = stringKey("net.sock.peer.addr"); + public static final AttributeKey NET_SOCK_HOST_PORT = longKey("net.sock.host.port"); /** - * Deprecated, use {@code server.socket.port} on client spans and {@code client.socket.port} on - * server spans. + * Deprecated, use {@code network.peer.address}. * - * @deprecated Deprecated, use `server.socket.port` on client spans and `client.socket.port` on - * server spans. + * @deprecated Deprecated, use `network.peer.address`. */ @Deprecated - public static final AttributeKey NET_SOCK_PEER_PORT = longKey("net.sock.peer.port"); + public static final AttributeKey NET_SOCK_PEER_ADDR = stringKey("net.sock.peer.addr"); /** - * Deprecated, use {@code server.address} on client spans and {@code client.address} on server - * spans. + * Deprecated, no replacement at this time. * - * @deprecated Deprecated, use `server.address` on client spans and `client.address` on server - * spans. + * @deprecated Deprecated, no replacement at this time. */ - @Deprecated public static final AttributeKey NET_PEER_NAME = stringKey("net.peer.name"); + @Deprecated + public static final AttributeKey NET_SOCK_PEER_NAME = stringKey("net.sock.peer.name"); /** - * Deprecated, use {@code server.port} on client spans and {@code client.port} on server spans. + * Deprecated, use {@code network.peer.port}. * - * @deprecated Deprecated, use `server.port` on client spans and `client.port` on server spans. + * @deprecated Deprecated, use `network.peer.port`. */ - @Deprecated public static final AttributeKey NET_PEER_PORT = longKey("net.peer.port"); + @Deprecated + public static final AttributeKey NET_SOCK_PEER_PORT = longKey("net.sock.peer.port"); /** - * Deprecated, use {@code server.address}. + * Deprecated, use {@code network.transport}. * - * @deprecated Deprecated, use `server.address`. + * @deprecated Deprecated, use `network.transport`. */ - @Deprecated public static final AttributeKey NET_HOST_NAME = stringKey("net.host.name"); + @Deprecated public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); /** - * Deprecated, use {@code server.port}. + * Destination address - domain name if available without reverse DNS lookup, otherwise IP address + * or Unix domain socket name. * - * @deprecated Deprecated, use `server.port`. - */ - @Deprecated public static final AttributeKey NET_HOST_PORT = longKey("net.host.port"); - - /** - * Deprecated, use {@code server.socket.address}. + *

    Notes: * - * @deprecated Deprecated, use `server.socket.address`. + *

      + *
    • When observed from the source side, and when communicating through an intermediary, + * {@code destination.address} SHOULD represent the destination address behind any + * intermediaries (e.g. proxies) if it's available. + *
    */ - @Deprecated - public static final AttributeKey NET_SOCK_HOST_ADDR = stringKey("net.sock.host.addr"); + public static final AttributeKey DESTINATION_ADDRESS = stringKey("destination.address"); + + /** Destination port number */ + public static final AttributeKey DESTINATION_PORT = longKey("destination.port"); /** - * Deprecated, use {@code server.socket.port}. + * Describes a class of error the operation ended with. * - * @deprecated Deprecated, use `server.socket.port`. + *

    Notes: + * + *

      + *
    • The {@code error.type} SHOULD be predictable and SHOULD have low cardinality. + * Instrumentations SHOULD document the list of errors they report. + *
    • The cardinality of {@code error.type} within one instrumentation library SHOULD be low, + * but telemetry consumers that aggregate data from multiple instrumentation libraries and + * applications should be prepared for {@code error.type} to have high cardinality at query + * time, when no additional filters are applied. + *
    • If the operation has completed successfully, instrumentations SHOULD NOT set {@code + * error.type}. + *
    • If a specific domain defines its own set of error codes (such as HTTP or gRPC status + * codes), it's RECOMMENDED to use a domain-specific attribute and also set {@code + * error.type} to capture all errors, regardless of whether they are defined within the + * domain-specific set or not. + *
    */ - @Deprecated - public static final AttributeKey NET_SOCK_HOST_PORT = longKey("net.sock.host.port"); + public static final AttributeKey ERROR_TYPE = stringKey("error.type"); + + /** The exception message. */ + public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); /** - * Deprecated, use {@code network.transport}. - * - * @deprecated Deprecated, use `network.transport`. + * A stacktrace as a string in the natural representation for the language runtime. The + * representation is to be determined and documented by each language SIG. */ - @Deprecated public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); + public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); /** - * Deprecated, use {@code network.protocol.name}. - * - * @deprecated Deprecated, use `network.protocol.name`. + * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of + * the exception should be preferred over the static type in languages that support it. */ - @Deprecated - public static final AttributeKey NET_PROTOCOL_NAME = stringKey("net.protocol.name"); + public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); /** - * Deprecated, use {@code network.protocol.version}. + * The name of the invoked function. * - * @deprecated Deprecated, use `network.protocol.version`. + *

    Notes: + * + *

      + *
    • SHOULD be equal to the {@code faas.name} resource attribute of the invoked function. + *
    */ - @Deprecated - public static final AttributeKey NET_PROTOCOL_VERSION = stringKey("net.protocol.version"); + public static final AttributeKey FAAS_INVOKED_NAME = stringKey("faas.invoked_name"); /** - * Deprecated, use {@code network.transport} and {@code network.type}. + * The cloud provider of the invoked function. * - * @deprecated Deprecated, use `network.transport` and `network.type`. + *

    Notes: + * + *

      + *
    • SHOULD be equal to the {@code cloud.provider} resource attribute of the invoked function. + *
    */ - @Deprecated - public static final AttributeKey NET_SOCK_FAMILY = stringKey("net.sock.family"); + public static final AttributeKey FAAS_INVOKED_PROVIDER = + stringKey("faas.invoked_provider"); /** - * The domain name of the destination system. + * The cloud region of the invoked function. * *

    Notes: * *

      - *
    • This value may be a host name, a fully qualified domain name, or another host naming - * format. + *
    • SHOULD be equal to the {@code cloud.region} resource attribute of the invoked function. *
    */ - public static final AttributeKey DESTINATION_DOMAIN = stringKey("destination.domain"); + public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region"); - /** Peer address, for example IP address or UNIX socket name. */ - public static final AttributeKey DESTINATION_ADDRESS = stringKey("destination.address"); + /** Type of the trigger which caused this function invocation. */ + public static final AttributeKey FAAS_TRIGGER = stringKey("faas.trigger"); - /** Peer port number */ - public static final AttributeKey DESTINATION_PORT = longKey("destination.port"); + /** + * The {@code service.name} of the remote service. + * SHOULD be equal to the actual {@code service.name} resource attribute of the remote service if + * any. + */ + public static final AttributeKey PEER_SERVICE = stringKey("peer.service"); /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of - * the exception should be preferred over the static type in languages that support it. + * Username or client_id extracted from the access token or Authorization header in the inbound + * request from outside the system. */ - public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); + public static final AttributeKey ENDUSER_ID = stringKey("enduser.id"); - /** The exception message. */ - public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); + /** + * Actual/assumed role the client is making the request under extracted from token or application + * security context. + */ + public static final AttributeKey ENDUSER_ROLE = stringKey("enduser.role"); /** - * A stacktrace as a string in the natural representation for the language runtime. The - * representation is to be determined and documented by each language SIG. + * Scopes or granted authorities the client currently possesses extracted from token or + * application security context. The value would come from the scope associated with an OAuth 2.0 Access Token or an + * attribute value in a SAML + * 2.0 Assertion. */ - public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); + public static final AttributeKey ENDUSER_SCOPE = stringKey("enduser.scope"); + + /** Whether the thread is daemon or not. */ + public static final AttributeKey THREAD_DAEMON = booleanKey("thread.daemon"); + + /** Current "managed" thread ID (as opposed to OS thread ID). */ + public static final AttributeKey THREAD_ID = longKey("thread.id"); + + /** Current thread name. */ + public static final AttributeKey THREAD_NAME = stringKey("thread.name"); /** - * HTTP request method. - * - *

    Notes: - * - *

      - *
    • HTTP request method value SHOULD be "known" to the instrumentation. By default, - * this convention defines "known" methods as the ones listed in RFC9110 and the PATCH - * method defined in RFC5789. - *
    • If the HTTP request method is not known to instrumentation, it MUST set the {@code - * http.request.method} attribute to {@code _OTHER} and, except if reporting a metric, MUST - * set the exact method received in the request line as value of the {@code - * http.request.method_original} attribute. - *
    • If the HTTP instrumentation could end up converting valid HTTP request methods to {@code - * _OTHER}, then it MUST provide a way to override the list of known HTTP methods. If this - * override is done via environment variable, then the environment variable MUST be named - * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of - * case-sensitive known HTTP methods (this list MUST be a full override of the default known - * method, it is not a list of known methods in addition to the defaults). - *
    • HTTP method names are case-sensitive and {@code http.request.method} attribute value MUST - * match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. - * Tracing instrumentations that do so, MUST also set {@code http.request.method_original} - * to the original value. - *
    + * The column number in {@code code.filepath} best representing the operation. It SHOULD point + * within the code unit named in {@code code.function}. */ - public static final AttributeKey HTTP_REQUEST_METHOD = stringKey("http.request.method"); + public static final AttributeKey CODE_COLUMN = longKey("code.column"); - /** HTTP response status code. */ - public static final AttributeKey HTTP_RESPONSE_STATUS_CODE = - longKey("http.response.status_code"); + /** + * The source code file name that identifies the code unit as uniquely as possible (preferably an + * absolute file path). + */ + public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); /** - * The matched route (path template in the format used by the respective server framework). See - * note below - * - *

    Notes: - * - *

      - *
    • MUST NOT be populated when this is not supported by the HTTP server framework as the - * route attribute should have low-cardinality and the URI path can NOT substitute it. - * SHOULD include the application - * root if there is one. - *
    + * The method or function name, or equivalent (usually rightmost part of the code unit's name). */ - public static final AttributeKey HTTP_ROUTE = stringKey("http.route"); + public static final AttributeKey CODE_FUNCTION = stringKey("code.function"); - /** The name identifies the event. */ - public static final AttributeKey EVENT_NAME = stringKey("event.name"); + /** + * The line number in {@code code.filepath} best representing the operation. It SHOULD point + * within the code unit named in {@code code.function}. + */ + public static final AttributeKey CODE_LINENO = longKey("code.lineno"); + + /** + * The "namespace" within which {@code code.function} is defined. Usually the qualified + * class or module name, such that {@code code.namespace} + some separator + {@code code.function} + * form a unique identifier for the code unit. + */ + public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); /** * The domain identifies the business context for the events. @@ -314,6 +327,9 @@ public final class SemanticAttributes { */ public static final AttributeKey EVENT_DOMAIN = stringKey("event.domain"); + /** The name identifies the event. */ + public static final AttributeKey EVENT_NAME = stringKey("event.name"); + /** * A unique identifier for the Log Record. * @@ -335,19 +351,39 @@ public final class SemanticAttributes { /** The basename of the file. */ public static final AttributeKey LOG_FILE_NAME = stringKey("log.file.name"); - /** The full path to the file. */ - public static final AttributeKey LOG_FILE_PATH = stringKey("log.file.path"); - /** The basename of the file, with symlinks resolved. */ public static final AttributeKey LOG_FILE_NAME_RESOLVED = stringKey("log.file.name_resolved"); - /** The full path to the file, with symlinks resolved. */ - public static final AttributeKey LOG_FILE_PATH_RESOLVED = + /** The full path to the file. */ + public static final AttributeKey LOG_FILE_PATH = stringKey("log.file.path"); + + /** The full path to the file, with symlinks resolved. */ + public static final AttributeKey LOG_FILE_PATH_RESOLVED = stringKey("log.file.path_resolved"); - /** The type of memory. */ - public static final AttributeKey TYPE = stringKey("type"); + /** + * The name of the connection pool; unique within the instrumented application. In case the + * connection pool implementation does not provide a name, then the db.connection_string + * should be used + */ + public static final AttributeKey POOL_NAME = stringKey("pool.name"); + + /** The state of a connection in the pool */ + public static final AttributeKey STATE = stringKey("state"); + + /** + * Name of the buffer pool. + * + *

    Notes: + * + *

    + */ + public static final AttributeKey JVM_BUFFER_POOL_NAME = stringKey("jvm.buffer.pool.name"); /** * Name of the memory pool. @@ -359,224 +395,498 @@ public final class SemanticAttributes { * href="https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()">MemoryPoolMXBean#getName(). * */ - public static final AttributeKey POOL = stringKey("pool"); + public static final AttributeKey JVM_MEMORY_POOL_NAME = stringKey("jvm.memory.pool.name"); + + /** The type of memory. */ + public static final AttributeKey JVM_MEMORY_TYPE = stringKey("jvm.memory.type"); + + /** The device identifier */ + public static final AttributeKey SYSTEM_DEVICE = stringKey("system.device"); + + /** The logical CPU number [0..n-1] */ + public static final AttributeKey SYSTEM_CPU_LOGICAL_NUMBER = + longKey("system.cpu.logical_number"); + + /** The state of the CPU */ + public static final AttributeKey SYSTEM_CPU_STATE = stringKey("system.cpu.state"); + + /** The memory state */ + public static final AttributeKey SYSTEM_MEMORY_STATE = stringKey("system.memory.state"); + + /** The paging access direction */ + public static final AttributeKey SYSTEM_PAGING_DIRECTION = + stringKey("system.paging.direction"); + + /** The memory paging state */ + public static final AttributeKey SYSTEM_PAGING_STATE = stringKey("system.paging.state"); + + /** The memory paging type */ + public static final AttributeKey SYSTEM_PAGING_TYPE = stringKey("system.paging.type"); + + /** The disk operation direction */ + public static final AttributeKey SYSTEM_DISK_DIRECTION = + stringKey("system.disk.direction"); + + /** The filesystem mode */ + public static final AttributeKey SYSTEM_FILESYSTEM_MODE = + stringKey("system.filesystem.mode"); + + /** The filesystem mount path */ + public static final AttributeKey SYSTEM_FILESYSTEM_MOUNTPOINT = + stringKey("system.filesystem.mountpoint"); + + /** The filesystem state */ + public static final AttributeKey SYSTEM_FILESYSTEM_STATE = + stringKey("system.filesystem.state"); + + /** The filesystem type */ + public static final AttributeKey SYSTEM_FILESYSTEM_TYPE = + stringKey("system.filesystem.type"); + + /** */ + public static final AttributeKey SYSTEM_NETWORK_DIRECTION = + stringKey("system.network.direction"); + + /** A stateless protocol MUST NOT set this attribute */ + public static final AttributeKey SYSTEM_NETWORK_STATE = stringKey("system.network.state"); /** - * Logical server hostname, matches server FQDN if available, and IP or socket address if FQDN is - * not known. + * The process state, e.g., Linux Process State + * Codes */ - public static final AttributeKey SERVER_ADDRESS = stringKey("server.address"); + public static final AttributeKey SYSTEM_PROCESSES_STATUS = + stringKey("system.processes.status"); - /** Logical server port number */ - public static final AttributeKey SERVER_PORT = longKey("server.port"); + /** Local address of the network connection - IP address or Unix domain socket name. */ + public static final AttributeKey NETWORK_LOCAL_ADDRESS = + stringKey("network.local.address"); + + /** Local port number of the network connection. */ + public static final AttributeKey NETWORK_LOCAL_PORT = longKey("network.local.port"); + + /** Peer address of the network connection - IP address or Unix domain socket name. */ + public static final AttributeKey NETWORK_PEER_ADDRESS = stringKey("network.peer.address"); + + /** Peer port number of the network connection. */ + public static final AttributeKey NETWORK_PEER_PORT = longKey("network.peer.port"); /** - * The domain name of an immediate peer. + * OSI application layer or non-OSI + * equivalent. * *

    Notes: * *

      - *
    • Typically observed from the client side, and represents a proxy or other intermediary - * domain name. + *
    • The value SHOULD be normalized to lowercase. *
    */ - public static final AttributeKey SERVER_SOCKET_DOMAIN = stringKey("server.socket.domain"); + public static final AttributeKey NETWORK_PROTOCOL_NAME = + stringKey("network.protocol.name"); /** - * Physical server IP address or Unix socket address. If set from the client, should simply use - * the socket's peer address, and not attempt to find any actual server IP (i.e., if set from - * client, this may represent some proxy server instead of the logical server). + * Version of the protocol specified in {@code network.protocol.name}. + * + *

    Notes: + * + *

      + *
    • {@code network.protocol.version} refers to the version of the protocol used and might be + * different from the protocol client's version. If the HTTP client used has a version of + * {@code 0.27.2}, but sends HTTP version {@code 1.1}, this attribute should be set to + * {@code 1.1}. + *
    */ - public static final AttributeKey SERVER_SOCKET_ADDRESS = - stringKey("server.socket.address"); - - /** Physical server port. */ - public static final AttributeKey SERVER_SOCKET_PORT = longKey("server.socket.port"); + public static final AttributeKey NETWORK_PROTOCOL_VERSION = + stringKey("network.protocol.version"); /** - * The domain name of the source system. + * OSI transport layer or inter-process communication + * method. * *

    Notes: * *

      - *
    • This value may be a host name, a fully qualified domain name, or another host naming - * format. + *
    • The value SHOULD be normalized to lowercase. + *
    • Consider always setting the transport when setting a port number, since a port number is + * ambiguous without knowing the transport, for example different processes could be + * listening on TCP port 12345 and UDP port 12345. *
    */ - public static final AttributeKey SOURCE_DOMAIN = stringKey("source.domain"); - - /** Source address, for example IP address or Unix socket name. */ - public static final AttributeKey SOURCE_ADDRESS = stringKey("source.address"); - - /** Source port number */ - public static final AttributeKey SOURCE_PORT = longKey("source.port"); + public static final AttributeKey NETWORK_TRANSPORT = stringKey("network.transport"); /** - * The full invoked ARN as provided on the {@code Context} passed to the function ({@code - * Lambda-Runtime-Invoked-Function-Arn} header on the {@code /runtime/invocation/next} - * applicable). + * OSI network layer or non-OSI equivalent. * *

    Notes: * *

      - *
    • This may be different from {@code cloud.resource_id} if an alias is involved. + *
    • The value SHOULD be normalized to lowercase. *
    */ - public static final AttributeKey AWS_LAMBDA_INVOKED_ARN = - stringKey("aws.lambda.invoked_arn"); + public static final AttributeKey NETWORK_TYPE = stringKey("network.type"); + + /** The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. */ + public static final AttributeKey NETWORK_CARRIER_ICC = stringKey("network.carrier.icc"); + + /** The mobile carrier country code. */ + public static final AttributeKey NETWORK_CARRIER_MCC = stringKey("network.carrier.mcc"); + + /** The mobile carrier network code. */ + public static final AttributeKey NETWORK_CARRIER_MNC = stringKey("network.carrier.mnc"); + + /** The name of the mobile carrier. */ + public static final AttributeKey NETWORK_CARRIER_NAME = stringKey("network.carrier.name"); /** - * The event_id - * uniquely identifies the event. + * This describes more details regarding the connection.type. It may be the type of cell + * technology connection, but it could be used for describing details about a wifi connection. */ - public static final AttributeKey CLOUDEVENTS_EVENT_ID = stringKey("cloudevents.event_id"); + public static final AttributeKey NETWORK_CONNECTION_SUBTYPE = + stringKey("network.connection.subtype"); + + /** The internet connection type. */ + public static final AttributeKey NETWORK_CONNECTION_TYPE = + stringKey("network.connection.type"); /** - * The source - * identifies the context in which an event happened. + * Deprecated, use {@code http.request.method} instead. + * + * @deprecated Deprecated, use `http.request.method` instead. */ - public static final AttributeKey CLOUDEVENTS_EVENT_SOURCE = - stringKey("cloudevents.event_source"); + @Deprecated public static final AttributeKey HTTP_METHOD = stringKey("http.method"); /** - * The version - * of the CloudEvents specification which the event uses. + * Deprecated, use {@code http.request.body.size} instead. + * + * @deprecated Deprecated, use `http.request.body.size` instead. */ - public static final AttributeKey CLOUDEVENTS_EVENT_SPEC_VERSION = - stringKey("cloudevents.event_spec_version"); + @Deprecated + public static final AttributeKey HTTP_REQUEST_CONTENT_LENGTH = + longKey("http.request_content_length"); /** - * The event_type - * contains a value describing the type of event related to the originating occurrence. + * Deprecated, use {@code http.response.body.size} instead. + * + * @deprecated Deprecated, use `http.response.body.size` instead. */ - public static final AttributeKey CLOUDEVENTS_EVENT_TYPE = - stringKey("cloudevents.event_type"); + @Deprecated + public static final AttributeKey HTTP_RESPONSE_CONTENT_LENGTH = + longKey("http.response_content_length"); /** - * The subject - * of the event in the context of the event producer (identified by source). + * Deprecated, use {@code url.scheme} instead. + * + * @deprecated Deprecated, use `url.scheme` instead. */ - public static final AttributeKey CLOUDEVENTS_EVENT_SUBJECT = - stringKey("cloudevents.event_subject"); + @Deprecated public static final AttributeKey HTTP_SCHEME = stringKey("http.scheme"); /** - * Parent-child Reference type - * - *

    Notes: + * Deprecated, use {@code http.response.status_code} instead. * - *

      - *
    • The causal relationship between a child Span and a parent Span. - *
    + * @deprecated Deprecated, use `http.response.status_code` instead. */ - public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); + @Deprecated public static final AttributeKey HTTP_STATUS_CODE = longKey("http.status_code"); /** - * An identifier for the database management system (DBMS) product being used. See below for a - * list of well-known identifiers. + * Deprecated, use {@code url.path} and {@code url.query} instead. + * + * @deprecated Deprecated, use `url.path` and `url.query` instead. */ - public static final AttributeKey DB_SYSTEM = stringKey("db.system"); + @Deprecated public static final AttributeKey HTTP_TARGET = stringKey("http.target"); /** - * The connection string used to connect to the database. It is recommended to remove embedded - * credentials. + * Deprecated, use {@code url.full} instead. + * + * @deprecated Deprecated, use `url.full` instead. */ - public static final AttributeKey DB_CONNECTION_STRING = stringKey("db.connection_string"); - - /** Username for accessing the database. */ - public static final AttributeKey DB_USER = stringKey("db.user"); + @Deprecated public static final AttributeKey HTTP_URL = stringKey("http.url"); /** - * The fully-qualified class name of the Java Database Connectivity - * (JDBC) driver used to connect. + * The size of the request payload body in bytes. This is the number of bytes transferred + * excluding headers and is often, but not always, present as the Content-Length + * header. For requests using transport encoding, this should be the compressed size. */ - public static final AttributeKey DB_JDBC_DRIVER_CLASSNAME = - stringKey("db.jdbc.driver_classname"); + public static final AttributeKey HTTP_REQUEST_BODY_SIZE = longKey("http.request.body.size"); /** - * This attribute is used to report the name of the database being accessed. For commands that - * switch the database, this should be set to the target database (even if the command fails). + * HTTP request method. * *

    Notes: * *

      - *
    • In some SQL databases, the database name to be used is called "schema name". In - * case there are multiple layers that could be considered for database name (e.g. Oracle - * instance name and schema name), the database name to be used is the more specific layer - * (e.g. Oracle schema name). + *
    • HTTP request method value SHOULD be "known" to the instrumentation. By default, + * this convention defines "known" methods as the ones listed in RFC9110 and the PATCH + * method defined in RFC5789. + *
    • If the HTTP request method is not known to instrumentation, it MUST set the {@code + * http.request.method} attribute to {@code _OTHER}. + *
    • If the HTTP instrumentation could end up converting valid HTTP request methods to {@code + * _OTHER}, then it MUST provide a way to override the list of known HTTP methods. If this + * override is done via environment variable, then the environment variable MUST be named + * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of + * case-sensitive known HTTP methods (this list MUST be a full override of the default known + * method, it is not a list of known methods in addition to the defaults). + *
    • HTTP method names are case-sensitive and {@code http.request.method} attribute value MUST + * match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. + * Tracing instrumentations that do so, MUST also set {@code http.request.method_original} + * to the original value. *
    */ - public static final AttributeKey DB_NAME = stringKey("db.name"); + public static final AttributeKey HTTP_REQUEST_METHOD = stringKey("http.request.method"); - /** The database statement being executed. */ - public static final AttributeKey DB_STATEMENT = stringKey("db.statement"); + /** Original HTTP method sent by the client in the request line. */ + public static final AttributeKey HTTP_REQUEST_METHOD_ORIGINAL = + stringKey("http.request.method_original"); /** - * The name of the operation being executed, e.g. the MongoDB command - * name such as {@code findAndModify}, or the SQL keyword. + * The ordinal number of request resending attempt (for any reason, including redirects). * *

    Notes: * *

      - *
    • When setting this to an SQL keyword, it is not recommended to attempt any client-side - * parsing of {@code db.statement} just to get this property, but it should be set if the - * operation name is provided by the library being instrumented. If the SQL statement has an - * ambiguous operation, or performs more than one operation, this value may be omitted. + *
    • The resend count SHOULD be updated each time an HTTP request gets resent by the client, + * regardless of what was the cause of the resending (e.g. redirection, authorization + * failure, 503 Server Unavailable, network issues, or any other). *
    */ - public static final AttributeKey DB_OPERATION = stringKey("db.operation"); + public static final AttributeKey HTTP_RESEND_COUNT = longKey("http.resend_count"); /** - * The Microsoft SQL Server instance - * name connecting to. This name is used to determine the port of a named instance. + * The size of the response payload body in bytes. This is the number of bytes transferred + * excluding headers and is often, but not always, present as the Content-Length + * header. For requests using transport encoding, this should be the compressed size. + */ + public static final AttributeKey HTTP_RESPONSE_BODY_SIZE = + longKey("http.response.body.size"); + + /** HTTP response status code. */ + public static final AttributeKey HTTP_RESPONSE_STATUS_CODE = + longKey("http.response.status_code"); + + /** + * The matched route (path template in the format used by the respective server framework). See + * note below * *

    Notes: * *

      - *
    • If setting a {@code db.mssql.instance_name}, {@code server.port} is no longer required - * (but still recommended if non-standard). + *
    • MUST NOT be populated when this is not supported by the HTTP server framework as the + * route attribute should have low-cardinality and the URI path can NOT substitute it. + * SHOULD include the application + * root if there is one. *
    */ - public static final AttributeKey DB_MSSQL_INSTANCE_NAME = - stringKey("db.mssql.instance_name"); - - /** The fetch size used for paging, i.e. how many rows will be returned at once. */ - public static final AttributeKey DB_CASSANDRA_PAGE_SIZE = longKey("db.cassandra.page_size"); + public static final AttributeKey HTTP_ROUTE = stringKey("http.route"); /** - * The consistency level of the query. Based on consistency values from CQL. - */ - public static final AttributeKey DB_CASSANDRA_CONSISTENCY_LEVEL = - stringKey("db.cassandra.consistency_level"); + * Server address - domain name if available without reverse DNS lookup, otherwise IP address or + * Unix domain socket name. + * + *

    Notes: + * + *

      + *
    • When observed from the client side, and when communicating through an intermediary, + * {@code server.address} SHOULD represent the server address behind any intermediaries + * (e.g. proxies) if it's available. + *
    + */ + public static final AttributeKey SERVER_ADDRESS = stringKey("server.address"); /** - * The name of the primary table that the operation is acting upon, including the keyspace name - * (if applicable). + * Server port number. * *

    Notes: * *

      - *
    • This mirrors the db.sql.table attribute but references cassandra rather than sql. It is - * not recommended to attempt any client-side parsing of {@code db.statement} just to get - * this property, but it should be set if it is provided by the library being instrumented. - * If the operation is acting upon an anonymous table, or more than one table, this value - * MUST NOT be set. + *
    • When observed from the client side, and when communicating through an intermediary, + * {@code server.port} SHOULD represent the server port behind any intermediaries (e.g. + * proxies) if it's available. *
    */ - public static final AttributeKey DB_CASSANDRA_TABLE = stringKey("db.cassandra.table"); + public static final AttributeKey SERVER_PORT = longKey("server.port"); + + /** A unique id to identify a session. */ + public static final AttributeKey SESSION_ID = stringKey("session.id"); + + /** + * Source address - domain name if available without reverse DNS lookup, otherwise IP address or + * Unix domain socket name. + * + *

    Notes: + * + *

      + *
    • When observed from the destination side, and when communicating through an intermediary, + * {@code source.address} SHOULD represent the source address behind any intermediaries + * (e.g. proxies) if it's available. + *
    + */ + public static final AttributeKey SOURCE_ADDRESS = stringKey("source.address"); + + /** Source port number */ + public static final AttributeKey SOURCE_PORT = longKey("source.port"); + + /** + * The full invoked ARN as provided on the {@code Context} passed to the function ({@code + * Lambda-Runtime-Invoked-Function-Arn} header on the {@code /runtime/invocation/next} + * applicable). + * + *

    Notes: + * + *

      + *
    • This may be different from {@code cloud.resource_id} if an alias is involved. + *
    + */ + public static final AttributeKey AWS_LAMBDA_INVOKED_ARN = + stringKey("aws.lambda.invoked_arn"); + + /** + * The event_id + * uniquely identifies the event. + */ + public static final AttributeKey CLOUDEVENTS_EVENT_ID = stringKey("cloudevents.event_id"); + + /** + * The source + * identifies the context in which an event happened. + */ + public static final AttributeKey CLOUDEVENTS_EVENT_SOURCE = + stringKey("cloudevents.event_source"); + + /** + * The version + * of the CloudEvents specification which the event uses. + */ + public static final AttributeKey CLOUDEVENTS_EVENT_SPEC_VERSION = + stringKey("cloudevents.event_spec_version"); + + /** + * The subject + * of the event in the context of the event producer (identified by source). + */ + public static final AttributeKey CLOUDEVENTS_EVENT_SUBJECT = + stringKey("cloudevents.event_subject"); + + /** + * The event_type + * contains a value describing the type of event related to the originating occurrence. + */ + public static final AttributeKey CLOUDEVENTS_EVENT_TYPE = + stringKey("cloudevents.event_type"); + + /** + * Parent-child Reference type + * + *

    Notes: + * + *

      + *
    • The causal relationship between a child Span and a parent Span. + *
    + */ + public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); + + /** + * The connection string used to connect to the database. It is recommended to remove embedded + * credentials. + */ + public static final AttributeKey DB_CONNECTION_STRING = stringKey("db.connection_string"); + + /** + * The fully-qualified class name of the Java Database Connectivity + * (JDBC) driver used to connect. + */ + public static final AttributeKey DB_JDBC_DRIVER_CLASSNAME = + stringKey("db.jdbc.driver_classname"); + + /** + * This attribute is used to report the name of the database being accessed. For commands that + * switch the database, this should be set to the target database (even if the command fails). + * + *

    Notes: + * + *

      + *
    • In some SQL databases, the database name to be used is called "schema name". In + * case there are multiple layers that could be considered for database name (e.g. Oracle + * instance name and schema name), the database name to be used is the more specific layer + * (e.g. Oracle schema name). + *
    + */ + public static final AttributeKey DB_NAME = stringKey("db.name"); + + /** + * The name of the operation being executed, e.g. the MongoDB command + * name such as {@code findAndModify}, or the SQL keyword. + * + *

    Notes: + * + *

      + *
    • When setting this to an SQL keyword, it is not recommended to attempt any client-side + * parsing of {@code db.statement} just to get this property, but it should be set if the + * operation name is provided by the library being instrumented. If the SQL statement has an + * ambiguous operation, or performs more than one operation, this value may be omitted. + *
    + */ + public static final AttributeKey DB_OPERATION = stringKey("db.operation"); + + /** The database statement being executed. */ + public static final AttributeKey DB_STATEMENT = stringKey("db.statement"); + + /** + * An identifier for the database management system (DBMS) product being used. See below for a + * list of well-known identifiers. + */ + public static final AttributeKey DB_SYSTEM = stringKey("db.system"); + + /** Username for accessing the database. */ + public static final AttributeKey DB_USER = stringKey("db.user"); + + /** + * The Microsoft SQL Server instance + * name connecting to. This name is used to determine the port of a named instance. + * + *

    Notes: + * + *

      + *
    • If setting a {@code db.mssql.instance_name}, {@code server.port} is no longer required + * (but still recommended if non-standard). + *
    + */ + public static final AttributeKey DB_MSSQL_INSTANCE_NAME = + stringKey("db.mssql.instance_name"); + + /** + * The consistency level of the query. Based on consistency values from CQL. + */ + public static final AttributeKey DB_CASSANDRA_CONSISTENCY_LEVEL = + stringKey("db.cassandra.consistency_level"); + + /** The data center of the coordinating node for a query. */ + public static final AttributeKey DB_CASSANDRA_COORDINATOR_DC = + stringKey("db.cassandra.coordinator.dc"); + + /** The ID of the coordinating node for a query. */ + public static final AttributeKey DB_CASSANDRA_COORDINATOR_ID = + stringKey("db.cassandra.coordinator.id"); /** Whether or not the query is idempotent. */ public static final AttributeKey DB_CASSANDRA_IDEMPOTENCE = booleanKey("db.cassandra.idempotence"); + /** The fetch size used for paging, i.e. how many rows will be returned at once. */ + public static final AttributeKey DB_CASSANDRA_PAGE_SIZE = longKey("db.cassandra.page_size"); + /** * The number of times a query was speculatively executed. Not set or {@code 0} if the query was * not executed speculatively. @@ -584,13 +894,21 @@ public final class SemanticAttributes { public static final AttributeKey DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = longKey("db.cassandra.speculative_execution_count"); - /** The ID of the coordinating node for a query. */ - public static final AttributeKey DB_CASSANDRA_COORDINATOR_ID = - stringKey("db.cassandra.coordinator.id"); - - /** The data center of the coordinating node for a query. */ - public static final AttributeKey DB_CASSANDRA_COORDINATOR_DC = - stringKey("db.cassandra.coordinator.dc"); + /** + * The name of the primary table that the operation is acting upon, including the keyspace name + * (if applicable). + * + *

    Notes: + * + *

      + *
    • This mirrors the db.sql.table attribute but references cassandra rather than sql. It is + * not recommended to attempt any client-side parsing of {@code db.statement} just to get + * this property, but it should be set if it is provided by the library being instrumented. + * If the operation is acting upon an anonymous table, or more than one table, this value + * MUST NOT be set. + *
    + */ + public static final AttributeKey DB_CASSANDRA_TABLE = stringKey("db.cassandra.table"); /** * The index of the database being accessed as used in the DB_MONGODB_COLLECTION = stringKey("db.mongodb.collection"); + /** Represents the identifier of an Elasticsearch cluster. */ + public static final AttributeKey DB_ELASTICSEARCH_CLUSTER_NAME = + stringKey("db.elasticsearch.cluster.name"); + + /** + * Represents the human-readable identifier of the node/instance to which a request was routed. + */ + public static final AttributeKey DB_ELASTICSEARCH_NODE_NAME = + stringKey("db.elasticsearch.node.name"); + /** * The name of the primary table that the operation is acting upon, including the database name * (if applicable). @@ -623,10 +951,6 @@ public final class SemanticAttributes { public static final AttributeKey DB_COSMOSDB_CLIENT_ID = stringKey("db.cosmosdb.client_id"); - /** CosmosDB Operation Type. */ - public static final AttributeKey DB_COSMOSDB_OPERATION_TYPE = - stringKey("db.cosmosdb.operation_type"); - /** Cosmos client connection mode. */ public static final AttributeKey DB_COSMOSDB_CONNECTION_MODE = stringKey("db.cosmosdb.connection_mode"); @@ -635,6 +959,14 @@ public final class SemanticAttributes { public static final AttributeKey DB_COSMOSDB_CONTAINER = stringKey("db.cosmosdb.container"); + /** CosmosDB Operation Type. */ + public static final AttributeKey DB_COSMOSDB_OPERATION_TYPE = + stringKey("db.cosmosdb.operation_type"); + + /** RU consumed for that operation */ + public static final AttributeKey DB_COSMOSDB_REQUEST_CHARGE = + doubleKey("db.cosmosdb.request_charge"); + /** Request payload size in bytes */ public static final AttributeKey DB_COSMOSDB_REQUEST_CONTENT_LENGTH = longKey("db.cosmosdb.request_content_length"); @@ -647,10 +979,6 @@ public final class SemanticAttributes { public static final AttributeKey DB_COSMOSDB_SUB_STATUS_CODE = longKey("db.cosmosdb.sub_status_code"); - /** RU consumed for that operation */ - public static final AttributeKey DB_COSMOSDB_REQUEST_CHARGE = - doubleKey("db.cosmosdb.request_charge"); - /** * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status * code is UNSET. @@ -661,22 +989,6 @@ public final class SemanticAttributes { public static final AttributeKey OTEL_STATUS_DESCRIPTION = stringKey("otel.status_description"); - /** - * Type of the trigger which caused this function invocation. - * - *

    Notes: - * - *

      - *
    • For the server/consumer span on the incoming side, {@code faas.trigger} MUST be set. - *
    • Clients invoking FaaS instances usually cannot set {@code faas.trigger}, since they would - * typically need to look in the payload to determine the event type. If clients set it, it - * should be the same as the trigger that corresponding incoming would have (i.e., this has - * nothing to do with the underlying transport used to make the API call to invoke the - * lambda, which is often HTTP). - *
    - */ - public static final AttributeKey FAAS_TRIGGER = stringKey("faas.trigger"); - /** The invocation ID of the current function invocation. */ public static final AttributeKey FAAS_INVOCATION_ID = stringKey("faas.invocation_id"); @@ -687,6 +999,12 @@ public final class SemanticAttributes { public static final AttributeKey FAAS_DOCUMENT_COLLECTION = stringKey("faas.document.collection"); + /** + * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the + * name of the file, and in Cosmos DB the table name. + */ + public static final AttributeKey FAAS_DOCUMENT_NAME = stringKey("faas.document.name"); + /** Describes the type of the operation that was performed on the data. */ public static final AttributeKey FAAS_DOCUMENT_OPERATION = stringKey("faas.document.operation"); @@ -699,10 +1017,11 @@ public final class SemanticAttributes { public static final AttributeKey FAAS_DOCUMENT_TIME = stringKey("faas.document.time"); /** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the - * name of the file, and in Cosmos DB the table name. + * A string containing the schedule period as
    Cron + * Expression. */ - public static final AttributeKey FAAS_DOCUMENT_NAME = stringKey("faas.document.name"); + public static final AttributeKey FAAS_CRON = stringKey("faas.cron"); /** * A string containing the function invocation time in the FAAS_TIME = stringKey("faas.time"); /** - * A string containing the schedule period as Cron - * Expression. - */ - public static final AttributeKey FAAS_CRON = stringKey("faas.cron"); - - /** - * A boolean that is true if the serverless function is executed for the first time (aka - * cold-start). + * A boolean that is true if the serverless function is executed for the first time (aka + * cold-start). */ public static final AttributeKey FAAS_COLDSTART = booleanKey("faas.coldstart"); - /** - * The name of the invoked function. - * - *

    Notes: - * - *

      - *
    • SHOULD be equal to the {@code faas.name} resource attribute of the invoked function. - *
    - */ - public static final AttributeKey FAAS_INVOKED_NAME = stringKey("faas.invoked_name"); - - /** - * The cloud provider of the invoked function. - * - *

    Notes: - * - *

      - *
    • SHOULD be equal to the {@code cloud.provider} resource attribute of the invoked function. - *
    - */ - public static final AttributeKey FAAS_INVOKED_PROVIDER = - stringKey("faas.invoked_provider"); - - /** - * The cloud region of the invoked function. - * - *

    Notes: - * - *

      - *
    • SHOULD be equal to the {@code cloud.region} resource attribute of the invoked function. - *
    - */ - public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region"); - /** The unique identifier of the feature flag. */ public static final AttributeKey FEATURE_FLAG_KEY = stringKey("feature_flag.key"); @@ -783,182 +1061,39 @@ public final class SemanticAttributes { */ public static final AttributeKey FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant"); - /** - * OSI Transport Layer or Inter-process Communication - * method. The value SHOULD be normalized to lowercase. - */ - public static final AttributeKey NETWORK_TRANSPORT = stringKey("network.transport"); - - /** - * OSI Network Layer or non-OSI equivalent. The - * value SHOULD be normalized to lowercase. - */ - public static final AttributeKey NETWORK_TYPE = stringKey("network.type"); - - /** - * OSI Application Layer or non-OSI - * equivalent. The value SHOULD be normalized to lowercase. - */ - public static final AttributeKey NETWORK_PROTOCOL_NAME = - stringKey("network.protocol.name"); - - /** - * Version of the application layer protocol used. See note below. - * - *

    Notes: - * - *

      - *
    • {@code network.protocol.version} refers to the version of the protocol used and might be - * different from the protocol client's version. If the HTTP client used has a version of - * {@code 0.27.2}, but sends HTTP version {@code 1.1}, this attribute should be set to - * {@code 1.1}. - *
    - */ - public static final AttributeKey NETWORK_PROTOCOL_VERSION = - stringKey("network.protocol.version"); - - /** The internet connection type. */ - public static final AttributeKey NETWORK_CONNECTION_TYPE = - stringKey("network.connection.type"); - - /** - * This describes more details regarding the connection.type. It may be the type of cell - * technology connection, but it could be used for describing details about a wifi connection. - */ - public static final AttributeKey NETWORK_CONNECTION_SUBTYPE = - stringKey("network.connection.subtype"); - - /** The name of the mobile carrier. */ - public static final AttributeKey NETWORK_CARRIER_NAME = stringKey("network.carrier.name"); - - /** The mobile carrier country code. */ - public static final AttributeKey NETWORK_CARRIER_MCC = stringKey("network.carrier.mcc"); - - /** The mobile carrier network code. */ - public static final AttributeKey NETWORK_CARRIER_MNC = stringKey("network.carrier.mnc"); - - /** The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. */ - public static final AttributeKey NETWORK_CARRIER_ICC = stringKey("network.carrier.icc"); - - /** - * The {@code service.name} of the remote service. - * SHOULD be equal to the actual {@code service.name} resource attribute of the remote service if - * any. - */ - public static final AttributeKey PEER_SERVICE = stringKey("peer.service"); - - /** - * Username or client_id extracted from the access token or Authorization header in the inbound - * request from outside the system. - */ - public static final AttributeKey ENDUSER_ID = stringKey("enduser.id"); - - /** - * Actual/assumed role the client is making the request under extracted from token or application - * security context. - */ - public static final AttributeKey ENDUSER_ROLE = stringKey("enduser.role"); - - /** - * Scopes or granted authorities the client currently possesses extracted from token or - * application security context. The value would come from the scope associated with an OAuth 2.0 Access Token or an - * attribute value in a SAML - * 2.0 Assertion. - */ - public static final AttributeKey ENDUSER_SCOPE = stringKey("enduser.scope"); - - /** Current "managed" thread ID (as opposed to OS thread ID). */ - public static final AttributeKey THREAD_ID = longKey("thread.id"); - - /** Current thread name. */ - public static final AttributeKey THREAD_NAME = stringKey("thread.name"); - - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - public static final AttributeKey CODE_FUNCTION = stringKey("code.function"); - - /** - * The "namespace" within which {@code code.function} is defined. Usually the qualified - * class or module name, such that {@code code.namespace} + some separator + {@code code.function} - * form a unique identifier for the code unit. - */ - public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); - - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an - * absolute file path). - */ - public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); - - /** - * The line number in {@code code.filepath} best representing the operation. It SHOULD point - * within the code unit named in {@code code.function}. - */ - public static final AttributeKey CODE_LINENO = longKey("code.lineno"); - - /** - * The column number in {@code code.filepath} best representing the operation. It SHOULD point - * within the code unit named in {@code code.function}. - */ - public static final AttributeKey CODE_COLUMN = longKey("code.column"); - - /** Original HTTP method sent by the client in the request line. */ - public static final AttributeKey HTTP_REQUEST_METHOD_ORIGINAL = - stringKey("http.request.method_original"); - - /** - * The size of the request payload body in bytes. This is the number of bytes transferred - * excluding headers and is often, but not always, present as the Content-Length - * header. For requests using transport encoding, this should be the compressed size. - */ - public static final AttributeKey HTTP_REQUEST_BODY_SIZE = longKey("http.request.body.size"); - - /** - * The size of the response payload body in bytes. This is the number of bytes transferred - * excluding headers and is often, but not always, present as the Content-Length - * header. For requests using transport encoding, this should be the compressed size. - */ - public static final AttributeKey HTTP_RESPONSE_BODY_SIZE = - longKey("http.response.body.size"); - - /** - * The ordinal number of request resending attempt (for any reason, including redirects). - * - *

    Notes: - * - *

      - *
    • The resend count SHOULD be updated each time an HTTP request gets resent by the client, - * regardless of what was the cause of the resending (e.g. redirection, authorization - * failure, 503 Server Unavailable, network issues, or any other). - *
    - */ - public static final AttributeKey HTTP_RESEND_COUNT = longKey("http.resend_count"); - /** * The AWS request ID as returned in the response headers {@code x-amz-request-id} or {@code * x-amz-requestid}. */ public static final AttributeKey AWS_REQUEST_ID = stringKey("aws.request_id"); - /** The keys in the {@code RequestItems} object field. */ - public static final AttributeKey> AWS_DYNAMODB_TABLE_NAMES = - stringArrayKey("aws.dynamodb.table_names"); + /** The value of the {@code AttributesToGet} request parameter. */ + public static final AttributeKey> AWS_DYNAMODB_ATTRIBUTES_TO_GET = + stringArrayKey("aws.dynamodb.attributes_to_get"); + + /** The value of the {@code ConsistentRead} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_CONSISTENT_READ = + booleanKey("aws.dynamodb.consistent_read"); /** The JSON-serialized value of each item in the {@code ConsumedCapacity} response field. */ public static final AttributeKey> AWS_DYNAMODB_CONSUMED_CAPACITY = stringArrayKey("aws.dynamodb.consumed_capacity"); + /** The value of the {@code IndexName} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_INDEX_NAME = + stringKey("aws.dynamodb.index_name"); + /** The JSON-serialized value of the {@code ItemCollectionMetrics} response field. */ public static final AttributeKey AWS_DYNAMODB_ITEM_COLLECTION_METRICS = stringKey("aws.dynamodb.item_collection_metrics"); + /** The value of the {@code Limit} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_LIMIT = longKey("aws.dynamodb.limit"); + + /** The value of the {@code ProjectionExpression} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_PROJECTION = + stringKey("aws.dynamodb.projection"); + /** The value of the {@code ProvisionedThroughput.ReadCapacityUnits} request parameter. */ public static final AttributeKey AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = doubleKey("aws.dynamodb.provisioned_read_capacity"); @@ -967,28 +1102,13 @@ public final class SemanticAttributes { public static final AttributeKey AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = doubleKey("aws.dynamodb.provisioned_write_capacity"); - /** The value of the {@code ConsistentRead} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_CONSISTENT_READ = - booleanKey("aws.dynamodb.consistent_read"); - - /** The value of the {@code ProjectionExpression} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_PROJECTION = - stringKey("aws.dynamodb.projection"); - - /** The value of the {@code Limit} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_LIMIT = longKey("aws.dynamodb.limit"); - - /** The value of the {@code AttributesToGet} request parameter. */ - public static final AttributeKey> AWS_DYNAMODB_ATTRIBUTES_TO_GET = - stringArrayKey("aws.dynamodb.attributes_to_get"); - - /** The value of the {@code IndexName} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_INDEX_NAME = - stringKey("aws.dynamodb.index_name"); - /** The value of the {@code Select} request parameter. */ public static final AttributeKey AWS_DYNAMODB_SELECT = stringKey("aws.dynamodb.select"); + /** The keys in the {@code RequestItems} object field. */ + public static final AttributeKey> AWS_DYNAMODB_TABLE_NAMES = + stringArrayKey("aws.dynamodb.table_names"); + /** The JSON-serialized value of each item of the {@code GlobalSecondaryIndexes} request field */ public static final AttributeKey> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = stringArrayKey("aws.dynamodb.global_secondary_indexes"); @@ -1009,13 +1129,6 @@ public final class SemanticAttributes { public static final AttributeKey AWS_DYNAMODB_SCAN_FORWARD = booleanKey("aws.dynamodb.scan_forward"); - /** The value of the {@code Segment} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_SEGMENT = longKey("aws.dynamodb.segment"); - - /** The value of the {@code TotalSegments} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_TOTAL_SEGMENTS = - longKey("aws.dynamodb.total_segments"); - /** The value of the {@code Count} response parameter. */ public static final AttributeKey AWS_DYNAMODB_COUNT = longKey("aws.dynamodb.count"); @@ -1023,6 +1136,13 @@ public final class SemanticAttributes { public static final AttributeKey AWS_DYNAMODB_SCANNED_COUNT = longKey("aws.dynamodb.scanned_count"); + /** The value of the {@code Segment} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_SEGMENT = longKey("aws.dynamodb.segment"); + + /** The value of the {@code TotalSegments} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_TOTAL_SEGMENTS = + longKey("aws.dynamodb.total_segments"); + /** The JSON-serialized value of each item in the {@code AttributeDefinitions} request field. */ public static final AttributeKey> AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = stringArrayKey("aws.dynamodb.attribute_definitions"); @@ -1050,17 +1170,51 @@ public final class SemanticAttributes { public static final AttributeKey AWS_S3_BUCKET = stringKey("aws.s3.bucket"); /** - * The S3 object key the request refers to. Corresponds to the {@code --key} parameter of the S3 API operations. + * The source object (in the form {@code bucket}/{@code key}) for the copy operation. * *

    Notes: * *

      - *
    • The {@code key} attribute is applicable to all object-related S3 operations, i.e. that - * require the object key as a mandatory parameter. This applies in particular to the - * following operations: - *
    • copy-object + *
    • The {@code copy_source} attribute applies to S3 copy operations and corresponds to the + * {@code --copy-source} parameter of the copy-object + * operation within the S3 API. This applies in particular to the following operations: + *
    • copy-object + *
    • upload-part-copy + *
    + */ + public static final AttributeKey AWS_S3_COPY_SOURCE = stringKey("aws.s3.copy_source"); + + /** + * The delete request container that specifies the objects to be deleted. + * + *

    Notes: + * + *

    + */ + public static final AttributeKey AWS_S3_DELETE = stringKey("aws.s3.delete"); + + /** + * The S3 object key the request refers to. Corresponds to the {@code --key} parameter of the S3 API operations. + * + *

    Notes: + * + *

      + *
    • The {@code key} attribute is applicable to all object-related S3 operations, i.e. that + * require the object key as a mandatory parameter. This applies in particular to the + * following operations: + *
    • copy-object *
    • delete-object *
    • AWS_S3_KEY = stringKey("aws.s3.key"); /** - * The source object (in the form {@code bucket}/{@code key}) for the copy operation. + * The part number of the part being uploaded in a multipart-upload operation. This is a positive + * integer between 1 and 10,000. * *

      Notes: * *

      */ - public static final AttributeKey AWS_S3_COPY_SOURCE = stringKey("aws.s3.copy_source"); + public static final AttributeKey AWS_S3_PART_NUMBER = longKey("aws.s3.part_number"); /** * Upload ID that identifies the multipart upload. @@ -1132,39 +1287,15 @@ public final class SemanticAttributes { public static final AttributeKey AWS_S3_UPLOAD_ID = stringKey("aws.s3.upload_id"); /** - * The delete request container that specifies the objects to be deleted. - * - *

      Notes: - * - *

      - */ - public static final AttributeKey AWS_S3_DELETE = stringKey("aws.s3.delete"); - - /** - * The part number of the part being uploaded in a multipart-upload operation. This is a positive - * integer between 1 and 10,000. + * The GraphQL document being executed. * *

      Notes: * *

      */ - public static final AttributeKey AWS_S3_PART_NUMBER = longKey("aws.s3.part_number"); + public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); /** The name of the operation being executed. */ public static final AttributeKey GRAPHQL_OPERATION_NAME = @@ -1175,20 +1306,17 @@ public final class SemanticAttributes { stringKey("graphql.operation.type"); /** - * The GraphQL document being executed. + * The size of the message body in bytes. * *

      Notes: * *

        - *
      • The value may be sanitized to exclude sensitive information. + *
      • This can refer to both the compressed or uncompressed body size. If both sizes are known, + * the uncompressed body size should be used. *
      */ - public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); - - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message.id"); + public static final AttributeKey MESSAGING_MESSAGE_BODY_SIZE = + longKey("messaging.message.body.size"); /** * The conversation ID identifying the conversation to which the @@ -1198,15 +1326,29 @@ public final class SemanticAttributes { stringKey("messaging.message.conversation_id"); /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is - * unknown whether the compressed or uncompressed payload size is reported. + * The size of the message body and metadata in bytes. + * + *

      Notes: + * + *

        + *
      • This can refer to both the compressed or uncompressed size. If both sizes are known, the + * uncompressed size should be used. + *
      */ - public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = - longKey("messaging.message.payload_size_bytes"); + public static final AttributeKey MESSAGING_MESSAGE_ENVELOPE_SIZE = + longKey("messaging.message.envelope.size"); - /** The compressed size of the message payload in bytes. */ - public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = - longKey("messaging.message.payload_compressed_size_bytes"); + /** + * A value used by the messaging system as an identifier for the message, represented as a string. + */ + public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message.id"); + + /** + * A boolean that is true if the message destination is anonymous (could be unnamed or have + * auto-generated name). + */ + public static final AttributeKey MESSAGING_DESTINATION_ANONYMOUS = + booleanKey("messaging.destination.anonymous"); /** * The message destination name @@ -1245,26 +1387,25 @@ public final class SemanticAttributes { booleanKey("messaging.destination.temporary"); /** - * A boolean that is true if the message destination is anonymous (could be unnamed or have - * auto-generated name). + * A boolean that is true if the publish message destination is anonymous (could be unnamed or + * have auto-generated name). */ - public static final AttributeKey MESSAGING_DESTINATION_ANONYMOUS = - booleanKey("messaging.destination.anonymous"); - - /** A string identifying the messaging system. */ - public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); + public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = + booleanKey("messaging.destination_publish.anonymous"); /** - * A string identifying the kind of messaging operation as defined in the Operation names section above. + * The name of the original destination the message was published to * *

      Notes: * *

        - *
      • If a custom value is used, it MUST be of low cardinality. + *
      • The name SHOULD uniquely identify a specific queue, topic, or other entity within the + * broker. If the broker does not have such notion, the original destination name SHOULD + * uniquely identify the broker. *
      */ - public static final AttributeKey MESSAGING_OPERATION = stringKey("messaging.operation"); + public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_NAME = + stringKey("messaging.destination_publish.name"); /** * The number of messages sent, received, or processed in the scope of the batching operation. @@ -1285,24 +1426,24 @@ public final class SemanticAttributes { /** A unique identifier for the client that consumes or produces a message. */ public static final AttributeKey MESSAGING_CLIENT_ID = stringKey("messaging.client_id"); - /** RabbitMQ message routing key. */ - public static final AttributeKey MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = - stringKey("messaging.rabbitmq.destination.routing_key"); - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the - * same partition. They differ from {@code messaging.message.id} in that they're not unique. If - * the key is {@code null}, the attribute MUST NOT be set. + * A string identifying the kind of messaging operation as defined in the Operation names section above. * *

      Notes: * *

        - *
      • If the key type is not string, it's string representation has to be supplied for the - * attribute. If the key has no unambiguous, canonical string form, don't include its value. + *
      • If a custom value is used, it MUST be of low cardinality. *
      */ - public static final AttributeKey MESSAGING_KAFKA_MESSAGE_KEY = - stringKey("messaging.kafka.message.key"); + public static final AttributeKey MESSAGING_OPERATION = stringKey("messaging.operation"); + + /** A string identifying the messaging system. */ + public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); + + /** RabbitMQ message routing key. */ + public static final AttributeKey MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = + stringKey("messaging.rabbitmq.destination.routing_key"); /** * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not @@ -1315,6 +1456,21 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGING_KAFKA_DESTINATION_PARTITION = longKey("messaging.kafka.destination.partition"); + /** + * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the + * same partition. They differ from {@code messaging.message.id} in that they're not unique. If + * the key is {@code null}, the attribute MUST NOT be set. + * + *

      Notes: + * + *

        + *
      • If the key type is not string, it's string representation has to be supplied for the + * attribute. If the key has no unambiguous, canonical string form, don't include its value. + *
      + */ + public static final AttributeKey MESSAGING_KAFKA_MESSAGE_KEY = + stringKey("messaging.kafka.message.key"); + /** The offset of a record in the corresponding Kafka partition. */ public static final AttributeKey MESSAGING_KAFKA_MESSAGE_OFFSET = longKey("messaging.kafka.message.offset"); @@ -1323,10 +1479,6 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGING_KAFKA_MESSAGE_TOMBSTONE = booleanKey("messaging.kafka.message.tombstone"); - /** Namespace of RocketMQ resources, resources in different namespaces are individual. */ - public static final AttributeKey MESSAGING_ROCKETMQ_NAMESPACE = - stringKey("messaging.rocketmq.namespace"); - /** * Name of the RocketMQ producer/consumer group that is handling the message. The client type is * identified by the SpanKind. @@ -1334,16 +1486,20 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGING_ROCKETMQ_CLIENT_GROUP = stringKey("messaging.rocketmq.client_group"); + /** Model of message consumption. This only applies to consumer spans. */ + public static final AttributeKey MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = + stringKey("messaging.rocketmq.consumption_model"); + + /** The delay time level for delay message, which determines the message delay time. */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = + longKey("messaging.rocketmq.message.delay_time_level"); + /** * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. */ public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = longKey("messaging.rocketmq.message.delivery_timestamp"); - /** The delay time level for delay message, which determines the message delay time. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = - longKey("messaging.rocketmq.message.delay_time_level"); - /** * It is essential for FIFO message. Messages that belong to the same message group are always * processed one by one within the same consumer group. @@ -1351,24 +1507,36 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_GROUP = stringKey("messaging.rocketmq.message.group"); - /** Type of message. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TYPE = - stringKey("messaging.rocketmq.message.type"); + /** Key(s) of message, another way to mark message besides message id. */ + public static final AttributeKey> MESSAGING_ROCKETMQ_MESSAGE_KEYS = + stringArrayKey("messaging.rocketmq.message.keys"); /** The secondary classifier of message besides topic. */ public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TAG = stringKey("messaging.rocketmq.message.tag"); - /** Key(s) of message, another way to mark message besides message id. */ - public static final AttributeKey> MESSAGING_ROCKETMQ_MESSAGE_KEYS = - stringArrayKey("messaging.rocketmq.message.keys"); + /** Type of message. */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TYPE = + stringKey("messaging.rocketmq.message.type"); - /** Model of message consumption. This only applies to consumer spans. */ - public static final AttributeKey MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = - stringKey("messaging.rocketmq.consumption_model"); + /** Namespace of RocketMQ resources, resources in different namespaces are individual. */ + public static final AttributeKey MESSAGING_ROCKETMQ_NAMESPACE = + stringKey("messaging.rocketmq.namespace"); - /** A string identifying the remoting system. See below for a list of well-known identifiers. */ - public static final AttributeKey RPC_SYSTEM = stringKey("rpc.system"); + /** + * The name of the (logical) method being called, must be equal to the $method part in the span + * name. + * + *

      Notes: + * + *

        + *
      • This is the logical name of the method from the RPC interface perspective, which can be + * different from the name of any implementing method/function. The {@code code.function} + * attribute may be used to store the latter (e.g., method actually executing the call on + * the server side, RPC client stub method on the client side). + *
      + */ + public static final AttributeKey RPC_METHOD = stringKey("rpc.method"); /** * The full (logical) name of the service being called, including its package name, if applicable. @@ -1385,20 +1553,8 @@ public final class SemanticAttributes { */ public static final AttributeKey RPC_SERVICE = stringKey("rpc.service"); - /** - * The name of the (logical) method being called, must be equal to the $method part in the span - * name. - * - *

      Notes: - * - *

        - *
      • This is the logical name of the method from the RPC interface perspective, which can be - * different from the name of any implementing method/function. The {@code code.function} - * attribute may be used to store the latter (e.g., method actually executing the call on - * the server side, RPC client stub method on the client side). - *
      - */ - public static final AttributeKey RPC_METHOD = stringKey("rpc.method"); + /** A string identifying the remoting system. See below for a list of well-known identifiers. */ + public static final AttributeKey RPC_SYSTEM = stringKey("rpc.system"); /** * The numeric status @@ -1406,11 +1562,12 @@ public final class SemanticAttributes { */ public static final AttributeKey RPC_GRPC_STATUS_CODE = longKey("rpc.grpc.status_code"); - /** - * Protocol version as in {@code jsonrpc} property of request/response. Since JSON-RPC 1.0 does - * not specify this, the value can be omitted. - */ - public static final AttributeKey RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version"); + /** {@code error.code} property of response if it is an error response. */ + public static final AttributeKey RPC_JSONRPC_ERROR_CODE = longKey("rpc.jsonrpc.error_code"); + + /** {@code error.message} property of response if it is an error response. */ + public static final AttributeKey RPC_JSONRPC_ERROR_MESSAGE = + stringKey("rpc.jsonrpc.error_message"); /** * {@code id} property of request or response. Since protocol allows id to be int, string, {@code @@ -1420,19 +1577,19 @@ public final class SemanticAttributes { public static final AttributeKey RPC_JSONRPC_REQUEST_ID = stringKey("rpc.jsonrpc.request_id"); - /** {@code error.code} property of response if it is an error response. */ - public static final AttributeKey RPC_JSONRPC_ERROR_CODE = longKey("rpc.jsonrpc.error_code"); - - /** {@code error.message} property of response if it is an error response. */ - public static final AttributeKey RPC_JSONRPC_ERROR_MESSAGE = - stringKey("rpc.jsonrpc.error_message"); - - /** Whether this is a received or sent message. */ - public static final AttributeKey MESSAGE_TYPE = stringKey("message.type"); - /** - * MUST be calculated as two different counters starting from {@code 1} one for sent messages and - * one for received message. + * Protocol version as in {@code jsonrpc} property of request/response. Since JSON-RPC 1.0 does + * not specify this, the value can be omitted. + */ + public static final AttributeKey RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version"); + + /** Compressed size of the message in bytes. */ + public static final AttributeKey MESSAGE_COMPRESSED_SIZE = + longKey("message.compressed_size"); + + /** + * MUST be calculated as two different counters starting from {@code 1} one for sent messages and + * one for received message. * *

      Notes: * @@ -1443,9 +1600,8 @@ public final class SemanticAttributes { */ public static final AttributeKey MESSAGE_ID = longKey("message.id"); - /** Compressed size of the message in bytes. */ - public static final AttributeKey MESSAGE_COMPRESSED_SIZE = - longKey("message.compressed_size"); + /** Whether this is a received or sent message. */ + public static final AttributeKey MESSAGE_TYPE = stringKey("message.type"); /** Uncompressed size of the message in bytes. */ public static final AttributeKey MESSAGE_UNCOMPRESSED_SIZE = @@ -1481,11 +1637,8 @@ public final class SemanticAttributes { */ public static final AttributeKey EXCEPTION_ESCAPED = booleanKey("exception.escaped"); - /** - * The URI scheme component - * identifying the used protocol. - */ - public static final AttributeKey URL_SCHEME = stringKey("url.scheme"); + /** The URI fragment component */ + public static final AttributeKey URL_FRAGMENT = stringKey("url.fragment"); /** * Absolute URL describing a network resource according to URL_QUERY = stringKey("url.query"); - /** The URI fragment component */ - public static final AttributeKey URL_FRAGMENT = stringKey("url.fragment"); + /** + * The URI scheme component + * identifying the used protocol. + */ + public static final AttributeKey URL_SCHEME = stringKey("url.scheme"); + + /** + * Value of the HTTP + * User-Agent header sent by the client. + */ + public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); + + // Enum definitions + public static final class NetSockFamilyValues { + /** IPv4 address. */ + public static final String INET = "inet"; + + /** IPv6 address. */ + public static final String INET6 = "inet6"; + + /** Unix domain socket path. */ + public static final String UNIX = "unix"; + + private NetSockFamilyValues() {} + } + + public static final class NetTransportValues { + /** ip_tcp. */ + public static final String IP_TCP = "ip_tcp"; + + /** ip_udp. */ + public static final String IP_UDP = "ip_udp"; + + /** Named or anonymous pipe. */ + public static final String PIPE = "pipe"; + + /** In-process communication. */ + public static final String INPROC = "inproc"; + + /** Something else (non IP-based). */ + public static final String OTHER = "other"; + + private NetTransportValues() {} + } + + public static final class ErrorTypeValues { + /** + * A fallback error value to be used when the instrumentation does not define a custom value for + * it. + */ + public static final String OTHER = "_OTHER"; + + private ErrorTypeValues() {} + } + + public static final class FaasInvokedProviderValues { + /** Alibaba Cloud. */ + public static final String ALIBABA_CLOUD = "alibaba_cloud"; + + /** Amazon Web Services. */ + public static final String AWS = "aws"; + + /** Microsoft Azure. */ + public static final String AZURE = "azure"; + + /** Google Cloud Platform. */ + public static final String GCP = "gcp"; + + /** Tencent Cloud. */ + public static final String TENCENT_CLOUD = "tencent_cloud"; + + private FaasInvokedProviderValues() {} + } + + public static final class FaasTriggerValues { + /** A response to some data source operation such as a database or filesystem read/write. */ + public static final String DATASOURCE = "datasource"; + + /** To provide an answer to an inbound HTTP request. */ + public static final String HTTP = "http"; + + /** A function is set to be executed when messages are sent to a messaging system. */ + public static final String PUBSUB = "pubsub"; + + /** A function is scheduled to be executed regularly. */ + public static final String TIMER = "timer"; + + /** If none of the others apply. */ + public static final String OTHER = "other"; + + private FaasTriggerValues() {} + } + + public static final class EventDomainValues { + /** Events from browser apps. */ + public static final String BROWSER = "browser"; + + /** Events from mobile apps. */ + public static final String DEVICE = "device"; + + /** Events from Kubernetes. */ + public static final String K8S = "k8s"; + + private EventDomainValues() {} + } + + public static final class LogIostreamValues { + /** Logs from stdout stream. */ + public static final String STDOUT = "stdout"; + + /** Events from stderr stream. */ + public static final String STDERR = "stderr"; + + private LogIostreamValues() {} + } + + public static final class StateValues { + /** idle. */ + public static final String IDLE = "idle"; + + /** used. */ + public static final String USED = "used"; + + private StateValues() {} + } + + public static final class JvmMemoryTypeValues { + /** Heap memory. */ + public static final String HEAP = "heap"; + + /** Non-heap memory. */ + public static final String NON_HEAP = "non_heap"; + + private JvmMemoryTypeValues() {} + } + + public static final class SystemCpuStateValues { + /** user. */ + public static final String USER = "user"; + + /** system. */ + public static final String SYSTEM = "system"; + + /** nice. */ + public static final String NICE = "nice"; + + /** idle. */ + public static final String IDLE = "idle"; + + /** iowait. */ + public static final String IOWAIT = "iowait"; + + /** interrupt. */ + public static final String INTERRUPT = "interrupt"; + + /** steal. */ + public static final String STEAL = "steal"; + + private SystemCpuStateValues() {} + } + + public static final class SystemMemoryStateValues { + /** total. */ + public static final String TOTAL = "total"; + + /** used. */ + public static final String USED = "used"; + + /** free. */ + public static final String FREE = "free"; + + /** shared. */ + public static final String SHARED = "shared"; + + /** buffers. */ + public static final String BUFFERS = "buffers"; + + /** cached. */ + public static final String CACHED = "cached"; + + private SystemMemoryStateValues() {} + } + + public static final class SystemPagingDirectionValues { + /** in. */ + public static final String IN = "in"; + + /** out. */ + public static final String OUT = "out"; + + private SystemPagingDirectionValues() {} + } + + public static final class SystemPagingStateValues { + /** used. */ + public static final String USED = "used"; + + /** free. */ + public static final String FREE = "free"; + + private SystemPagingStateValues() {} + } + + public static final class SystemPagingTypeValues { + /** major. */ + public static final String MAJOR = "major"; + + /** minor. */ + public static final String MINOR = "minor"; + + private SystemPagingTypeValues() {} + } + + public static final class SystemDiskDirectionValues { + /** read. */ + public static final String READ = "read"; + + /** write. */ + public static final String WRITE = "write"; + + private SystemDiskDirectionValues() {} + } + + public static final class SystemFilesystemStateValues { + /** used. */ + public static final String USED = "used"; + + /** free. */ + public static final String FREE = "free"; + + /** reserved. */ + public static final String RESERVED = "reserved"; + + private SystemFilesystemStateValues() {} + } + + public static final class SystemFilesystemTypeValues { + /** fat32. */ + public static final String FAT32 = "fat32"; + + /** exfat. */ + public static final String EXFAT = "exfat"; + + /** ntfs. */ + public static final String NTFS = "ntfs"; + + /** refs. */ + public static final String REFS = "refs"; + + /** hfsplus. */ + public static final String HFSPLUS = "hfsplus"; + + /** ext4. */ + public static final String EXT4 = "ext4"; + + private SystemFilesystemTypeValues() {} + } + + public static final class SystemNetworkDirectionValues { + /** transmit. */ + public static final String TRANSMIT = "transmit"; + + /** receive. */ + public static final String RECEIVE = "receive"; + + private SystemNetworkDirectionValues() {} + } + + public static final class SystemNetworkStateValues { + /** close. */ + public static final String CLOSE = "close"; + + /** close_wait. */ + public static final String CLOSE_WAIT = "close_wait"; + + /** closing. */ + public static final String CLOSING = "closing"; + + /** delete. */ + public static final String DELETE = "delete"; + + /** established. */ + public static final String ESTABLISHED = "established"; + + /** fin_wait_1. */ + public static final String FIN_WAIT_1 = "fin_wait_1"; + + /** fin_wait_2. */ + public static final String FIN_WAIT_2 = "fin_wait_2"; + + /** last_ack. */ + public static final String LAST_ACK = "last_ack"; + + /** listen. */ + public static final String LISTEN = "listen"; + + /** syn_recv. */ + public static final String SYN_RECV = "syn_recv"; + + /** syn_sent. */ + public static final String SYN_SENT = "syn_sent"; + + /** time_wait. */ + public static final String TIME_WAIT = "time_wait"; + + private SystemNetworkStateValues() {} + } + + public static final class SystemProcessesStatusValues { + /** running. */ + public static final String RUNNING = "running"; + + /** sleeping. */ + public static final String SLEEPING = "sleeping"; + + /** stopped. */ + public static final String STOPPED = "stopped"; + + /** defunct. */ + public static final String DEFUNCT = "defunct"; + + private SystemProcessesStatusValues() {} + } + + public static final class NetworkTransportValues { + /** TCP. */ + public static final String TCP = "tcp"; + + /** UDP. */ + public static final String UDP = "udp"; + + /** Named or anonymous pipe. See note below. */ + public static final String PIPE = "pipe"; + + /** Unix domain socket. */ + public static final String UNIX = "unix"; + + private NetworkTransportValues() {} + } + + public static final class NetworkTypeValues { + /** IPv4. */ + public static final String IPV4 = "ipv4"; + + /** IPv6. */ + public static final String IPV6 = "ipv6"; + + private NetworkTypeValues() {} + } + + public static final class NetworkConnectionSubtypeValues { + /** GPRS. */ + public static final String GPRS = "gprs"; + + /** EDGE. */ + public static final String EDGE = "edge"; + + /** UMTS. */ + public static final String UMTS = "umts"; + + /** CDMA. */ + public static final String CDMA = "cdma"; + + /** EVDO Rel. 0. */ + public static final String EVDO_0 = "evdo_0"; + + /** EVDO Rev. A. */ + public static final String EVDO_A = "evdo_a"; + + /** CDMA2000 1XRTT. */ + public static final String CDMA2000_1XRTT = "cdma2000_1xrtt"; + + /** HSDPA. */ + public static final String HSDPA = "hsdpa"; + + /** HSUPA. */ + public static final String HSUPA = "hsupa"; + + /** HSPA. */ + public static final String HSPA = "hspa"; + + /** IDEN. */ + public static final String IDEN = "iden"; + + /** EVDO Rev. B. */ + public static final String EVDO_B = "evdo_b"; + + /** LTE. */ + public static final String LTE = "lte"; - /** - * Value of the HTTP - * User-Agent header sent by the client. - */ - public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); + /** EHRPD. */ + public static final String EHRPD = "ehrpd"; - // Enum definitions - public static final class NetTransportValues { - /** ip_tcp. */ - public static final String IP_TCP = "ip_tcp"; + /** HSPAP. */ + public static final String HSPAP = "hspap"; - /** ip_udp. */ - public static final String IP_UDP = "ip_udp"; + /** GSM. */ + public static final String GSM = "gsm"; - /** Named or anonymous pipe. */ - public static final String PIPE = "pipe"; + /** TD-SCDMA. */ + public static final String TD_SCDMA = "td_scdma"; - /** In-process communication. */ - public static final String INPROC = "inproc"; + /** IWLAN. */ + public static final String IWLAN = "iwlan"; - /** Something else (non IP-based). */ - public static final String OTHER = "other"; + /** 5G NR (New Radio). */ + public static final String NR = "nr"; - private NetTransportValues() {} + /** 5G NRNSA (New Radio Non-Standalone). */ + public static final String NRNSA = "nrnsa"; + + /** LTE CA. */ + public static final String LTE_CA = "lte_ca"; + + private NetworkConnectionSubtypeValues() {} } - public static final class NetSockFamilyValues { - /** IPv4 address. */ - public static final String INET = "inet"; + public static final class NetworkConnectionTypeValues { + /** wifi. */ + public static final String WIFI = "wifi"; - /** IPv6 address. */ - public static final String INET6 = "inet6"; + /** wired. */ + public static final String WIRED = "wired"; - /** Unix domain socket path. */ - public static final String UNIX = "unix"; + /** cell. */ + public static final String CELL = "cell"; - private NetSockFamilyValues() {} + /** unavailable. */ + public static final String UNAVAILABLE = "unavailable"; + + /** unknown. */ + public static final String UNKNOWN = "unknown"; + + private NetworkConnectionTypeValues() {} } public static final class HttpRequestMethodValues { @@ -1605,39 +2152,6 @@ public static final class HttpRequestMethodValues { private HttpRequestMethodValues() {} } - public static final class EventDomainValues { - /** Events from browser apps. */ - public static final String BROWSER = "browser"; - - /** Events from mobile apps. */ - public static final String DEVICE = "device"; - - /** Events from Kubernetes. */ - public static final String K8S = "k8s"; - - private EventDomainValues() {} - } - - public static final class LogIostreamValues { - /** Logs from stdout stream. */ - public static final String STDOUT = "stdout"; - - /** Events from stderr stream. */ - public static final String STDERR = "stderr"; - - private LogIostreamValues() {} - } - - public static final class TypeValues { - /** Heap memory. */ - public static final String HEAP = "heap"; - - /** Non-heap memory. */ - public static final String NON_HEAP = "non_heap"; - - private TypeValues() {} - } - public static final class OpentracingRefTypeValues { /** The parent Span depends on the child Span in some capacity. */ public static final String CHILD_OF = "child_of"; @@ -1828,256 +2342,106 @@ public static final class DbCassandraConsistencyLevelValues { public static final String TWO = "two"; /** three. */ - public static final String THREE = "three"; - - /** local_one. */ - public static final String LOCAL_ONE = "local_one"; - - /** any. */ - public static final String ANY = "any"; - - /** serial. */ - public static final String SERIAL = "serial"; - - /** local_serial. */ - public static final String LOCAL_SERIAL = "local_serial"; - - private DbCassandraConsistencyLevelValues() {} - } - - public static final class DbCosmosdbOperationTypeValues { - /** invalid. */ - public static final String INVALID = "Invalid"; - - /** create. */ - public static final String CREATE = "Create"; - - /** patch. */ - public static final String PATCH = "Patch"; - - /** read. */ - public static final String READ = "Read"; - - /** read_feed. */ - public static final String READ_FEED = "ReadFeed"; - - /** delete. */ - public static final String DELETE = "Delete"; - - /** replace. */ - public static final String REPLACE = "Replace"; - - /** execute. */ - public static final String EXECUTE = "Execute"; - - /** query. */ - public static final String QUERY = "Query"; - - /** head. */ - public static final String HEAD = "Head"; - - /** head_feed. */ - public static final String HEAD_FEED = "HeadFeed"; - - /** upsert. */ - public static final String UPSERT = "Upsert"; - - /** batch. */ - public static final String BATCH = "Batch"; - - /** query_plan. */ - public static final String QUERY_PLAN = "QueryPlan"; - - /** execute_javascript. */ - public static final String EXECUTE_JAVASCRIPT = "ExecuteJavaScript"; - - private DbCosmosdbOperationTypeValues() {} - } - - public static final class DbCosmosdbConnectionModeValues { - /** Gateway (HTTP) connections mode. */ - public static final String GATEWAY = "gateway"; - - /** Direct connection. */ - public static final String DIRECT = "direct"; - - private DbCosmosdbConnectionModeValues() {} - } - - public static final class OtelStatusCodeValues { - /** - * The operation has been validated by an Application developer or Operator to have completed - * successfully. - */ - public static final String OK = "OK"; - - /** The operation contains an error. */ - public static final String ERROR = "ERROR"; - - private OtelStatusCodeValues() {} - } - - public static final class FaasTriggerValues { - /** A response to some data source operation such as a database or filesystem read/write. */ - public static final String DATASOURCE = "datasource"; - - /** To provide an answer to an inbound HTTP request. */ - public static final String HTTP = "http"; - - /** A function is set to be executed when messages are sent to a messaging system. */ - public static final String PUBSUB = "pubsub"; - - /** A function is scheduled to be executed regularly. */ - public static final String TIMER = "timer"; - - /** If none of the others apply. */ - public static final String OTHER = "other"; - - private FaasTriggerValues() {} - } - - public static final class FaasDocumentOperationValues { - /** When a new object is created. */ - public static final String INSERT = "insert"; - - /** When an object is modified. */ - public static final String EDIT = "edit"; - - /** When an object is deleted. */ - public static final String DELETE = "delete"; - - private FaasDocumentOperationValues() {} - } - - public static final class FaasInvokedProviderValues { - /** Alibaba Cloud. */ - public static final String ALIBABA_CLOUD = "alibaba_cloud"; - - /** Amazon Web Services. */ - public static final String AWS = "aws"; - - /** Microsoft Azure. */ - public static final String AZURE = "azure"; - - /** Google Cloud Platform. */ - public static final String GCP = "gcp"; - - /** Tencent Cloud. */ - public static final String TENCENT_CLOUD = "tencent_cloud"; - - private FaasInvokedProviderValues() {} - } - - public static final class NetworkTransportValues { - /** TCP. */ - public static final String TCP = "tcp"; - - /** UDP. */ - public static final String UDP = "udp"; - - /** Named or anonymous pipe. See note below. */ - public static final String PIPE = "pipe"; - - /** Unix domain socket. */ - public static final String UNIX = "unix"; - - private NetworkTransportValues() {} - } - - public static final class NetworkTypeValues { - /** IPv4. */ - public static final String IPV4 = "ipv4"; + public static final String THREE = "three"; - /** IPv6. */ - public static final String IPV6 = "ipv6"; + /** local_one. */ + public static final String LOCAL_ONE = "local_one"; - private NetworkTypeValues() {} - } + /** any. */ + public static final String ANY = "any"; - public static final class NetworkConnectionTypeValues { - /** wifi. */ - public static final String WIFI = "wifi"; + /** serial. */ + public static final String SERIAL = "serial"; - /** wired. */ - public static final String WIRED = "wired"; + /** local_serial. */ + public static final String LOCAL_SERIAL = "local_serial"; - /** cell. */ - public static final String CELL = "cell"; + private DbCassandraConsistencyLevelValues() {} + } - /** unavailable. */ - public static final String UNAVAILABLE = "unavailable"; + public static final class DbCosmosdbConnectionModeValues { + /** Gateway (HTTP) connections mode. */ + public static final String GATEWAY = "gateway"; - /** unknown. */ - public static final String UNKNOWN = "unknown"; + /** Direct connection. */ + public static final String DIRECT = "direct"; - private NetworkConnectionTypeValues() {} + private DbCosmosdbConnectionModeValues() {} } - public static final class NetworkConnectionSubtypeValues { - /** GPRS. */ - public static final String GPRS = "gprs"; + public static final class DbCosmosdbOperationTypeValues { + /** invalid. */ + public static final String INVALID = "Invalid"; - /** EDGE. */ - public static final String EDGE = "edge"; + /** create. */ + public static final String CREATE = "Create"; - /** UMTS. */ - public static final String UMTS = "umts"; + /** patch. */ + public static final String PATCH = "Patch"; - /** CDMA. */ - public static final String CDMA = "cdma"; + /** read. */ + public static final String READ = "Read"; - /** EVDO Rel. 0. */ - public static final String EVDO_0 = "evdo_0"; + /** read_feed. */ + public static final String READ_FEED = "ReadFeed"; - /** EVDO Rev. A. */ - public static final String EVDO_A = "evdo_a"; + /** delete. */ + public static final String DELETE = "Delete"; - /** CDMA2000 1XRTT. */ - public static final String CDMA2000_1XRTT = "cdma2000_1xrtt"; + /** replace. */ + public static final String REPLACE = "Replace"; - /** HSDPA. */ - public static final String HSDPA = "hsdpa"; + /** execute. */ + public static final String EXECUTE = "Execute"; - /** HSUPA. */ - public static final String HSUPA = "hsupa"; + /** query. */ + public static final String QUERY = "Query"; - /** HSPA. */ - public static final String HSPA = "hspa"; + /** head. */ + public static final String HEAD = "Head"; - /** IDEN. */ - public static final String IDEN = "iden"; + /** head_feed. */ + public static final String HEAD_FEED = "HeadFeed"; - /** EVDO Rev. B. */ - public static final String EVDO_B = "evdo_b"; + /** upsert. */ + public static final String UPSERT = "Upsert"; - /** LTE. */ - public static final String LTE = "lte"; + /** batch. */ + public static final String BATCH = "Batch"; - /** EHRPD. */ - public static final String EHRPD = "ehrpd"; + /** query_plan. */ + public static final String QUERY_PLAN = "QueryPlan"; - /** HSPAP. */ - public static final String HSPAP = "hspap"; + /** execute_javascript. */ + public static final String EXECUTE_JAVASCRIPT = "ExecuteJavaScript"; - /** GSM. */ - public static final String GSM = "gsm"; + private DbCosmosdbOperationTypeValues() {} + } - /** TD-SCDMA. */ - public static final String TD_SCDMA = "td_scdma"; + public static final class OtelStatusCodeValues { + /** + * The operation has been validated by an Application developer or Operator to have completed + * successfully. + */ + public static final String OK = "OK"; - /** IWLAN. */ - public static final String IWLAN = "iwlan"; + /** The operation contains an error. */ + public static final String ERROR = "ERROR"; - /** 5G NR (New Radio). */ - public static final String NR = "nr"; + private OtelStatusCodeValues() {} + } - /** 5G NRNSA (New Radio Non-Standalone). */ - public static final String NRNSA = "nrnsa"; + public static final class FaasDocumentOperationValues { + /** When a new object is created. */ + public static final String INSERT = "insert"; - /** LTE CA. */ - public static final String LTE_CA = "lte_ca"; + /** When an object is modified. */ + public static final String EDIT = "edit"; - private NetworkConnectionSubtypeValues() {} + /** When an object is deleted. */ + public static final String DELETE = "delete"; + + private FaasDocumentOperationValues() {} } public static final class GraphqlOperationTypeValues { @@ -2106,6 +2470,16 @@ public static final class MessagingOperationValues { private MessagingOperationValues() {} } + public static final class MessagingRocketmqConsumptionModelValues { + /** Clustering consumption model. */ + public static final String CLUSTERING = "clustering"; + + /** Broadcasting consumption model. */ + public static final String BROADCASTING = "broadcasting"; + + private MessagingRocketmqConsumptionModelValues() {} + } + public static final class MessagingRocketmqMessageTypeValues { /** Normal message. */ public static final String NORMAL = "normal"; @@ -2122,16 +2496,6 @@ public static final class MessagingRocketmqMessageTypeValues { private MessagingRocketmqMessageTypeValues() {} } - public static final class MessagingRocketmqConsumptionModelValues { - /** Clustering consumption model. */ - public static final String CLUSTERING = "clustering"; - - /** Broadcasting consumption model. */ - public static final String BROADCASTING = "broadcasting"; - - private MessagingRocketmqConsumptionModelValues() {} - } - public static final class RpcSystemValues { /** gRPC. */ public static final String GRPC = "grpc"; @@ -2902,5 +3266,144 @@ public static final class NetHostConnectionSubtypeValues { private NetHostConnectionSubtypeValues() {} } + /** + * Immediate client peer port number. + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * SemanticAttributes#NETWORK_PEER_PORT} on server telemetry and {@link + * SemanticAttributes#NETWORK_LOCAL_PORT} on client telemetry instead. + */ + @Deprecated + public static final AttributeKey CLIENT_SOCKET_PORT = longKey("client.socket.port"); + + /** + * Name of the memory pool. + * + *

      Notes: + * + *

      + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * SemanticAttributes#JVM_MEMORY_POOL_NAME} instead. + */ + @Deprecated public static final AttributeKey POOL = stringKey("pool"); + + /** + * The domain name of the source system. + * + *

      Notes: + * + *

        + *
      • This value may be a host name, a fully qualified domain name, or another host naming + * format. + *
      + * + * @deprecated This item has been removed in 1.22.0 of the semantic conventions. + */ + @Deprecated public static final AttributeKey SOURCE_DOMAIN = stringKey("source.domain"); + + /** + * Physical server IP address or Unix socket address. If set from the client, should simply use + * the socket's peer address, and not attempt to find any actual server IP (i.e., if set from + * client, this may represent some proxy server instead of the logical server). + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * SemanticAttributes#NETWORK_LOCAL_ADDRESS} on server telemetry and {@link + * SemanticAttributes#NETWORK_PEER_ADDRESS} on client telemetry instead. + */ + @Deprecated + public static final AttributeKey SERVER_SOCKET_ADDRESS = + stringKey("server.socket.address"); + + /** + * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is + * unknown whether the compressed or uncompressed payload size is reported. + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_MESSAGE_BODY_SIZE} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = + longKey("messaging.message.payload_size_bytes"); + + /** + * The domain name of the destination system. + * + * @deprecated This item has been removed in 1.22.0 of the semantic conventions. + */ + @Deprecated + public static final AttributeKey DESTINATION_DOMAIN = stringKey("destination.domain"); + + /** + * The compressed size of the message payload in bytes. + * + * @deprecated This item has been removed in 1.22.0 of the semantic conventions. + */ + @Deprecated + public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = + longKey("messaging.message.payload_compressed_size_bytes"); + + /** + * The domain name of an immediate peer. + * + *

      Notes: + * + *

        + *
      • Typically observed from the client side, and represents a proxy or other intermediary + * domain name. + *
      + * + * @deprecated This item has been removed in 1.22.0 of the semantic conventions. + */ + @Deprecated + public static final AttributeKey SERVER_SOCKET_DOMAIN = stringKey("server.socket.domain"); + + /** + * The type of memory. + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * SemanticAttributes#JVM_MEMORY_TYPE} instead. + */ + @Deprecated public static final AttributeKey TYPE = stringKey("type"); + + /** + * Physical server port. + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * SemanticAttributes#NETWORK_LOCAL_PORT} on server telemetry and {@link + * SemanticAttributes#NETWORK_PEER_PORT} on client telemetry instead. + */ + @Deprecated + public static final AttributeKey SERVER_SOCKET_PORT = longKey("server.socket.port"); + + /** + * Immediate client peer address - unix domain socket name, IPv4 or IPv6 address. + * + * @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link + * SemanticAttributes#NETWORK_PEER_ADDRESS} on server telemetry and {@link + * SemanticAttributes#NETWORK_LOCAL_ADDRESS} on client telemetry instead. + */ + @Deprecated + public static final AttributeKey CLIENT_SOCKET_ADDRESS = + stringKey("client.socket.address"); + + /** + * @deprecated This item has been renamed as of 1.21.0 of the semantic conventions. Use {@link + * JvmMemoryTypeValues} instead. + */ + @Deprecated + public static final class TypeValues { + /** Heap memory. */ + public static final String HEAP = "heap"; + + /** Non-heap memory. */ + public static final String NON_HEAP = "non_heap"; + + private TypeValues() {} + } + private SemanticAttributes() {} }