diff --git a/build.gradle.kts b/build.gradle.kts index ce1588a..6770c42 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ val snapshot = true // end // The release version of https://github.com/open-telemetry/semantic-conventions used to generate classes -var semanticConventionsVersion = "1.22.0" +var semanticConventionsVersion = "1.23.1" // Compute the artifact version, which includes the "-alpha" suffix and includes "-SNAPSHOT" suffix if not releasing // Release example: version=1.21.0-alpha @@ -71,7 +71,7 @@ dependencies { } // start - define tasks to download, unzip, and generate from opentelemetry/semantic-conventions -var generatorVersion = "0.22.0" +var generatorVersion = "0.23.0" val semanticConventionsRepoZip = "https://github.com/open-telemetry/semantic-conventions/archive/v$semanticConventionsVersion.zip" val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion" @@ -105,11 +105,10 @@ val generateSemanticAttributes by tasks.registering(Exec::class) { "-v", "$projectDir/buildscripts/templates:/templates", "-v", "$projectDir/src/main/java/io/opentelemetry/semconv/:/output", "otel/semconvgen:$generatorVersion", - "--only", "span,event,attribute_group,scope", - "-f", "/source", "code", + "--only", "span,event,attribute_group,scope,metric", + "--yaml-root", "/source", "code", "--template", "/templates/SemanticAttributes.java.j2", "--output", "/output/SemanticAttributes.java", - "-Dsemconv=trace", "-Dclass=SemanticAttributes", "-DschemaUrl=$schemaUrl", "-Dpkg=io.opentelemetry.semconv")) @@ -128,7 +127,7 @@ val generateResourceAttributes by tasks.registering(Exec::class) { "-v", "$projectDir/src/main/java/io/opentelemetry/semconv/:/output", "otel/semconvgen:$generatorVersion", "--only", "resource", - "-f", "/source", "code", + "--yaml-root", "/source", "code", "--template", "/templates/SemanticAttributes.java.j2", "--output", "/output/ResourceAttributes.java", "-Dclass=ResourceAttributes", diff --git a/buildscripts/templates/SemanticAttributes.java.j2 b/buildscripts/templates/SemanticAttributes.java.j2 index 60c4a31..96168e0 100644 --- a/buildscripts/templates/SemanticAttributes.java.j2 +++ b/buildscripts/templates/SemanticAttributes.java.j2 @@ -122,6 +122,30 @@ public final class {{class}} { {%- endfor %} + {%- if class_name == "MessagingOperationValues" %} + + /** + * process. + * + * @deprecated this value has been removed as of 1.23.1 of the semantic conventions. + */ + @Deprecated + public static final String PROCESS = "process"; + + {% endif %} + + {%- if class_name == "SystemMemoryStateValues" %} + + /** + * total. + * + * @deprecated this value has been removed as of 1.23.1 of the semantic conventions. + */ + @Deprecated + public static final String TOTAL = "total"; + + {% endif %} + private {{ class_name }}() {} } @@ -820,6 +844,30 @@ public final class {{class}} { private TypeValues() {} } + /** + * Whether the thread is daemon or not. + * + * @deprecated This item has been renamed in 1.23.1 of the semantic conventions. Use {@link SemanticAttributes#JVM_THREAD_DAEMON} instead. + */ + @Deprecated + public static final AttributeKey THREAD_DAEMON = booleanKey("thread.daemon"); + + /** + * The ordinal number of request resending attempt (for any reason, including redirects). + * + *

Notes: + * + *

+ * + * @deprecated This item has been renamed in 1.23.1 of the semantic conventions. Use {@link SemanticAttributes#HTTP_REQUEST_RESEND_COUNT} instead. + */ + @Deprecated + public static final AttributeKey HTTP_RESEND_COUNT = longKey("http.resend_count"); + {% endif %} {%- if class == "ResourceAttributes" %} diff --git a/src/main/java/io/opentelemetry/semconv/ResourceAttributes.java b/src/main/java/io/opentelemetry/semconv/ResourceAttributes.java index 228df3c..5681949 100644 --- a/src/main/java/io/opentelemetry/semconv/ResourceAttributes.java +++ b/src/main/java/io/opentelemetry/semconv/ResourceAttributes.java @@ -19,71 +19,7 @@ @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"; - - /** - * 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 AttributeKey ANDROID_OS_API_LEVEL = stringKey("android.os.api_level"); - - /** - * Array of brand name and version separated by a space - * - *

Notes: - * - *

    - *
  • This value is intended to be taken from the UA client hints API ({@code - * navigator.userAgentData.brands}). - *
- */ - public static final AttributeKey> BROWSER_BRANDS = stringArrayKey("browser.brands"); - - /** - * 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 BROWSER_LANGUAGE = stringKey("browser.language"); - - /** - * A boolean that is true if the browser is running on a mobile device - * - *

Notes: - * - *

    - *
  • This value is intended to be taken from the UA client hints API ({@code - * navigator.userAgentData.mobile}). If unavailable, this attribute SHOULD be left unset. - *
- */ - 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"); + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.23.1"; /** The cloud account ID the resource is assigned to. */ public static final AttributeKey CLOUD_ACCOUNT_ID = stringKey("cloud.account.id"); @@ -125,10 +61,9 @@ public final class ResourceAttributes { * href="https://www.alibabacloud.com/help/doc-detail/40654.htm">Alibaba Cloud regions, * AWS * regions, Azure - * regions, Google Cloud regions, - * or Tencent Cloud - * regions. + * href="https://azure.microsoft.com/global-infrastructure/geographies/">Azure regions, + * Google Cloud regions, or Tencent Cloud regions. * */ public static final AttributeKey CLOUD_REGION = stringKey("cloud.region"); @@ -136,7 +71,7 @@ public final class ResourceAttributes { /** * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on - * AWS, a fully + * AWS, a fully * qualified resource ID on Azure, a full resource * name on GCP) @@ -157,9 +92,9 @@ public final class ResourceAttributes { *
  • GCP: The URI of the resource *
  • Azure: The Fully - * Qualified Resource ID of the invoked function, not the function app, having - * the form {@code + * href="https://docs.microsoft.com/rest/api/resources/resources/get-by-id">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. @@ -167,6 +102,169 @@ public final class ResourceAttributes { */ public static final AttributeKey CLOUD_RESOURCE_ID = stringKey("cloud.resource_id"); + /** + * The command used to run the container (i.e. the command name). + * + *

    Notes: + * + *

      + *
    • If using embedded credentials or sensitive data, it is recommended to remove them to + * prevent potential leakage. + *
    + */ + public static final AttributeKey CONTAINER_COMMAND = stringKey("container.command"); + + /** + * All the command arguments (including the command/executable itself) run by the container. [2] + */ + 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 identify Docker + * containers. The UUID might be abbreviated. + */ + public static final AttributeKey CONTAINER_ID = stringKey("container.id"); + + /** + * Runtime specific image identifier. Usually a hash algorithm followed by a UUID. + * + *

    Notes: + * + *

      + *
    • Docker defines a sha256 of the image id; {@code container.image.id} corresponds to the + * {@code Image} field from the Docker container inspect API + * endpoint. K8s defines a link to the container registry repository with digest {@code + * "imageID": "registry.azurecr.io + * /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"}. + * The ID is assinged by the container runtime and can vary in different environments. + * Consider using {@code oci.manifest.digest} if it is important to identify the same image + * in different environments/runtimes. + *
    + */ + 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"); + + /** + * 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_REPO_DIGESTS = + stringArrayKey("container.image.repo_digests"); + + /** + * 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_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"); + + /** + * 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 OCI_MANIFEST_DIGEST = stringKey("oci.manifest.digest"); + + /** + * 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 AttributeKey ANDROID_OS_API_LEVEL = stringKey("android.os.api_level"); + + /** + * Array of brand name and version separated by a space + * + *

    Notes: + * + *

      + *
    • This value is intended to be taken from the UA client hints API ({@code + * navigator.userAgentData.brands}). + *
    + */ + public static final AttributeKey> BROWSER_BRANDS = stringArrayKey("browser.brands"); + + /** + * 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 BROWSER_LANGUAGE = stringKey("browser.language"); + + /** + * A boolean that is true if the browser is running on a mobile device + * + *

    Notes: + * + *

      + *
    • This value is intended to be taken from the UA client hints API ({@code + * navigator.userAgentData.mobile}). If unavailable, this attribute SHOULD be left unset. + *
    + */ + 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 ARN of an ECS @@ -299,89 +397,7 @@ public final class ResourceAttributes { stringKey("heroku.release.creation_timestamp"); /** - * The command used to run the container (i.e. the command name). - * - *

    Notes: - * - *

      - *
    • If using embedded credentials or sensitive data, it is recommended to remove them to - * prevent potential leakage. - *
    - */ - public static final AttributeKey CONTAINER_COMMAND = stringKey("container.command"); - - /** - * All the command arguments (including the command/executable itself) run by the container. [2] - */ - 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
    identify Docker - * containers. The UUID might be abbreviated. - */ - public static final AttributeKey CONTAINER_ID = stringKey("container.id"); - - /** - * Runtime specific image identifier. Usually a hash algorithm followed by a UUID. - * - *

    Notes: - * - *

      - *
    • Docker defines a sha256 of the image id; {@code container.image.id} corresponds to the - * {@code Image} field from the Docker container inspect API - * endpoint. K8s defines a link to the container registry repository with digest {@code - * "imageID": "registry.azurecr.io - * /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"}. - * The ID is assinged by the container runtime and can vary in different environments. - * Consider using {@code oci.manifest.digest} if it is important to identify the same image - * in different environments/runtimes. - *
    - */ - 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"); - - /** - * 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_REPO_DIGESTS = - stringArrayKey("container.image.repo_digests"); - - /** - * 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_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 + * Name of the deployment * environment (aka deployment tier). */ public static final AttributeKey DEPLOYMENT_ENVIRONMENT = @@ -550,6 +566,20 @@ public final class ResourceAttributes { */ public static final AttributeKey> HOST_IP = stringArrayKey("host.ip"); + /** + * Available MAC addresses of the host, excluding loopback interfaces. + * + *

    Notes: + * + *

      + *
    • MAC Addresses MUST be represented in IEEE + * RA hexadecimal form: as hyphen-separated octets in uppercase hexadecimal form from + * most to least significant. + *
    + */ + public static final AttributeKey> HOST_MAC = stringArrayKey("host.mac"); + /** * Name of the host. On Unix systems, it may contain what the hostname command returns, or the * fully qualified hostname, or another name specified by the user. @@ -599,7 +629,7 @@ public final class ResourceAttributes { *

    Notes: * *

      - *
    • K8s does not have support for obtaining a cluster ID. If this is ever added, we will + *
    • K8s doesn't 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. @@ -682,23 +712,6 @@ public final class ResourceAttributes { /** The UID of the CronJob. */ public static final AttributeKey K8S_CRONJOB_UID = stringKey("k8s.cronjob.uid"); - /** - * 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 OCI_MANIFEST_DIGEST = stringKey("oci.manifest.digest"); - /** Unique identifier for a particular build or compilation of the operating system. */ public static final AttributeKey OS_BUILD_ID = stringKey("os.build_id"); diff --git a/src/main/java/io/opentelemetry/semconv/SemanticAttributes.java b/src/main/java/io/opentelemetry/semconv/SemanticAttributes.java index 8c9c756..fb33692 100644 --- a/src/main/java/io/opentelemetry/semconv/SemanticAttributes.java +++ b/src/main/java/io/opentelemetry/semconv/SemanticAttributes.java @@ -21,18 +21,18 @@ @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.22.0"; + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.23.1"; /** - * Client address - domain name if available without reverse DNS lookup, otherwise IP address or + * 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 the client address behind any intermediaries - * (e.g. proxies) if it's available. + * {@code client.address} SHOULD represent the client address behind any intermediaries, for + * example proxies, if it's available. *
      */ public static final AttributeKey CLIENT_ADDRESS = stringKey("client.address"); @@ -44,123 +44,22 @@ public final class SemanticAttributes { * *
        *
      • When observed from the server side, and when communicating through an intermediary, - * {@code client.port} SHOULD represent the client port behind any intermediaries (e.g. - * proxies) if it's available. + * {@code client.port} SHOULD represent the client port behind any intermediaries, for + * example proxies, if it's available. *
      */ public static final AttributeKey CLIENT_PORT = longKey("client.port"); /** - * Deprecated, use {@code server.address}. - * - * @deprecated Deprecated, use `server.address`. - */ - @Deprecated public static final AttributeKey NET_HOST_NAME = stringKey("net.host.name"); - - /** - * Deprecated, use {@code server.port}. - * - * @deprecated Deprecated, use `server.port`. - */ - @Deprecated public static final AttributeKey NET_HOST_PORT = longKey("net.host.port"); - - /** - * Deprecated, use {@code server.address} on client spans and {@code client.address} on server - * spans. - * - * @deprecated Deprecated, use `server.address` on client spans and `client.address` on server - * spans. - */ - @Deprecated public static final AttributeKey NET_PEER_NAME = stringKey("net.peer.name"); - - /** - * Deprecated, use {@code server.port} on client spans and {@code client.port} on server spans. - * - * @deprecated Deprecated, use `server.port` on client spans and `client.port` on server spans. - */ - @Deprecated public static final AttributeKey NET_PEER_PORT = longKey("net.peer.port"); - - /** - * Deprecated, use {@code network.protocol.name}. - * - * @deprecated Deprecated, use `network.protocol.name`. - */ - @Deprecated - public static final AttributeKey NET_PROTOCOL_NAME = stringKey("net.protocol.name"); - - /** - * Deprecated, use {@code network.protocol.version}. - * - * @deprecated Deprecated, use `network.protocol.version`. - */ - @Deprecated - public static final AttributeKey NET_PROTOCOL_VERSION = stringKey("net.protocol.version"); - - /** - * Deprecated, use {@code network.transport} and {@code network.type}. - * - * @deprecated Deprecated, use `network.transport` and `network.type`. - */ - @Deprecated - public static final AttributeKey NET_SOCK_FAMILY = stringKey("net.sock.family"); - - /** - * Deprecated, use {@code network.local.address}. - * - * @deprecated Deprecated, use `network.local.address`. - */ - @Deprecated - public static final AttributeKey NET_SOCK_HOST_ADDR = stringKey("net.sock.host.addr"); - - /** - * Deprecated, use {@code network.local.port}. - * - * @deprecated Deprecated, use `network.local.port`. - */ - @Deprecated - public static final AttributeKey NET_SOCK_HOST_PORT = longKey("net.sock.host.port"); - - /** - * Deprecated, use {@code network.peer.address}. - * - * @deprecated Deprecated, use `network.peer.address`. - */ - @Deprecated - public static final AttributeKey NET_SOCK_PEER_ADDR = stringKey("net.sock.peer.addr"); - - /** - * Deprecated, no replacement at this time. - * - * @deprecated Deprecated, no replacement at this time. - */ - @Deprecated - public static final AttributeKey NET_SOCK_PEER_NAME = stringKey("net.sock.peer.name"); - - /** - * Deprecated, use {@code network.peer.port}. - * - * @deprecated Deprecated, use `network.peer.port`. - */ - @Deprecated - public static final AttributeKey NET_SOCK_PEER_PORT = longKey("net.sock.peer.port"); - - /** - * Deprecated, use {@code network.transport}. - * - * @deprecated Deprecated, use `network.transport`. - */ - @Deprecated public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); - - /** - * Destination address - domain name if available without reverse DNS lookup, otherwise IP address - * or Unix domain socket name. + * Destination address - domain name if available without reverse DNS lookup; otherwise, IP + * address or Unix domain socket name. * *

      Notes: * *

        *
      • 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. + * intermediaries, for example proxies, if it's available. *
      */ public static final AttributeKey DESTINATION_ADDRESS = stringKey("destination.address"); @@ -176,16 +75,17 @@ public final class SemanticAttributes { *
        *
      • 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 + *
      • The cardinality of {@code error.type} within one instrumentation library SHOULD be low. + * 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. + * 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. + *
      • If a specific domain defines its own set of error identifiers (such as HTTP or gRPC + * status codes), it's RECOMMENDED to: + *
      • Use a domain-specific attribute + *
      • Set {@code error.type} to capture all errors, regardless of whether they are defined + * within the domain-specific set or not. *
      */ public static final AttributeKey ERROR_TYPE = stringKey("error.type"); @@ -272,45 +172,6 @@ public final class SemanticAttributes { */ 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"); - - /** - * 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"); - - /** - * 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 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 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. * @@ -358,9 +219,37 @@ public final class SemanticAttributes { public static final AttributeKey LOG_FILE_PATH_RESOLVED = stringKey("log.file.path_resolved"); + /** + * This attribute represents the state the application has transitioned into at the occurrence of + * the event. + * + *

      Notes: + * + *

      + */ + public static final AttributeKey IOS_STATE = stringKey("ios.state"); + + /** + * This attribute represents the state the application has transitioned into at the occurrence of + * the event. + * + *

      Notes: + * + *

      + */ + public static final AttributeKey ANDROID_STATE = stringKey("android.state"); + /** * 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 */ @@ -396,6 +285,36 @@ public final class SemanticAttributes { /** The type of memory. */ public static final AttributeKey JVM_MEMORY_TYPE = stringKey("jvm.memory.type"); + /** + * Name of the garbage collector action. + * + *

      Notes: + * + *

      + */ + public static final AttributeKey JVM_GC_ACTION = stringKey("jvm.gc.action"); + + /** + * Name of the garbage collector. + * + *

      Notes: + * + *

      + */ + public static final AttributeKey JVM_GC_NAME = stringKey("jvm.gc.name"); + + /** Whether the thread is daemon or not. */ + public static final AttributeKey JVM_THREAD_DAEMON = booleanKey("jvm.thread.daemon"); + + /** State of the thread. */ + public static final AttributeKey JVM_THREAD_STATE = stringKey("jvm.thread.state"); + /** The device identifier */ public static final AttributeKey SYSTEM_DEVICE = stringKey("system.device"); @@ -454,149 +373,189 @@ public final class SemanticAttributes { public static final AttributeKey SYSTEM_PROCESSES_STATUS = stringKey("system.processes.status"); - /** Local address of the network connection - IP address or Unix domain socket name. */ - public static final AttributeKey NETWORK_LOCAL_ADDRESS = - stringKey("network.local.address"); + /** + * 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"); - /** Local port number of the network connection. */ - public static final AttributeKey NETWORK_LOCAL_PORT = longKey("network.local.port"); + /** + * 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"); - /** Peer address of the network connection - IP address or Unix domain socket name. */ - public static final AttributeKey NETWORK_PEER_ADDRESS = stringKey("network.peer.address"); + /** + * 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"); - /** Peer port number of the network connection. */ - public static final AttributeKey NETWORK_PEER_PORT = longKey("network.peer.port"); + /** + * 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"); /** - * OSI application layer or non-OSI - * equivalent. - * - *

      Notes: - * - *

        - *
      • The value SHOULD be normalized to lowercase. - *
      + * 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 NETWORK_PROTOCOL_NAME = - stringKey("network.protocol.name"); + public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); /** - * Version of the protocol specified in {@code network.protocol.name}. - * - *

      Notes: + * Deprecated, use {@code http.request.method} instead. * - *

        - *
      • {@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}. - *
      + * @deprecated Deprecated, use `http.request.method` instead. */ - public static final AttributeKey NETWORK_PROTOCOL_VERSION = - stringKey("network.protocol.version"); + @Deprecated public static final AttributeKey HTTP_METHOD = stringKey("http.method"); /** - * OSI transport layer or inter-process communication - * method. + * Deprecated, use {@code http.request.header.content-length} instead. * - *

      Notes: - * - *

        - *
      • 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. - *
      + * @deprecated Deprecated, use `http.request.header.content-length` instead. */ - public static final AttributeKey NETWORK_TRANSPORT = stringKey("network.transport"); + @Deprecated + public static final AttributeKey HTTP_REQUEST_CONTENT_LENGTH = + longKey("http.request_content_length"); /** - * OSI network layer or non-OSI equivalent. + * Deprecated, use {@code http.response.header.content-length} instead. * - *

      Notes: - * - *

        - *
      • The value SHOULD be normalized to lowercase. - *
      + * @deprecated Deprecated, use `http.response.header.content-length` instead. */ - 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"); + @Deprecated + public static final AttributeKey HTTP_RESPONSE_CONTENT_LENGTH = + longKey("http.response_content_length"); - /** The mobile carrier country code. */ - public static final AttributeKey NETWORK_CARRIER_MCC = stringKey("network.carrier.mcc"); + /** + * Deprecated, use {@code url.scheme} instead. + * + * @deprecated Deprecated, use `url.scheme` instead. + */ + @Deprecated public static final AttributeKey HTTP_SCHEME = stringKey("http.scheme"); - /** The mobile carrier network code. */ - public static final AttributeKey NETWORK_CARRIER_MNC = stringKey("network.carrier.mnc"); + /** + * Deprecated, use {@code http.response.status_code} instead. + * + * @deprecated Deprecated, use `http.response.status_code` instead. + */ + @Deprecated public static final AttributeKey HTTP_STATUS_CODE = longKey("http.status_code"); - /** The name of the mobile carrier. */ - public static final AttributeKey NETWORK_CARRIER_NAME = stringKey("network.carrier.name"); + /** + * Deprecated, use {@code url.path} and {@code url.query} instead. + * + * @deprecated Deprecated, use `url.path` and `url.query` instead. + */ + @Deprecated public static final AttributeKey HTTP_TARGET = stringKey("http.target"); /** - * 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. + * Deprecated, use {@code url.full} instead. + * + * @deprecated Deprecated, use `url.full` instead. */ - public static final AttributeKey NETWORK_CONNECTION_SUBTYPE = - stringKey("network.connection.subtype"); + @Deprecated public static final AttributeKey HTTP_URL = stringKey("http.url"); - /** The internet connection type. */ - public static final AttributeKey NETWORK_CONNECTION_TYPE = - stringKey("network.connection.type"); + /** + * Deprecated, use {@code server.address}. + * + * @deprecated Deprecated, use `server.address`. + */ + @Deprecated public static final AttributeKey NET_HOST_NAME = stringKey("net.host.name"); /** - * Deprecated, use {@code http.request.method} instead. + * Deprecated, use {@code server.port}. * - * @deprecated Deprecated, use `http.request.method` instead. + * @deprecated Deprecated, use `server.port`. */ - @Deprecated public static final AttributeKey HTTP_METHOD = stringKey("http.method"); + @Deprecated public static final AttributeKey NET_HOST_PORT = longKey("net.host.port"); + + /** + * Deprecated, use {@code server.address} on client spans and {@code client.address} on server + * spans. + * + * @deprecated Deprecated, use `server.address` on client spans and `client.address` on server + * spans. + */ + @Deprecated public static final AttributeKey NET_PEER_NAME = stringKey("net.peer.name"); + + /** + * Deprecated, use {@code server.port} on client spans and {@code client.port} on server spans. + * + * @deprecated Deprecated, use `server.port` on client spans and `client.port` on server spans. + */ + @Deprecated public static final AttributeKey NET_PEER_PORT = longKey("net.peer.port"); + + /** + * Deprecated, use {@code network.protocol.name}. + * + * @deprecated Deprecated, use `network.protocol.name`. + */ + @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 url.scheme} instead. + * Deprecated, use {@code network.local.address}. * - * @deprecated Deprecated, use `url.scheme` instead. + * @deprecated Deprecated, use `network.local.address`. */ - @Deprecated public static final AttributeKey HTTP_SCHEME = stringKey("http.scheme"); + @Deprecated + public static final AttributeKey NET_SOCK_HOST_ADDR = stringKey("net.sock.host.addr"); /** - * Deprecated, use {@code http.response.status_code} instead. + * Deprecated, use {@code network.local.port}. * - * @deprecated Deprecated, use `http.response.status_code` instead. + * @deprecated Deprecated, use `network.local.port`. */ - @Deprecated public static final AttributeKey HTTP_STATUS_CODE = longKey("http.status_code"); + @Deprecated + public static final AttributeKey NET_SOCK_HOST_PORT = longKey("net.sock.host.port"); /** - * Deprecated, use {@code url.path} and {@code url.query} instead. + * Deprecated, use {@code network.peer.address}. * - * @deprecated Deprecated, use `url.path` and `url.query` instead. + * @deprecated Deprecated, use `network.peer.address`. */ - @Deprecated public static final AttributeKey HTTP_TARGET = stringKey("http.target"); + @Deprecated + public static final AttributeKey NET_SOCK_PEER_ADDR = stringKey("net.sock.peer.addr"); /** - * Deprecated, use {@code url.full} instead. + * Deprecated, no replacement at this time. * - * @deprecated Deprecated, use `url.full` instead. + * @deprecated Deprecated, no replacement at this time. */ - @Deprecated public static final AttributeKey HTTP_URL = stringKey("http.url"); + @Deprecated + public static final AttributeKey NET_SOCK_PEER_NAME = stringKey("net.sock.peer.name"); + + /** + * Deprecated, use {@code network.peer.port}. + * + * @deprecated Deprecated, use `network.peer.port`. + */ + @Deprecated + public static final AttributeKey NET_SOCK_PEER_PORT = longKey("net.sock.peer.port"); + + /** + * Deprecated, use {@code network.transport}. + * + * @deprecated Deprecated, use `network.transport`. + */ + @Deprecated public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); /** * The size of the request payload body in bytes. This is the number of bytes transferred @@ -648,7 +607,8 @@ public final class SemanticAttributes { * failure, 503 Server Unavailable, network issues, or any other). *
    */ - public static final AttributeKey HTTP_RESEND_COUNT = longKey("http.resend_count"); + public static final AttributeKey HTTP_REQUEST_RESEND_COUNT = + longKey("http.request.resend_count"); /** * The size of the response payload body in bytes. This is the number of bytes transferred @@ -664,8 +624,8 @@ public final class SemanticAttributes { longKey("http.response.status_code"); /** - * The matched route (path template in the format used by the respective server framework). See - * note below + * The matched route, that is, the path template in the format used by the respective server + * framework. * *

    Notes: * @@ -679,905 +639,1059 @@ public final class SemanticAttributes { public static final AttributeKey HTTP_ROUTE = stringKey("http.route"); /** - * Server address - domain name if available without reverse DNS lookup, otherwise IP address or - * Unix domain socket name. + * The number of messages sent, received, or processed in the scope of the batching operation. * *

    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. + *
    • Instrumentations SHOULD NOT set {@code messaging.batch.message_count} on spans that + * operate with a single message. When a messaging client library supports both batch and + * single-message API for the same operation, instrumentations SHOULD use {@code + * messaging.batch.message_count} for batching APIs and SHOULD NOT use it for single-message + * APIs. *
    */ - public static final AttributeKey SERVER_ADDRESS = stringKey("server.address"); + public static final AttributeKey MESSAGING_BATCH_MESSAGE_COUNT = + longKey("messaging.batch.message_count"); + + /** A unique identifier for the client that consumes or produces a message. */ + public static final AttributeKey MESSAGING_CLIENT_ID = stringKey("messaging.client_id"); /** - * Server port number. - * - *

    Notes: - * - *

      - *
    • 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. - *
    + * A boolean that is true if the message destination is anonymous (could be unnamed or have + * auto-generated name). */ - 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"); + public static final AttributeKey MESSAGING_DESTINATION_ANONYMOUS = + booleanKey("messaging.destination.anonymous"); /** - * Source address - domain name if available without reverse DNS lookup, otherwise IP address or - * Unix domain socket name. + * The message destination 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. + *
    • Destination name SHOULD uniquely identify a specific queue, topic or other entity within + * the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely + * identify the broker. *
    */ - 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 MESSAGING_DESTINATION_NAME = + stringKey("messaging.destination.name"); /** - * 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). + * Low cardinality representation of the messaging destination name * *

    Notes: * *

      - *
    • This may be different from {@code cloud.resource_id} if an alias is involved. + *
    • Destination names could be constructed from templates. An example would be a destination + * name involving a user name or product id. Although the destination name in this case is + * of high cardinality, the underlying template is of low cardinality and can be effectively + * used for grouping and aggregation. *
    */ - 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"); + public static final AttributeKey MESSAGING_DESTINATION_TEMPLATE = + stringKey("messaging.destination.template"); /** - * The subject - * of the event in the context of the event producer (identified by source). + * A boolean that is true if the message destination is temporary and might not exist anymore + * after messages are processed. */ - public static final AttributeKey CLOUDEVENTS_EVENT_SUBJECT = - stringKey("cloudevents.event_subject"); + public static final AttributeKey MESSAGING_DESTINATION_TEMPORARY = + booleanKey("messaging.destination.temporary"); /** - * The event_type - * contains a value describing the type of event related to the originating occurrence. + * A boolean that is true if the publish message destination is anonymous (could be unnamed or + * have auto-generated name). */ - public static final AttributeKey CLOUDEVENTS_EVENT_TYPE = - stringKey("cloudevents.event_type"); + public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = + booleanKey("messaging.destination_publish.anonymous"); /** - * Parent-child Reference type + * The name of the original destination the message was published to * *

    Notes: * *

      - *
    • The causal relationship between a child Span and a parent Span. + *
    • The name SHOULD uniquely identify a specific queue, topic, or other entity within the + * broker. If the broker doesn't have such notion, the original destination name SHOULD + * uniquely identify the broker. *
    */ - public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); + public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_NAME = + stringKey("messaging.destination_publish.name"); /** - * The connection string used to connect to the database. It is recommended to remove embedded - * credentials. + * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not + * producers. */ - public static final AttributeKey DB_CONNECTION_STRING = stringKey("db.connection_string"); + public static final AttributeKey MESSAGING_KAFKA_CONSUMER_GROUP = + stringKey("messaging.kafka.consumer.group"); - /** - * 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"); + /** Partition the message is sent to. */ + public static final AttributeKey MESSAGING_KAFKA_DESTINATION_PARTITION = + longKey("messaging.kafka.destination.partition"); /** - * 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). + * 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: * *

      - *
    • 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). + *
    • 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 DB_NAME = stringKey("db.name"); + 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"); + + /** A boolean that is true if the message is a tombstone. */ + public static final AttributeKey MESSAGING_KAFKA_MESSAGE_TOMBSTONE = + booleanKey("messaging.kafka.message.tombstone"); /** - * The name of the operation being executed, e.g. the MongoDB command - * name such as {@code findAndModify}, or the SQL keyword. + * The size of the message body in bytes. * *

    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. + *
    • 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 DB_OPERATION = stringKey("db.operation"); - - /** The database statement being executed. */ - public static final AttributeKey DB_STATEMENT = stringKey("db.statement"); + public static final AttributeKey MESSAGING_MESSAGE_BODY_SIZE = + longKey("messaging.message.body.size"); /** - * An identifier for the database management system (DBMS) product being used. See below for a - * list of well-known identifiers. + * The conversation ID identifying the conversation to which the message belongs, represented as a + * string. Sometimes called "Correlation ID". */ - public static final AttributeKey DB_SYSTEM = stringKey("db.system"); - - /** Username for accessing the database. */ - public static final AttributeKey DB_USER = stringKey("db.user"); + public static final AttributeKey MESSAGING_MESSAGE_CONVERSATION_ID = + stringKey("messaging.message.conversation_id"); /** - * The Microsoft SQL Server instance - * name connecting to. This name is used to determine the port of a named instance. + * The size of the message body and metadata in bytes. * *

    Notes: * *

      - *
    • If setting a {@code db.mssql.instance_name}, {@code server.port} is no longer required - * (but still recommended if non-standard). + *
    • 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 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"); + public static final AttributeKey MESSAGING_MESSAGE_ENVELOPE_SIZE = + longKey("messaging.message.envelope.size"); /** - * The number of times a query was speculatively executed. Not set or {@code 0} if the query was - * not executed speculatively. + * A value used by the messaging system as an identifier for the message, represented as a string. */ - public static final AttributeKey DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = - longKey("db.cassandra.speculative_execution_count"); + public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message.id"); /** - * The name of the primary table that the operation is acting upon, including the keyspace name - * (if applicable). + * A string identifying the kind of messaging operation. * *

    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. + *
    • If a custom value is used, it MUST be of low cardinality. *
    */ - public static final AttributeKey DB_CASSANDRA_TABLE = stringKey("db.cassandra.table"); + public static final AttributeKey MESSAGING_OPERATION = stringKey("messaging.operation"); + + /** RabbitMQ message routing key. */ + public static final AttributeKey MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = + stringKey("messaging.rabbitmq.destination.routing_key"); /** - * The index of the database being accessed as used in the {@code SELECT} command, provided as an integer. To - * be used instead of the generic {@code db.name} attribute. + * Name of the RocketMQ producer/consumer group that is handling the message. The client type is + * identified by the SpanKind. */ - public static final AttributeKey DB_REDIS_DATABASE_INDEX = - longKey("db.redis.database_index"); + public static final AttributeKey MESSAGING_ROCKETMQ_CLIENT_GROUP = + stringKey("messaging.rocketmq.client_group"); - /** The collection being accessed within the database stated in {@code db.name}. */ - public static final AttributeKey DB_MONGODB_COLLECTION = - stringKey("db.mongodb.collection"); + /** Model of message consumption. This only applies to consumer spans. */ + public static final AttributeKey MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = + stringKey("messaging.rocketmq.consumption_model"); - /** Represents the identifier of an Elasticsearch cluster. */ - public static final AttributeKey DB_ELASTICSEARCH_CLUSTER_NAME = - stringKey("db.elasticsearch.cluster.name"); + /** 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"); /** - * Represents the human-readable identifier of the node/instance to which a request was routed. + * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. */ - public static final AttributeKey DB_ELASTICSEARCH_NODE_NAME = - stringKey("db.elasticsearch.node.name"); + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = + longKey("messaging.rocketmq.message.delivery_timestamp"); /** - * The name of the primary table that the operation is acting upon, including the database name - * (if applicable). - * - *

    Notes: - * - *

      - *
    • 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. - *
    + * 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. */ - public static final AttributeKey DB_SQL_TABLE = stringKey("db.sql.table"); + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_GROUP = + stringKey("messaging.rocketmq.message.group"); - /** Unique Cosmos client instance id. */ - public static final AttributeKey DB_COSMOSDB_CLIENT_ID = - stringKey("db.cosmosdb.client_id"); + /** 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"); - /** Cosmos client connection mode. */ - public static final AttributeKey DB_COSMOSDB_CONNECTION_MODE = - stringKey("db.cosmosdb.connection_mode"); + /** The secondary classifier of message besides topic. */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TAG = + stringKey("messaging.rocketmq.message.tag"); - /** Cosmos DB container name. */ - public static final AttributeKey DB_COSMOSDB_CONTAINER = - stringKey("db.cosmosdb.container"); + /** Type of message. */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TYPE = + stringKey("messaging.rocketmq.message.type"); - /** CosmosDB Operation Type. */ - public static final AttributeKey DB_COSMOSDB_OPERATION_TYPE = - stringKey("db.cosmosdb.operation_type"); + /** Namespace of RocketMQ resources, resources in different namespaces are individual. */ + public static final AttributeKey MESSAGING_ROCKETMQ_NAMESPACE = + stringKey("messaging.rocketmq.namespace"); - /** RU consumed for that operation */ - public static final AttributeKey DB_COSMOSDB_REQUEST_CHARGE = - doubleKey("db.cosmosdb.request_charge"); + /** A string identifying the messaging system. */ + public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); - /** Request payload size in bytes */ - public static final AttributeKey DB_COSMOSDB_REQUEST_CONTENT_LENGTH = - longKey("db.cosmosdb.request_content_length"); + /** 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"); - /** Cosmos DB status code. */ - public static final AttributeKey DB_COSMOSDB_STATUS_CODE = - longKey("db.cosmosdb.status_code"); + /** The mobile carrier country code. */ + public static final AttributeKey NETWORK_CARRIER_MCC = stringKey("network.carrier.mcc"); - /** Cosmos DB sub status code. */ - public static final AttributeKey DB_COSMOSDB_SUB_STATUS_CODE = - longKey("db.cosmosdb.sub_status_code"); + /** 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"); /** - * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status - * code is UNSET. + * 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 OTEL_STATUS_CODE = stringKey("otel.status_code"); + public static final AttributeKey NETWORK_CONNECTION_SUBTYPE = + stringKey("network.connection.subtype"); - /** Description of the Status if it has a value, otherwise not set. */ - public static final AttributeKey OTEL_STATUS_DESCRIPTION = - stringKey("otel.status_description"); + /** The internet connection type. */ + public static final AttributeKey NETWORK_CONNECTION_TYPE = + stringKey("network.connection.type"); - /** The invocation ID of the current function invocation. */ - public static final AttributeKey FAAS_INVOCATION_ID = stringKey("faas.invocation_id"); + /** Local address of the network connection - IP address or Unix domain socket name. */ + public static final AttributeKey NETWORK_LOCAL_ADDRESS = + stringKey("network.local.address"); - /** - * The name of the source on which the triggering operation was performed. For example, in Cloud - * Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - */ - public static final AttributeKey FAAS_DOCUMENT_COLLECTION = - stringKey("faas.document.collection"); + /** Local port number of the network connection. */ + public static final AttributeKey NETWORK_LOCAL_PORT = longKey("network.local.port"); - /** - * 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"); + /** Peer address of the network connection - IP address or Unix domain socket name. */ + public static final AttributeKey NETWORK_PEER_ADDRESS = stringKey("network.peer.address"); - /** Describes the type of the operation that was performed on the data. */ - public static final AttributeKey FAAS_DOCUMENT_OPERATION = - stringKey("faas.document.operation"); + /** Peer port number of the network connection. */ + public static final AttributeKey NETWORK_PEER_PORT = longKey("network.peer.port"); /** - * A string containing the time when the data was accessed in the ISO 8601 format expressed in - * UTC. + * OSI application layer or non-OSI + * equivalent. + * + *

    Notes: + * + *

      + *
    • The value SHOULD be normalized to lowercase. + *
    */ - public static final AttributeKey FAAS_DOCUMENT_TIME = stringKey("faas.document.time"); + public static final AttributeKey NETWORK_PROTOCOL_NAME = + stringKey("network.protocol.name"); /** - * A string containing the schedule period as Cron - * Expression. + * 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 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 FAAS_CRON = stringKey("faas.cron"); + public static final AttributeKey NETWORK_PROTOCOL_VERSION = + stringKey("network.protocol.version"); /** - * A string containing the function invocation time in the ISO 8601 format expressed in - * UTC. + * OSI transport layer or inter-process communication + * method. + * + *

    Notes: + * + *

      + *
    • 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 FAAS_TIME = stringKey("faas.time"); - - /** - * 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 unique identifier of the feature flag. */ - public static final AttributeKey FEATURE_FLAG_KEY = stringKey("feature_flag.key"); - - /** The name of the service provider that performs the flag evaluation. */ - public static final AttributeKey FEATURE_FLAG_PROVIDER_NAME = - stringKey("feature_flag.provider_name"); + public static final AttributeKey NETWORK_TRANSPORT = stringKey("network.transport"); /** - * SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of - * the value can be used. + * OSI network layer or non-OSI equivalent. * *

    Notes: * *

      - *
    • A semantic identifier, commonly referred to as a variant, provides a means for referring - * to a value without including the value itself. This can provide additional context for - * understanding the meaning behind a value. For example, the variant {@code red} maybe be - * used for the value {@code #c05543}. - *
    • A stringified version of the value can be used in situations where a semantic identifier - * is unavailable. String representation of the value should be determined by the - * implementer. + *
    • The value SHOULD be normalized to lowercase. *
    */ - public static final AttributeKey FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant"); + public static final AttributeKey NETWORK_TYPE = stringKey("network.type"); /** - * The AWS request ID as returned in the response headers {@code x-amz-request-id} or {@code - * x-amz-requestid}. + * The error codes of the Connect + * request. Error codes are always string values. */ - public static final AttributeKey AWS_REQUEST_ID = stringKey("aws.request_id"); - - /** 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"); - - /** The value of the {@code ProvisionedThroughput.WriteCapacityUnits} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = - doubleKey("aws.dynamodb.provisioned_write_capacity"); - - /** 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"); - - /** The JSON-serialized value of each item of the {@code LocalSecondaryIndexes} request field. */ - public static final AttributeKey> AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = - stringArrayKey("aws.dynamodb.local_secondary_indexes"); - - /** The value of the {@code ExclusiveStartTableName} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_EXCLUSIVE_START_TABLE = - stringKey("aws.dynamodb.exclusive_start_table"); - - /** The the number of items in the {@code TableNames} response parameter. */ - public static final AttributeKey AWS_DYNAMODB_TABLE_COUNT = - longKey("aws.dynamodb.table_count"); - - /** The value of the {@code ScanIndexForward} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_SCAN_FORWARD = - booleanKey("aws.dynamodb.scan_forward"); - - /** The value of the {@code Count} response parameter. */ - public static final AttributeKey AWS_DYNAMODB_COUNT = longKey("aws.dynamodb.count"); + public static final AttributeKey RPC_CONNECT_RPC_ERROR_CODE = + stringKey("rpc.connect_rpc.error_code"); - /** The value of the {@code ScannedCount} response parameter. */ - public static final AttributeKey AWS_DYNAMODB_SCANNED_COUNT = - longKey("aws.dynamodb.scanned_count"); + /** + * The numeric status + * code of the gRPC request. + */ + public static final AttributeKey RPC_GRPC_STATUS_CODE = longKey("rpc.grpc.status_code"); - /** The value of the {@code Segment} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_SEGMENT = longKey("aws.dynamodb.segment"); + /** {@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"); - /** The value of the {@code TotalSegments} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_TOTAL_SEGMENTS = - longKey("aws.dynamodb.total_segments"); + /** {@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"); - /** 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"); + /** + * {@code id} property of request or response. Since protocol allows id to be int, string, {@code + * null} or missing (for notifications), value is expected to be cast to string for simplicity. + * Use empty string in case of {@code null} value. Omit entirely if this is a notification. + */ + public static final AttributeKey RPC_JSONRPC_REQUEST_ID = + stringKey("rpc.jsonrpc.request_id"); /** - * The JSON-serialized value of each item in the the {@code GlobalSecondaryIndexUpdates} request - * field. + * Protocol version as in {@code jsonrpc} property of request/response. Since JSON-RPC 1.0 doesn't + * specify this, the value can be omitted. */ - public static final AttributeKey> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = - stringArrayKey("aws.dynamodb.global_secondary_index_updates"); + public static final AttributeKey RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version"); /** - * The S3 bucket name the request refers to. Corresponds to the {@code --bucket} parameter of the - * S3 API - * operations. + * The name of the (logical) method being called, must be equal to the $method part in the span + * name. * *

    Notes: * *

      - *
    • The {@code bucket} attribute is applicable to all S3 operations that reference a bucket, - * i.e. that require the bucket name as a mandatory parameter. This applies to almost all S3 - * operations except {@code list-buckets}. + *
    • 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 AWS_S3_BUCKET = stringKey("aws.s3.bucket"); + public static final AttributeKey RPC_METHOD = stringKey("rpc.method"); /** - * The source object (in the form {@code bucket}/{@code key}) for the copy operation. + * The full (logical) name of the service being called, including its package name, if applicable. * *

    Notes: * *

      - *
    • 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 + *
    • This is the logical name of the service from the RPC interface perspective, which can be + * different from the name of any implementing class. The {@code code.namespace} attribute + * may be used to store the latter (despite the attribute name, it may include a class name; + * e.g., class with method actually executing the call on the server side, RPC client stub + * class on the client side). *
    */ - public static final AttributeKey AWS_S3_COPY_SOURCE = stringKey("aws.s3.copy_source"); + public static final AttributeKey RPC_SERVICE = stringKey("rpc.service"); + + /** A string identifying the remoting system. See below for a list of well-known identifiers. */ + public static final AttributeKey RPC_SYSTEM = stringKey("rpc.system"); + + /** 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 URI fragment component */ + public static final AttributeKey URL_FRAGMENT = stringKey("url.fragment"); /** - * The delete request container that specifies the objects to be deleted. + * Absolute URL describing a network resource according to RFC3986 * *

    Notes: * *

      - *
    • The {@code delete} attribute is only applicable to the delete-object - * operation. The {@code delete} attribute corresponds to the {@code --delete} parameter of - * the delete-objects - * operation within the S3 API. + *
    • For network calls, URL usually has {@code scheme://host[:port][path][?query][#fragment]} + * format, where the fragment is not transmitted over HTTP, but if it is known, it SHOULD be + * included nevertheless. {@code url.full} MUST NOT contain credentials passed via URL in + * form of {@code https://username:password@www.example.com/}. In such case username and + * password SHOULD be redacted and attribute's value SHOULD be {@code + * https://REDACTED:REDACTED@www.example.com/}. {@code url.full} SHOULD capture the absolute + * URL when it is available (or can be reconstructed) and SHOULD NOT be validated or + * modified except for sanitizing purposes. *
    */ - public static final AttributeKey AWS_S3_DELETE = stringKey("aws.s3.delete"); + public static final AttributeKey URL_FULL = stringKey("url.full"); + + /** The URI path component */ + public static final AttributeKey URL_PATH = stringKey("url.path"); /** - * The S3 object key the request refers to. Corresponds to the {@code --key} parameter of the S3 API operations. + * The URI query component * *

    Notes: * *

    */ - public static final AttributeKey AWS_S3_KEY = stringKey("aws.s3.key"); + public static final AttributeKey URL_QUERY = stringKey("url.query"); /** - * The part number of the part being uploaded in a multipart-upload operation. This is a positive - * integer between 1 and 10,000. + * 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"); + + /** + * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix + * domain socket name. * *

    Notes: * *

      - *
    • The {@code part_number} attribute is only applicable to the upload-part - * and upload-part-copy - * operations. The {@code part_number} attribute corresponds to the {@code --part-number} - * parameter of the upload-part - * operation within the S3 API. + *
    • When observed from the client side, and when communicating through an intermediary, + * {@code server.address} SHOULD represent the server address behind any intermediaries, for + * example proxies, if it's available. *
    */ - public static final AttributeKey AWS_S3_PART_NUMBER = longKey("aws.s3.part_number"); + public static final AttributeKey SERVER_ADDRESS = stringKey("server.address"); /** - * Upload ID that identifies the multipart upload. + * Server port number. * *

    Notes: * *

      - *
    • The {@code upload_id} attribute applies to S3 multipart-upload operations and corresponds - * to the {@code --upload-id} parameter of the S3 API - * multipart operations. This applies in particular to the following operations: - *
    • abort-multipart-upload - *
    • complete-multipart-upload - *
    • list-parts - *
    • upload-part - *
    • upload-part-copy + *
    • When observed from the client side, and when communicating through an intermediary, + * {@code server.port} SHOULD represent the server port behind any intermediaries, for + * example proxies, if it's available. *
    */ - public static final AttributeKey AWS_S3_UPLOAD_ID = stringKey("aws.s3.upload_id"); + 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"); + + /** The previous {@code session.id} for this user, when known. */ + public static final AttributeKey SESSION_PREVIOUS_ID = stringKey("session.previous_id"); /** - * The GraphQL document being executed. + * Source address - domain name if available without reverse DNS lookup; otherwise, IP address or + * Unix domain socket name. * *

    Notes: * *

      - *
    • The value may be sanitized to exclude sensitive information. + *
    • When observed from the destination side, and when communicating through an intermediary, + * {@code source.address} SHOULD represent the source address behind any intermediaries, for + * example proxies, if it's available. *
    */ - public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); - - /** The name of the operation being executed. */ - public static final AttributeKey GRAPHQL_OPERATION_NAME = - stringKey("graphql.operation.name"); + public static final AttributeKey SOURCE_ADDRESS = stringKey("source.address"); - /** The type of the operation being executed. */ - public static final AttributeKey GRAPHQL_OPERATION_TYPE = - stringKey("graphql.operation.type"); + /** Source port number */ + public static final AttributeKey SOURCE_PORT = longKey("source.port"); /** - * The size of the message body in bytes. + * 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 can refer to both the compressed or uncompressed body size. If both sizes are known, - * the uncompressed body size should be used. + *
    • This may be different from {@code cloud.resource_id} if an alias is involved. *
    */ - public static final AttributeKey MESSAGING_MESSAGE_BODY_SIZE = - longKey("messaging.message.body.size"); + public static final AttributeKey AWS_LAMBDA_INVOKED_ARN = + stringKey("aws.lambda.invoked_arn"); /** - * The conversation ID identifying the conversation to which the - * message belongs, represented as a string. Sometimes called "Correlation ID". + * The event_id + * uniquely identifies the event. */ - public static final AttributeKey MESSAGING_MESSAGE_CONVERSATION_ID = - stringKey("messaging.message.conversation_id"); + public static final AttributeKey CLOUDEVENTS_EVENT_ID = stringKey("cloudevents.event_id"); /** - * 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. - *
    + * The source + * identifies the context in which an event happened. */ - public static final AttributeKey MESSAGING_MESSAGE_ENVELOPE_SIZE = - longKey("messaging.message.envelope.size"); + public static final AttributeKey CLOUDEVENTS_EVENT_SOURCE = + stringKey("cloudevents.event_source"); /** - * A value used by the messaging system as an identifier for the message, represented as a string. + * The version + * of the CloudEvents specification which the event uses. */ - public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message.id"); + public static final AttributeKey CLOUDEVENTS_EVENT_SPEC_VERSION = + stringKey("cloudevents.event_spec_version"); /** - * A boolean that is true if the message destination is anonymous (could be unnamed or have - * auto-generated name). + * The subject + * of the event in the context of the event producer (identified by source). */ - public static final AttributeKey MESSAGING_DESTINATION_ANONYMOUS = - booleanKey("messaging.destination.anonymous"); + public static final AttributeKey CLOUDEVENTS_EVENT_SUBJECT = + stringKey("cloudevents.event_subject"); /** - * The message destination name - * - *

    Notes: - * - *

      - *
    • Destination name SHOULD uniquely identify a specific queue, topic or other entity within - * the broker. If the broker does not have such notion, the destination name SHOULD uniquely - * identify the broker. - *
    + * The event_type + * contains a value describing the type of event related to the originating occurrence. */ - public static final AttributeKey MESSAGING_DESTINATION_NAME = - stringKey("messaging.destination.name"); + public static final AttributeKey CLOUDEVENTS_EVENT_TYPE = + stringKey("cloudevents.event_type"); /** - * Low cardinality representation of the messaging destination name + * Parent-child Reference type * *

    Notes: * *

      - *
    • Destination names could be constructed from templates. An example would be a destination - * name involving a user name or product id. Although the destination name in this case is - * of high cardinality, the underlying template is of low cardinality and can be effectively - * used for grouping and aggregation. + *
    • The causal relationship between a child Span and a parent Span. *
    */ - public static final AttributeKey MESSAGING_DESTINATION_TEMPLATE = - stringKey("messaging.destination.template"); + public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); /** - * A boolean that is true if the message destination is temporary and might not exist anymore - * after messages are processed. + * The connection string used to connect to the database. It is recommended to remove embedded + * credentials. */ - public static final AttributeKey MESSAGING_DESTINATION_TEMPORARY = - booleanKey("messaging.destination.temporary"); + public static final AttributeKey DB_CONNECTION_STRING = stringKey("db.connection_string"); /** - * A boolean that is true if the publish message destination is anonymous (could be unnamed or - * have auto-generated name). + * The fully-qualified class name of the Java Database Connectivity + * (JDBC) driver used to connect. */ - public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = - booleanKey("messaging.destination_publish.anonymous"); + public static final AttributeKey DB_JDBC_DRIVER_CLASSNAME = + stringKey("db.jdbc.driver_classname"); /** - * The name of the original destination the message was published to + * 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: * *

      - *
    • 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. + *
    • 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 MESSAGING_DESTINATION_PUBLISH_NAME = - stringKey("messaging.destination_publish.name"); + public static final AttributeKey DB_NAME = stringKey("db.name"); /** - * The number of messages sent, received, or processed in the scope of the batching operation. + * The name of the operation being executed, e.g. the MongoDB command + * name such as {@code findAndModify}, or the SQL keyword. * *

    Notes: * *

      - *
    • Instrumentations SHOULD NOT set {@code messaging.batch.message_count} on spans that - * operate with a single message. When a messaging client library supports both batch and - * single-message API for the same operation, instrumentations SHOULD use {@code - * messaging.batch.message_count} for batching APIs and SHOULD NOT use it for single-message - * APIs. + *
    • 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 MESSAGING_BATCH_MESSAGE_COUNT = - longKey("messaging.batch.message_count"); + public static final AttributeKey DB_OPERATION = stringKey("db.operation"); - /** A unique identifier for the client that consumes or produces a message. */ - public static final AttributeKey MESSAGING_CLIENT_ID = stringKey("messaging.client_id"); + /** The database statement being executed. */ + public static final AttributeKey DB_STATEMENT = stringKey("db.statement"); /** - * A string identifying the kind of messaging operation as defined in the Operation names section above. + * 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 a custom value is used, it MUST be of low cardinality. + *
    • 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 MESSAGING_OPERATION = stringKey("messaging.operation"); + public static final AttributeKey DB_MSSQL_INSTANCE_NAME = + stringKey("db.mssql.instance_name"); - /** A string identifying the messaging system. */ - public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); + /** + * 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"); - /** RabbitMQ message routing key. */ - public static final AttributeKey MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = - stringKey("messaging.rabbitmq.destination.routing_key"); + /** 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"); /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not - * producers. + * The number of times a query was speculatively executed. Not set or {@code 0} if the query was + * not executed speculatively. */ - public static final AttributeKey MESSAGING_KAFKA_CONSUMER_GROUP = - stringKey("messaging.kafka.consumer.group"); - - /** Partition the message is sent to. */ - public static final AttributeKey MESSAGING_KAFKA_DESTINATION_PARTITION = - longKey("messaging.kafka.destination.partition"); + public static final AttributeKey DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = + longKey("db.cassandra.speculative_execution_count"); /** - * 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. + * The name of the primary table that the operation is acting upon, including the keyspace name + * (if applicable). * *

    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. + *
    • 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 MESSAGING_KAFKA_MESSAGE_KEY = - stringKey("messaging.kafka.message.key"); + public static final AttributeKey DB_CASSANDRA_TABLE = stringKey("db.cassandra.table"); - /** The offset of a record in the corresponding Kafka partition. */ - public static final AttributeKey MESSAGING_KAFKA_MESSAGE_OFFSET = - longKey("messaging.kafka.message.offset"); + /** + * The index of the database being accessed as used in the {@code SELECT} command, provided as an integer. To + * be used instead of the generic {@code db.name} attribute. + */ + public static final AttributeKey DB_REDIS_DATABASE_INDEX = + longKey("db.redis.database_index"); - /** A boolean that is true if the message is a tombstone. */ - public static final AttributeKey MESSAGING_KAFKA_MESSAGE_TOMBSTONE = - booleanKey("messaging.kafka.message.tombstone"); + /** The collection being accessed within the database stated in {@code db.name}. */ + public static final AttributeKey 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"); /** - * Name of the RocketMQ producer/consumer group that is handling the message. The client type is - * identified by the SpanKind. + * Represents the human-readable identifier of the node/instance to which a request was routed. */ - public static final AttributeKey MESSAGING_ROCKETMQ_CLIENT_GROUP = - stringKey("messaging.rocketmq.client_group"); + public static final AttributeKey DB_ELASTICSEARCH_NODE_NAME = + stringKey("db.elasticsearch.node.name"); - /** Model of message consumption. This only applies to consumer spans. */ - public static final AttributeKey MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = - stringKey("messaging.rocketmq.consumption_model"); + /** + * The name of the primary table that the operation is acting upon, including the database name + * (if applicable). + * + *

    Notes: + * + *

      + *
    • 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_SQL_TABLE = stringKey("db.sql.table"); - /** 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"); + /** Unique Cosmos client instance id. */ + public static final AttributeKey DB_COSMOSDB_CLIENT_ID = + stringKey("db.cosmosdb.client_id"); + + /** Cosmos client connection mode. */ + public static final AttributeKey DB_COSMOSDB_CONNECTION_MODE = + stringKey("db.cosmosdb.connection_mode"); + + /** Cosmos DB container name. */ + 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"); + + /** Cosmos DB status code. */ + public static final AttributeKey DB_COSMOSDB_STATUS_CODE = + longKey("db.cosmosdb.status_code"); + + /** Cosmos DB sub status code. */ + public static final AttributeKey DB_COSMOSDB_SUB_STATUS_CODE = + longKey("db.cosmosdb.sub_status_code"); /** - * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. + * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status + * code is UNSET. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = - longKey("messaging.rocketmq.message.delivery_timestamp"); + public static final AttributeKey OTEL_STATUS_CODE = stringKey("otel.status_code"); + + /** Description of the Status if it has a value, otherwise not set. */ + public static final AttributeKey OTEL_STATUS_DESCRIPTION = + stringKey("otel.status_description"); + + /** The invocation ID of the current function invocation. */ + public static final AttributeKey FAAS_INVOCATION_ID = stringKey("faas.invocation_id"); /** - * 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. + * The name of the source on which the triggering operation was performed. For example, in Cloud + * Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_GROUP = - stringKey("messaging.rocketmq.message.group"); + public static final AttributeKey FAAS_DOCUMENT_COLLECTION = + stringKey("faas.document.collection"); - /** 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 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"); - /** The secondary classifier of message besides topic. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TAG = - stringKey("messaging.rocketmq.message.tag"); + /** Describes the type of the operation that was performed on the data. */ + public static final AttributeKey FAAS_DOCUMENT_OPERATION = + stringKey("faas.document.operation"); - /** Type of message. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TYPE = - stringKey("messaging.rocketmq.message.type"); + /** + * A string containing the time when the data was accessed in the ISO 8601 format expressed in + * UTC. + */ + public static final AttributeKey FAAS_DOCUMENT_TIME = stringKey("faas.document.time"); - /** Namespace of RocketMQ resources, resources in different namespaces are individual. */ - public static final AttributeKey MESSAGING_ROCKETMQ_NAMESPACE = - stringKey("messaging.rocketmq.namespace"); + /** + * A string containing the schedule period as Cron + * Expression. + */ + public static final AttributeKey FAAS_CRON = stringKey("faas.cron"); + + /** + * A string containing the function invocation time in the ISO 8601 format expressed in + * UTC. + */ + public static final AttributeKey FAAS_TIME = stringKey("faas.time"); + + /** + * 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 unique identifier of the feature flag. */ + public static final AttributeKey FEATURE_FLAG_KEY = stringKey("feature_flag.key"); + + /** The name of the service provider that performs the flag evaluation. */ + public static final AttributeKey FEATURE_FLAG_PROVIDER_NAME = + stringKey("feature_flag.provider_name"); + + /** + * SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of + * the value can be used. + * + *

    Notes: + * + *

      + *
    • A semantic identifier, commonly referred to as a variant, provides a means for referring + * to a value without including the value itself. This can provide additional context for + * understanding the meaning behind a value. For example, the variant {@code red} maybe be + * used for the value {@code #c05543}. + *
    • A stringified version of the value can be used in situations where a semantic identifier + * is unavailable. String representation of the value should be determined by the + * implementer. + *
    + */ + public static final AttributeKey FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant"); + + /** + * 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 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"); + + /** The value of the {@code ProvisionedThroughput.WriteCapacityUnits} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = + doubleKey("aws.dynamodb.provisioned_write_capacity"); + + /** 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"); + + /** The JSON-serialized value of each item of the {@code LocalSecondaryIndexes} request field. */ + public static final AttributeKey> AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = + stringArrayKey("aws.dynamodb.local_secondary_indexes"); + + /** The value of the {@code ExclusiveStartTableName} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_EXCLUSIVE_START_TABLE = + stringKey("aws.dynamodb.exclusive_start_table"); + + /** The the number of items in the {@code TableNames} response parameter. */ + public static final AttributeKey AWS_DYNAMODB_TABLE_COUNT = + longKey("aws.dynamodb.table_count"); + + /** The value of the {@code ScanIndexForward} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_SCAN_FORWARD = + booleanKey("aws.dynamodb.scan_forward"); + + /** The value of the {@code Count} response parameter. */ + public static final AttributeKey AWS_DYNAMODB_COUNT = longKey("aws.dynamodb.count"); + + /** The value of the {@code ScannedCount} response parameter. */ + 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"); + + /** + * The JSON-serialized value of each item in the the {@code GlobalSecondaryIndexUpdates} request + * field. + */ + public static final AttributeKey> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = + stringArrayKey("aws.dynamodb.global_secondary_index_updates"); + + /** + * The S3 bucket name the request refers to. Corresponds to the {@code --bucket} parameter of the + * S3 API + * operations. + * + *

    Notes: + * + *

      + *
    • The {@code bucket} attribute is applicable to all S3 operations that reference a bucket, + * i.e. that require the bucket name as a mandatory parameter. This applies to almost all S3 + * operations except {@code list-buckets}. + *
    + */ + public static final AttributeKey AWS_S3_BUCKET = stringKey("aws.s3.bucket"); + + /** + * The source object (in the form {@code bucket}/{@code key}) for the copy operation. + * + *

    Notes: + * + *

    + */ + 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: + * + *

    + */ + public static final AttributeKey AWS_S3_KEY = stringKey("aws.s3.key"); /** - * The name of the (logical) method being called, must be equal to the $method part in the span - * name. + * The part number of the part being uploaded in a multipart-upload operation. This is a positive + * integer between 1 and 10,000. * *

    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). + *
    • The {@code part_number} attribute is only applicable to the upload-part + * and upload-part-copy + * operations. The {@code part_number} attribute corresponds to the {@code --part-number} + * parameter of the upload-part + * operation within the S3 API. *
    */ - public static final AttributeKey RPC_METHOD = stringKey("rpc.method"); + public static final AttributeKey AWS_S3_PART_NUMBER = longKey("aws.s3.part_number"); /** - * The full (logical) name of the service being called, including its package name, if applicable. + * Upload ID that identifies the multipart upload. * *

    Notes: * *

      - *
    • This is the logical name of the service from the RPC interface perspective, which can be - * different from the name of any implementing class. The {@code code.namespace} attribute - * may be used to store the latter (despite the attribute name, it may include a class name; - * e.g., class with method actually executing the call on the server side, RPC client stub - * class on the client side). + *
    • The {@code upload_id} attribute applies to S3 multipart-upload operations and corresponds + * to the {@code --upload-id} parameter of the S3 API + * multipart operations. This applies in particular to the following operations: + *
    • abort-multipart-upload + *
    • complete-multipart-upload + *
    • list-parts + *
    • upload-part + *
    • upload-part-copy *
    */ - public static final AttributeKey RPC_SERVICE = stringKey("rpc.service"); - - /** A string identifying the remoting system. See below for a list of well-known identifiers. */ - public static final AttributeKey RPC_SYSTEM = stringKey("rpc.system"); + public static final AttributeKey AWS_S3_UPLOAD_ID = stringKey("aws.s3.upload_id"); /** - * The numeric status - * code of the gRPC request. + * The GraphQL document being executed. + * + *

    Notes: + * + *

      + *
    • The value may be sanitized to exclude sensitive information. + *
    */ - public static final AttributeKey RPC_GRPC_STATUS_CODE = longKey("rpc.grpc.status_code"); - - /** {@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"); + public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); - /** - * {@code id} property of request or response. Since protocol allows id to be int, string, {@code - * null} or missing (for notifications), value is expected to be cast to string for simplicity. - * Use empty string in case of {@code null} value. Omit entirely if this is a notification. - */ - public static final AttributeKey RPC_JSONRPC_REQUEST_ID = - stringKey("rpc.jsonrpc.request_id"); + /** The name of the operation being executed. */ + public static final AttributeKey GRAPHQL_OPERATION_NAME = + stringKey("graphql.operation.name"); - /** - * 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"); + /** The type of the operation being executed. */ + public static final AttributeKey GRAPHQL_OPERATION_TYPE = + stringKey("graphql.operation.type"); /** Compressed size of the message in bytes. */ public static final AttributeKey MESSAGE_COMPRESSED_SIZE = @@ -1603,13 +1717,6 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGE_UNCOMPRESSED_SIZE = longKey("message.uncompressed_size"); - /** - * The error codes of the Connect - * request. Error codes are always string values. - */ - public static final AttributeKey RPC_CONNECT_RPC_ERROR_CODE = - stringKey("rpc.connect_rpc.error_code"); - /** * SHOULD be set to true if the exception event is recorded at a point where it is known that the * exception is escaping the scope of the span. @@ -1633,66 +1740,9 @@ public final class SemanticAttributes { */ public static final AttributeKey EXCEPTION_ESCAPED = booleanKey("exception.escaped"); - /** The URI fragment component */ - public static final AttributeKey URL_FRAGMENT = stringKey("url.fragment"); - - /** - * Absolute URL describing a network resource according to RFC3986 - * - *

    Notes: - * - *

      - *
    • For network calls, URL usually has {@code scheme://host[:port][path][?query][#fragment]} - * format, where the fragment is not transmitted over HTTP, but if it is known, it should be - * included nevertheless. {@code url.full} MUST NOT contain credentials passed via URL in - * form of {@code https://username:password@www.example.com/}. In such case username and - * password should be redacted and attribute's value should be {@code - * https://REDACTED:REDACTED@www.example.com/}. {@code url.full} SHOULD capture the absolute - * URL when it is available (or can be reconstructed) and SHOULD NOT be validated or - * modified except for sanitizing purposes. - *
    - */ - public static final AttributeKey URL_FULL = stringKey("url.full"); - - /** - * The URI path component - * - *

    Notes: - * - *

      - *
    • When missing, the value is assumed to be {@code /} - *
    - */ - public static final AttributeKey URL_PATH = stringKey("url.path"); - - /** - * The URI query component - * - *

    Notes: - * - *

      - *
    • Sensitive content provided in query string SHOULD be scrubbed when instrumentations can - * identify it. - *
    - */ - public static final AttributeKey URL_QUERY = stringKey("url.query"); - - /** - * 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"); - /** - * HTTP request headers, {@code } being the normalized HTTP Header name (lowercase, with - * {@code -} characters replaced by {@code _}), the value being the header values. + * HTTP request headers, {@code } being the normalized HTTP Header name (lowercase), the + * value being the header values. * *

    Notes: * @@ -1711,8 +1761,8 @@ public final class SemanticAttributes { stringArrayKeyTemplate("http.request.header"); /** - * HTTP response headers, {@code } being the normalized HTTP Header name (lowercase, with - * {@code -} characters replaced by {@code _}), the value being the header values. + * HTTP response headers, {@code } being the normalized HTTP Header name (lowercase), the + * value being the header values. * *

    Notes: * @@ -1730,118 +1780,85 @@ public final class SemanticAttributes { stringArrayKeyTemplate("http.response.header"); /** - * A dynamic value in the url path. + * Connect request metadata, {@code } being the normalized Connect Metadata key (lowercase), + * the value being the metadata values. * *

    Notes: * *

      - *
    • Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span - * attributes in the format {@code db.elasticsearch.path_parts.}, where {@code } - * is the url path part name. The implementation SHOULD reference the elasticsearch - * schema in order to map the path part values to their names. + *
    • Instrumentations SHOULD require an explicit configuration of which metadata values are to + * be captured. Including all request metadata values can be a security risk - explicit + * configuration helps avoid leaking sensitive information. *
    */ - public static final AttributeKeyTemplate DB_ELASTICSEARCH_PATH_PARTS = - stringKeyTemplate("db.elasticsearch.path_parts"); + public static final AttributeKeyTemplate> RPC_CONNECT_RPC_REQUEST_METADATA = + stringArrayKeyTemplate("rpc.connect_rpc.request.metadata"); /** - * gRPC request metadata, {@code } being the normalized gRPC Metadata key (lowercase, with - * {@code -} characters replaced by {@code _}), the value being the metadata values. + * Connect response metadata, {@code } being the normalized Connect Metadata key (lowercase), + * the value being the metadata values. * *

    Notes: * *

      *
    • Instrumentations SHOULD require an explicit configuration of which metadata values are to - * be captured. Including all request metadata values can be a security risk - explicit + * be captured. Including all response metadata values can be a security risk - explicit * configuration helps avoid leaking sensitive information. *
    */ - public static final AttributeKeyTemplate> RPC_GRPC_REQUEST_METADATA = - stringArrayKeyTemplate("rpc.grpc.request.metadata"); + public static final AttributeKeyTemplate> RPC_CONNECT_RPC_RESPONSE_METADATA = + stringArrayKeyTemplate("rpc.connect_rpc.response.metadata"); /** - * gRPC response metadata, {@code } being the normalized gRPC Metadata key (lowercase, with - * {@code -} characters replaced by {@code _}), the value being the metadata values. + * gRPC request metadata, {@code } being the normalized gRPC Metadata key (lowercase), the + * value being the metadata values. * *

    Notes: * *

      *
    • Instrumentations SHOULD require an explicit configuration of which metadata values are to - * be captured. Including all response metadata values can be a security risk - explicit + * be captured. Including all request metadata values can be a security risk - explicit * configuration helps avoid leaking sensitive information. *
    */ - public static final AttributeKeyTemplate> RPC_GRPC_RESPONSE_METADATA = - stringArrayKeyTemplate("rpc.grpc.response.metadata"); + public static final AttributeKeyTemplate> RPC_GRPC_REQUEST_METADATA = + stringArrayKeyTemplate("rpc.grpc.request.metadata"); /** - * Connect request metadata, {@code } being the normalized Connect Metadata key (lowercase, - * with {@code -} characters replaced by {@code _}), the value being the metadata values. + * gRPC response metadata, {@code } being the normalized gRPC Metadata key (lowercase), the + * value being the metadata values. * *

    Notes: * *

      *
    • Instrumentations SHOULD require an explicit configuration of which metadata values are to - * be captured. Including all request metadata values can be a security risk - explicit + * be captured. Including all response metadata values can be a security risk - explicit * configuration helps avoid leaking sensitive information. *
    */ - public static final AttributeKeyTemplate> RPC_CONNECT_RPC_REQUEST_METADATA = - stringArrayKeyTemplate("rpc.connect_rpc.request.metadata"); + public static final AttributeKeyTemplate> RPC_GRPC_RESPONSE_METADATA = + stringArrayKeyTemplate("rpc.grpc.response.metadata"); /** - * Connect response metadata, {@code } being the normalized Connect Metadata key (lowercase, - * with {@code -} characters replaced by {@code _}), the value being the metadata values. + * A dynamic value in the url path. * *

    Notes: * *

      - *
    • Instrumentations SHOULD require an explicit configuration of which metadata values are to - * be captured. Including all response metadata values can be a security risk - explicit - * configuration helps avoid leaking sensitive information. + *
    • Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span + * attributes in the format {@code db.elasticsearch.path_parts.}, where {@code } + * is the url path part name. The implementation SHOULD reference the elasticsearch + * schema in order to map the path part values to their names. *
    */ - public static final AttributeKeyTemplate> RPC_CONNECT_RPC_RESPONSE_METADATA = - stringArrayKeyTemplate("rpc.connect_rpc.response.metadata"); + public static final AttributeKeyTemplate DB_ELASTICSEARCH_PATH_PARTS = + stringKeyTemplate("db.elasticsearch.path_parts"); // 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. + * A fallback error value to be used when the instrumentation doesn't define a custom value. */ public static final String OTHER = "_OTHER"; @@ -1903,10 +1920,63 @@ 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"; + /** Events from stderr stream. */ + public static final String STDERR = "stderr"; + + private LogIostreamValues() {} + } + + public static final class IosStateValues { + /** + * The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`. + */ + public static final String ACTIVE = "active"; + + /** + * The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`. + */ + public static final String INACTIVE = "inactive"; + + /** + * The app is now in the background. This value is associated with UIKit notification + * `applicationDidEnterBackground`. + */ + public static final String BACKGROUND = "background"; + + /** + * The app is now in the foreground. This value is associated with UIKit notification + * `applicationWillEnterForeground`. + */ + public static final String FOREGROUND = "foreground"; + + /** + * The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`. + */ + public static final String TERMINATE = "terminate"; + + private IosStateValues() {} + } + + public static final class AndroidStateValues { + /** + * Any time before Activity.onResume() or, if the app has no Activity, Context.startService() + * has been called in the app for the first time. + */ + public static final String CREATED = "created"; + + /** + * Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has + * been called when the app was in the foreground state. + */ + public static final String BACKGROUND = "background"; + + /** + * Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has + * been called when the app was in either the created or background states. + */ + public static final String FOREGROUND = "foreground"; - private LogIostreamValues() {} + private AndroidStateValues() {} } public static final class StateValues { @@ -1929,6 +1999,34 @@ public static final class JvmMemoryTypeValues { private JvmMemoryTypeValues() {} } + public static final class JvmThreadStateValues { + /** A thread that has not yet started is in this state. */ + public static final String NEW = "new"; + + /** A thread executing in the Java virtual machine is in this state. */ + public static final String RUNNABLE = "runnable"; + + /** A thread that is blocked waiting for a monitor lock is in this state. */ + public static final String BLOCKED = "blocked"; + + /** + * A thread that is waiting indefinitely for another thread to perform a particular action is in + * this state. + */ + public static final String WAITING = "waiting"; + + /** + * A thread that is waiting for another thread to perform an action for up to a specified + * waiting time is in this state. + */ + public static final String TIMED_WAITING = "timed_waiting"; + + /** A thread that has exited is in this state. */ + public static final String TERMINATED = "terminated"; + + private JvmThreadStateValues() {} + } + public static final class SystemCpuStateValues { /** user. */ public static final String USER = "user"; @@ -1955,9 +2053,6 @@ private SystemCpuStateValues() {} } public static final class SystemMemoryStateValues { - /** total. */ - public static final String TOTAL = "total"; - /** used. */ public static final String USED = "used"; @@ -1973,6 +2068,13 @@ public static final class SystemMemoryStateValues { /** cached. */ public static final String CACHED = "cached"; + /** + * total. + * + * @deprecated this value has been removed as of 1.23.1 of the semantic conventions. + */ + @Deprecated public static final String TOTAL = "total"; + private SystemMemoryStateValues() {} } @@ -2117,30 +2219,132 @@ public static final class SystemProcessesStatusValues { private SystemProcessesStatusValues() {} } - public static final class NetworkTransportValues { - /** TCP. */ - public static final String TCP = "tcp"; + public static final class NetSockFamilyValues { + /** IPv4 address. */ + public static final String INET = "inet"; - /** UDP. */ - public static final String UDP = "udp"; + /** 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. See note below. */ + /** Named or anonymous pipe. */ public static final String PIPE = "pipe"; - /** Unix domain socket. */ - public static final String UNIX = "unix"; + /** In-process communication. */ + public static final String INPROC = "inproc"; - private NetworkTransportValues() {} + /** Something else (non IP-based). */ + public static final String OTHER = "other"; + + private NetTransportValues() {} } - public static final class NetworkTypeValues { - /** IPv4. */ - public static final String IPV4 = "ipv4"; + public static final class HttpRequestMethodValues { + /** CONNECT method. */ + public static final String CONNECT = "CONNECT"; - /** IPv6. */ - public static final String IPV6 = "ipv6"; + /** DELETE method. */ + public static final String DELETE = "DELETE"; - private NetworkTypeValues() {} + /** GET method. */ + public static final String GET = "GET"; + + /** HEAD method. */ + public static final String HEAD = "HEAD"; + + /** OPTIONS method. */ + public static final String OPTIONS = "OPTIONS"; + + /** PATCH method. */ + public static final String PATCH = "PATCH"; + + /** POST method. */ + public static final String POST = "POST"; + + /** PUT method. */ + public static final String PUT = "PUT"; + + /** TRACE method. */ + public static final String TRACE = "TRACE"; + + /** Any HTTP method that the instrumentation has no prior knowledge of. */ + public static final String OTHER = "_OTHER"; + + private HttpRequestMethodValues() {} + } + + public static final class MessagingOperationValues { + /** + * One or more messages are provided for publishing to an intermediary. If a single message is + * published, the context of the "Publish" span can be used as the creation context and + * no "Create" span needs to be created. + */ + public static final String PUBLISH = "publish"; + + /** + * A message is created. "Create" spans always refer to a single message and are used to + * provide a unique creation context for messages in batch publishing scenarios. + */ + public static final String CREATE = "create"; + + /** + * One or more messages are requested by a consumer. This operation refers to pull-based + * scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. + */ + public static final String RECEIVE = "receive"; + + /** + * One or more messages are passed to a consumer. This operation refers to push-based scenarios, + * where consumer register callbacks which get called by messaging SDKs. + */ + public static final String DELIVER = "deliver"; + + /** + * process. + * + * @deprecated this value has been removed as of 1.23.1 of the semantic conventions. + */ + @Deprecated public static final String PROCESS = "process"; + + 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"; + + /** FIFO message. */ + public static final String FIFO = "fifo"; + + /** Delay message. */ + public static final String DELAY = "delay"; + + /** Transaction message. */ + public static final String TRANSACTION = "transaction"; + + private MessagingRocketmqMessageTypeValues() {} } public static final class NetworkConnectionSubtypeValues { @@ -2207,67 +2411,185 @@ public static final class NetworkConnectionSubtypeValues { /** LTE CA. */ public static final String LTE_CA = "lte_ca"; - private NetworkConnectionSubtypeValues() {} - } + private NetworkConnectionSubtypeValues() {} + } + + public static final class NetworkConnectionTypeValues { + /** wifi. */ + public static final String WIFI = "wifi"; + + /** wired. */ + public static final String WIRED = "wired"; + + /** cell. */ + public static final String CELL = "cell"; + + /** unavailable. */ + public static final String UNAVAILABLE = "unavailable"; + + /** unknown. */ + public static final String UNKNOWN = "unknown"; + + private NetworkConnectionTypeValues() {} + } + + public static final class NetworkTransportValues { + /** TCP. */ + public static final String TCP = "tcp"; + + /** UDP. */ + public static final String UDP = "udp"; + + /** Named or anonymous pipe. */ + 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 RpcConnectRpcErrorCodeValues { + /** cancelled. */ + public static final String CANCELLED = "cancelled"; + + /** unknown. */ + public static final String UNKNOWN = "unknown"; + + /** invalid_argument. */ + public static final String INVALID_ARGUMENT = "invalid_argument"; + + /** deadline_exceeded. */ + public static final String DEADLINE_EXCEEDED = "deadline_exceeded"; + + /** not_found. */ + public static final String NOT_FOUND = "not_found"; + + /** already_exists. */ + public static final String ALREADY_EXISTS = "already_exists"; + + /** permission_denied. */ + public static final String PERMISSION_DENIED = "permission_denied"; + + /** resource_exhausted. */ + public static final String RESOURCE_EXHAUSTED = "resource_exhausted"; + + /** failed_precondition. */ + public static final String FAILED_PRECONDITION = "failed_precondition"; + + /** aborted. */ + public static final String ABORTED = "aborted"; + + /** out_of_range. */ + public static final String OUT_OF_RANGE = "out_of_range"; + + /** unimplemented. */ + public static final String UNIMPLEMENTED = "unimplemented"; + + /** internal. */ + public static final String INTERNAL = "internal"; + + /** unavailable. */ + public static final String UNAVAILABLE = "unavailable"; + + /** data_loss. */ + public static final String DATA_LOSS = "data_loss"; + + /** unauthenticated. */ + public static final String UNAUTHENTICATED = "unauthenticated"; + + private RpcConnectRpcErrorCodeValues() {} + } + + public static final class RpcGrpcStatusCodeValues { + /** OK. */ + public static final long OK = 0; + + /** CANCELLED. */ + public static final long CANCELLED = 1; + + /** UNKNOWN. */ + public static final long UNKNOWN = 2; + + /** INVALID_ARGUMENT. */ + public static final long INVALID_ARGUMENT = 3; + + /** DEADLINE_EXCEEDED. */ + public static final long DEADLINE_EXCEEDED = 4; + + /** NOT_FOUND. */ + public static final long NOT_FOUND = 5; + + /** ALREADY_EXISTS. */ + public static final long ALREADY_EXISTS = 6; - public static final class NetworkConnectionTypeValues { - /** wifi. */ - public static final String WIFI = "wifi"; + /** PERMISSION_DENIED. */ + public static final long PERMISSION_DENIED = 7; - /** wired. */ - public static final String WIRED = "wired"; + /** RESOURCE_EXHAUSTED. */ + public static final long RESOURCE_EXHAUSTED = 8; - /** cell. */ - public static final String CELL = "cell"; + /** FAILED_PRECONDITION. */ + public static final long FAILED_PRECONDITION = 9; - /** unavailable. */ - public static final String UNAVAILABLE = "unavailable"; + /** ABORTED. */ + public static final long ABORTED = 10; - /** unknown. */ - public static final String UNKNOWN = "unknown"; + /** OUT_OF_RANGE. */ + public static final long OUT_OF_RANGE = 11; - private NetworkConnectionTypeValues() {} - } + /** UNIMPLEMENTED. */ + public static final long UNIMPLEMENTED = 12; - public static final class HttpRequestMethodValues { - /** CONNECT method. */ - public static final String CONNECT = "CONNECT"; + /** INTERNAL. */ + public static final long INTERNAL = 13; - /** DELETE method. */ - public static final String DELETE = "DELETE"; + /** UNAVAILABLE. */ + public static final long UNAVAILABLE = 14; - /** GET method. */ - public static final String GET = "GET"; + /** DATA_LOSS. */ + public static final long DATA_LOSS = 15; - /** HEAD method. */ - public static final String HEAD = "HEAD"; + /** UNAUTHENTICATED. */ + public static final long UNAUTHENTICATED = 16; - /** OPTIONS method. */ - public static final String OPTIONS = "OPTIONS"; + private RpcGrpcStatusCodeValues() {} + } - /** PATCH method. */ - public static final String PATCH = "PATCH"; + public static final class RpcSystemValues { + /** gRPC. */ + public static final String GRPC = "grpc"; - /** POST method. */ - public static final String POST = "POST"; + /** Java RMI. */ + public static final String JAVA_RMI = "java_rmi"; - /** PUT method. */ - public static final String PUT = "PUT"; + /** .NET WCF. */ + public static final String DOTNET_WCF = "dotnet_wcf"; - /** TRACE method. */ - public static final String TRACE = "TRACE"; + /** Apache Dubbo. */ + public static final String APACHE_DUBBO = "apache_dubbo"; - /** Any HTTP method that the instrumentation has no prior knowledge of. */ - public static final String OTHER = "_OTHER"; + /** Connect RPC. */ + public static final String CONNECT_RPC = "connect_rpc"; - private HttpRequestMethodValues() {} + private RpcSystemValues() {} } public static final class OpentracingRefTypeValues { /** The parent Span depends on the child Span in some capacity. */ public static final String CHILD_OF = "child_of"; - /** The parent Span does not depend in any way on the result of the child Span. */ + /** The parent Span doesn't depend in any way on the result of the child Span. */ public static final String FOLLOWS_FROM = "follows_from"; private OpentracingRefTypeValues() {} @@ -2568,119 +2890,6 @@ public static final class GraphqlOperationTypeValues { private GraphqlOperationTypeValues() {} } - public static final class MessagingOperationValues { - /** publish. */ - public static final String PUBLISH = "publish"; - - /** receive. */ - public static final String RECEIVE = "receive"; - - /** process. */ - public static final String PROCESS = "process"; - - 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"; - - /** FIFO message. */ - public static final String FIFO = "fifo"; - - /** Delay message. */ - public static final String DELAY = "delay"; - - /** Transaction message. */ - public static final String TRANSACTION = "transaction"; - - private MessagingRocketmqMessageTypeValues() {} - } - - public static final class RpcSystemValues { - /** gRPC. */ - public static final String GRPC = "grpc"; - - /** Java RMI. */ - public static final String JAVA_RMI = "java_rmi"; - - /** .NET WCF. */ - public static final String DOTNET_WCF = "dotnet_wcf"; - - /** Apache Dubbo. */ - public static final String APACHE_DUBBO = "apache_dubbo"; - - /** Connect RPC. */ - public static final String CONNECT_RPC = "connect_rpc"; - - private RpcSystemValues() {} - } - - public static final class RpcGrpcStatusCodeValues { - /** OK. */ - public static final long OK = 0; - - /** CANCELLED. */ - public static final long CANCELLED = 1; - - /** UNKNOWN. */ - public static final long UNKNOWN = 2; - - /** INVALID_ARGUMENT. */ - public static final long INVALID_ARGUMENT = 3; - - /** DEADLINE_EXCEEDED. */ - public static final long DEADLINE_EXCEEDED = 4; - - /** NOT_FOUND. */ - public static final long NOT_FOUND = 5; - - /** ALREADY_EXISTS. */ - public static final long ALREADY_EXISTS = 6; - - /** PERMISSION_DENIED. */ - public static final long PERMISSION_DENIED = 7; - - /** RESOURCE_EXHAUSTED. */ - public static final long RESOURCE_EXHAUSTED = 8; - - /** FAILED_PRECONDITION. */ - public static final long FAILED_PRECONDITION = 9; - - /** ABORTED. */ - public static final long ABORTED = 10; - - /** OUT_OF_RANGE. */ - public static final long OUT_OF_RANGE = 11; - - /** UNIMPLEMENTED. */ - public static final long UNIMPLEMENTED = 12; - - /** INTERNAL. */ - public static final long INTERNAL = 13; - - /** UNAVAILABLE. */ - public static final long UNAVAILABLE = 14; - - /** DATA_LOSS. */ - public static final long DATA_LOSS = 15; - - /** UNAUTHENTICATED. */ - public static final long UNAUTHENTICATED = 16; - - private RpcGrpcStatusCodeValues() {} - } - public static final class MessageTypeValues { /** sent. */ public static final String SENT = "SENT"; @@ -2691,58 +2900,6 @@ public static final class MessageTypeValues { private MessageTypeValues() {} } - public static final class RpcConnectRpcErrorCodeValues { - /** cancelled. */ - public static final String CANCELLED = "cancelled"; - - /** unknown. */ - public static final String UNKNOWN = "unknown"; - - /** invalid_argument. */ - public static final String INVALID_ARGUMENT = "invalid_argument"; - - /** deadline_exceeded. */ - public static final String DEADLINE_EXCEEDED = "deadline_exceeded"; - - /** not_found. */ - public static final String NOT_FOUND = "not_found"; - - /** already_exists. */ - public static final String ALREADY_EXISTS = "already_exists"; - - /** permission_denied. */ - public static final String PERMISSION_DENIED = "permission_denied"; - - /** resource_exhausted. */ - public static final String RESOURCE_EXHAUSTED = "resource_exhausted"; - - /** failed_precondition. */ - public static final String FAILED_PRECONDITION = "failed_precondition"; - - /** aborted. */ - public static final String ABORTED = "aborted"; - - /** out_of_range. */ - public static final String OUT_OF_RANGE = "out_of_range"; - - /** unimplemented. */ - public static final String UNIMPLEMENTED = "unimplemented"; - - /** internal. */ - public static final String INTERNAL = "internal"; - - /** unavailable. */ - public static final String UNAVAILABLE = "unavailable"; - - /** data_loss. */ - public static final String DATA_LOSS = "data_loss"; - - /** unauthenticated. */ - public static final String UNAUTHENTICATED = "unauthenticated"; - - private RpcConnectRpcErrorCodeValues() {} - } - // Manually defined and not YET in the YAML /** * The name of an event describing an exception. @@ -3516,5 +3673,30 @@ public static final class TypeValues { private TypeValues() {} } + /** + * Whether the thread is daemon or not. + * + * @deprecated This item has been renamed in 1.23.1 of the semantic conventions. Use {@link + * SemanticAttributes#JVM_THREAD_DAEMON} instead. + */ + @Deprecated public static final AttributeKey THREAD_DAEMON = booleanKey("thread.daemon"); + + /** + * 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). + *
    + * + * @deprecated This item has been renamed in 1.23.1 of the semantic conventions. Use {@link + * SemanticAttributes#HTTP_REQUEST_RESEND_COUNT} instead. + */ + @Deprecated + public static final AttributeKey HTTP_RESEND_COUNT = longKey("http.resend_count"); + private SemanticAttributes() {} }