From 82f23ae65c25bc58157caf93ec7a2a113f82e8dd Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Fri, 8 Sep 2023 16:21:58 -0500 Subject: [PATCH] Remove semconv --- CONTRIBUTING.md | 2 - README.md | 22 +- all/build.gradle.kts | 1 - buildscripts/checkstyle-suppressions.xml | 1 - buildscripts/semantic-convention/.gitignore | 1 - buildscripts/semantic-convention/generate.sh | 52 - .../templates/SemanticAttributes.java.j2 | 486 ---- sdk-extensions/autoconfigure/README.md | 2 +- semconv/README.md | 5 - semconv/build.gradle.kts | 13 - semconv/gradle.properties | 1 - .../attributes/ResourceAttributes.java | 980 ------- .../resource/attributes/package-info.java | 14 - .../trace/attributes/SemanticAttributes.java | 2322 ----------------- .../trace/attributes/package-info.java | 14 - settings.gradle.kts | 1 - 16 files changed, 14 insertions(+), 3903 deletions(-) delete mode 100644 buildscripts/semantic-convention/.gitignore delete mode 100755 buildscripts/semantic-convention/generate.sh delete mode 100644 buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 delete mode 100644 semconv/README.md delete mode 100644 semconv/build.gradle.kts delete mode 100644 semconv/gradle.properties delete mode 100644 semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java delete mode 100644 semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/package-info.java delete mode 100644 semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java delete mode 100644 semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/package-info.java diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8171d76655b..2bbb241ec57 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,8 +76,6 @@ with a few exceptions / comments: * Components like the [Kotlin Extension](./extensions/kotlin) are included which are required for the API / SDK to function in key areas of the Java ecosystem. Inclusion is subject to maintainers' discretion. -* The [semconv](./semconv) module contains generated classes representing - the [semantic conventions](https://github.com/open-telemetry/semantic-conventions). * As a general rule, components which implement semantic conventions belong elsewhere. Other repositories in the OpenTelemetry Java ecosystem include: diff --git a/README.md b/README.md index e912e7ab4ce..b974d1288a8 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ write your own **manual instrumentation**, or how to set up the OpenTelemetry Java SDK, see [Manual instrumentation][]. Fully-functional examples are available in [opentelemetry-java-docs][]. +If you are looking for generated classes for +the [OpenTelemetry semantic conventions][opentelemetry-semantic-conventions], +see [semantic-conventions-java][opentelemetry-semantic-conventions-java]. + For a general overview of OpenTelemetry, visit [opentelemetry.io][]. Would you like to get involved with the project? Read our [contributing guide](CONTRIBUTING.md). We welcome @@ -40,7 +44,6 @@ This project contains the following top level components: * [OpenTelemetry API](api/): * [stable apis](api/all/src/main/java/io/opentelemetry/api/) including `Tracer`, `Span`, `SpanContext`, `Meter`, and `Baggage` - * [semantic conventions](semconv/) Generated code for the OpenTelemetry semantic conventions. * [context api](context/src/main/java/io/opentelemetry/context/) The OpenTelemetry Context implementation. * [extensions](extensions/) define additional API extensions, which are not part of the core API. * [sdk](sdk/) defines the implementation of the OpenTelemetry API. @@ -115,7 +118,7 @@ dependencies { } ``` -Note that if you want to use any artifacts that have not fully stabilized yet (such as the [semantic conventions constants](https://github.com/open-telemetry/opentelemetry-java/tree/main/semconv), then you will need to add an entry for the Alpha BOM as well, e.g. +Note that if you want to use any artifacts that have not fully stabilized yet (such as the [prometheus exporter](https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/prometheus), then you will need to add an entry for the Alpha BOM as well, e.g. ```groovy dependencies { @@ -123,7 +126,7 @@ dependencies { implementation platform('io.opentelemetry:opentelemetry-bom-alpha:1.29.0-alpha') implementation('io.opentelemetry:opentelemetry-api') - implementation('io.opentelemetry:opentelemetry-semconv') + implementation('io.opentelemetry:opentelemetry-exporter-prometheus') implementation('io.opentelemetry:opentelemetry-sdk-extension-autoconfigure') } ``` @@ -222,12 +225,11 @@ dependency as follows, replacing `{{artifact-id}}` with the value from the "Arti ### API -| Component | Description | Artifact ID | Version | Javadoc | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [API](./api/all) | OpenTelemetry API, including metrics, traces, baggage, context | `opentelemetry-api` | 1.29.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api) | -| [Events API](./api/events) | OpenTelemetry Event API for emitting events. | `opentelemetry-api-events` | 1.29.0-alpha | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api-events.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api-events) | -| [Context API](./context) | OpenTelemetry context API | `opentelemetry-context` | 1.29.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-context.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-context) | -| [Semantic Conventions](./semconv) | Generated code for OpenTelemetry semantic conventions (deprecated, moved to [open-telemetry/semantic-conventions-java](https://github.com/open-telemetry/semantic-conventions-java)) | `opentelemetry-semconv` | 1.29.0-alpha | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-semconv.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-semconv) | +| Component | Description | Artifact ID | Version | Javadoc | +|-----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [API](./api/all) | OpenTelemetry API, including metrics, traces, baggage, context | `opentelemetry-api` | 1.29.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api) | +| [Events API](./api/events) | OpenTelemetry Event API for emitting events. | `opentelemetry-api-events` | 1.29.0-alpha | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api-events.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api-events) | +| [Context API](./context) | OpenTelemetry context API | `opentelemetry-context` | 1.29.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-context.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-context) | ### API Extensions @@ -335,5 +337,7 @@ Made with [contrib.rocks](https://contrib.rocks). [maven-url]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry/opentelemetry-api [opentelemetry-java-instrumentation]: https://github.com/open-telemetry/opentelemetry-java-instrumentation [opentelemetry-java-docs]: https://github.com/open-telemetry/opentelemetry-java-docs +[opentelemetry-semantic-conventions]: https://opentelemetry.io/docs/specs/semconv/ +[opentelemetry-semantic-conventions-java]: https://github.com/open-telemetry/semantic-conventions-java [opentelemetry.io]: https://opentelemetry.io [otel-java-status]: https://opentelemetry.io/docs/instrumentation/java/#status-and-releases diff --git a/all/build.gradle.kts b/all/build.gradle.kts index e659d58d1a8..b205e053fe1 100644 --- a/all/build.gradle.kts +++ b/all/build.gradle.kts @@ -97,7 +97,6 @@ tasks.named("jacocoTestReport") { !it.absolutePath.contains("io/opentelemetry/exporter/jaeger/proto/") && !it.absolutePath.contains("io/opentelemetry/exporter/jaeger/internal/protobuf/") && !it.absolutePath.contains("io/opentelemetry/sdk/extension/trace/jaeger/proto/") && - !it.absolutePath.contains("io/opentelemetry/semconv/trace/attributes/") && !it.absolutePath.contains("AutoValue_") }, ) diff --git a/buildscripts/checkstyle-suppressions.xml b/buildscripts/checkstyle-suppressions.xml index bee50be5ec9..f5501405d3a 100644 --- a/buildscripts/checkstyle-suppressions.xml +++ b/buildscripts/checkstyle-suppressions.xml @@ -6,7 +6,6 @@ - diff --git a/buildscripts/semantic-convention/.gitignore b/buildscripts/semantic-convention/.gitignore deleted file mode 100644 index a93b221beb5..00000000000 --- a/buildscripts/semantic-convention/.gitignore +++ /dev/null @@ -1 +0,0 @@ -opentelemetry-specification/ diff --git a/buildscripts/semantic-convention/generate.sh b/buildscripts/semantic-convention/generate.sh deleted file mode 100755 index 9e8e51ec36b..00000000000 --- a/buildscripts/semantic-convention/generate.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -ROOT_DIR="${SCRIPT_DIR}/../../" - -# freeze the spec & generator tools versions to make SemanticAttributes generation reproducible -SEMCONV_VERSION=1.20.0 -SPEC_VERSION=v$SEMCONV_VERSION -SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION -GENERATOR_VERSION=0.18.0 - -cd ${SCRIPT_DIR} - -rm -rf opentelemetry-specification || true -mkdir opentelemetry-specification -cd opentelemetry-specification - -git init -git remote add origin https://github.com/open-telemetry/opentelemetry-specification.git -git fetch origin "$SPEC_VERSION" -git reset --hard FETCH_HEAD -cd ${SCRIPT_DIR} - -docker run --rm \ - -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \ - -v ${SCRIPT_DIR}/templates:/templates \ - -v ${ROOT_DIR}/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/:/output \ - otel/semconvgen:$GENERATOR_VERSION \ - --only span,event,attribute_group,scope \ - -f /source code \ - --template /templates/SemanticAttributes.java.j2 \ - --output /output/SemanticAttributes.java \ - -Dsemconv=trace \ - -Dclass=SemanticAttributes \ - -DschemaUrl=$SCHEMA_URL \ - -Dpkg=io.opentelemetry.semconv.trace.attributes - -docker run --rm \ - -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \ - -v ${SCRIPT_DIR}/templates:/templates \ - -v ${ROOT_DIR}/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/:/output \ - otel/semconvgen:$GENERATOR_VERSION \ - --only resource \ - -f /source code \ - --template /templates/SemanticAttributes.java.j2 \ - --output /output/ResourceAttributes.java \ - -Dclass=ResourceAttributes \ - -DschemaUrl=$SCHEMA_URL \ - -Dpkg=io.opentelemetry.semconv.resource.attributes - -cd "$ROOT_DIR" -./gradlew spotlessApply diff --git a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 deleted file mode 100644 index 8c224df92f9..00000000000 --- a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 +++ /dev/null @@ -1,486 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - - -{%- macro to_java_return_type(type) -%} - {%- if type == "string" -%} - String - {%- elif type == "string[]" -%} - List - {%- elif type == "boolean" -%} - boolean - {%- elif type == "int" -%} - long - {%- elif type == "double" -%} - double - {%- else -%} - {{type}} - {%- endif -%} -{%- endmacro %} -{%- macro to_java_key_type(type) -%} - {%- if type == "string" -%} - stringKey - {%- elif type == "string[]" -%} - stringArrayKey - {%- elif type == "boolean" -%} - booleanKey - {%- elif type == "int" -%} - longKey - {%- elif type == "double" -%} - doubleKey - {%- else -%} - {{lowerFirst(type)}}Key - {%- endif -%} -{%- endmacro %} -{%- macro print_value(type, value) -%} - {{ "\"" if type == "String"}}{{value}}{{ "\"" if type == "String"}} -{%- endmacro %} -{%- macro upFirst(text) -%} - {{ text[0]|upper}}{{text[1:] }} -{%- endmacro %} -{%- macro lowerFirst(text) -%} - {{ text[0]|lower}}{{text[1:] }} -{%- endmacro %} - -package {{pkg | trim}}; - -import static io.opentelemetry.api.common.AttributeKey.booleanKey; -import static io.opentelemetry.api.common.AttributeKey.doubleKey; -import static io.opentelemetry.api.common.AttributeKey.longKey; -import static io.opentelemetry.api.common.AttributeKey.stringKey; -import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; - -import io.opentelemetry.api.common.AttributeKey; -import java.util.List; - -// DO NOT EDIT, this is an Auto-generated file from buildscripts/semantic-convention{{template}} -@SuppressWarnings("unused") -public final class {{class}} { - /** - * The URL of the OpenTelemetry schema for these keys and values. - */ - public static final String SCHEMA_URL = "{{schemaUrl}}"; - {%- for attribute in attributes if attribute.is_local and not attribute.ref %} - - /** - * {{attribute.brief | render_markdown(code="{{@code {0}}}", paragraph="{0}")}} - {%- if attribute.note %} - * - *

Notes: -

    {{attribute.note | render_markdown(code="{{@code {0}}}", paragraph="
  • {0}
  • ", list="{0}")}}
- {%- endif %} - {%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %} - * - * @deprecated {{attribute.brief | to_doc_brief}}. - {%- endif %} - */ - {%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %} - @Deprecated - {%- endif %} - public static final AttributeKey<{{upFirst(to_java_return_type(attribute.attr_type | string))}}> {{attribute.fqn | to_const_name}} = {{to_java_key_type(attribute.attr_type | string)}}("{{attribute.fqn}}"); - {%- endfor %} - - // Enum definitions - {%- for attribute in attributes if attribute.is_local and not attribute.ref %} - {%- if attribute.is_enum %} - {%- set class_name = attribute.fqn | to_camelcase(True) ~ "Values" %} - {%- set type = to_java_return_type(attribute.attr_type.enum_type) %} - public static final class {{class_name}} { - {%- for member in attribute.attr_type.members %} - /** {% filter escape %}{{member.brief | to_doc_brief}}.{% endfilter %} */ - public static final {{ type }} {{ member.member_id | to_const_name }} = {{ print_value(type, member.value) }}; - - {%- endfor %} - - {%- if class_name == "NetTransportValues" %} - /** @deprecated This item has been removed as of 1.13.0 of the semantic conventions. */ - @Deprecated - public static final String IP = "ip"; - - /** @deprecated This item has been removed as of 1.13.0 of the semantic conventions. */ - @Deprecated - public static final String UNIX = "unix"; - {%- endif %} - - private {{ class_name }}() {} - } - - {% endif %} - {%- endfor %} - - {%- if class == "SemanticAttributes" %} - // Manually defined and not YET in the YAML - /** - * The name of an event describing an exception. - * - *

Typically an event with that name should not be manually created. Instead {@link - * io.opentelemetry.api.trace.Span#recordException(Throwable)} should be used. - */ - public static final String EXCEPTION_EVENT_NAME = "exception"; - - /** - * The name of the keyspace being accessed. - * - * @deprecated this item has been removed as of 1.8.0 of the semantic conventions. Please use {@link SemanticAttributes#DB_NAME} instead. - */ - @Deprecated - public static final AttributeKey DB_CASSANDRA_KEYSPACE = - stringKey("db.cassandra.keyspace"); - - /** - * The HBase namespace being accessed. - * - * @deprecated this item has been removed as of 1.8.0 of the semantic conventions. Please use {@link SemanticAttributes#DB_NAME} instead. - */ - @Deprecated - public static final AttributeKey DB_HBASE_NAMESPACE = stringKey("db.hbase.namespace"); - - /** - * The size of the uncompressed request payload body after transport decoding. Not set if - * transport encoding not used. - * - * @deprecated this item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#HTTP_REQUEST_CONTENT_LENGTH} instead. - */ - @Deprecated - public static final AttributeKey HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = - longKey("http.request_content_length_uncompressed"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#HTTP_RESPONSE_CONTENT_LENGTH} instead. - */ - @Deprecated - public static final AttributeKey HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = - longKey("http.response_content_length_uncompressed"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use - * {@link SemanticAttributes#NET_HOST_NAME} instead. - */ - @Deprecated - public static final AttributeKey HTTP_SERVER_NAME = stringKey("http.server_name"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use - * {@link SemanticAttributes#NET_HOST_NAME} instead. - */ - @Deprecated - public static final AttributeKey HTTP_HOST = stringKey("http.host"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#NET_SOCK_PEER_ADDR} instead. - */ - @Deprecated - public static final AttributeKey NET_PEER_IP = stringKey("net.peer.ip"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#NET_SOCK_HOST_ADDR} instead. - */ - @Deprecated - public static final AttributeKey NET_HOST_IP = stringKey("net.host.ip"); - - /** - * The ordinal number of request re-sending attempt. - * @deprecated This item has been removed as of 1.15.0 of the semantic conventions. Use {@link SemanticAttributes#HTTP_RESEND_COUNT} instead. - */ - @Deprecated - public static final AttributeKey HTTP_RETRY_COUNT = longKey("http.retry_count"); - - - /** - * A string identifying the messaging system. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_DESTINATION_NAME} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_DESTINATION = - stringKey("messaging.destination"); - - /** - * A boolean that is true if the message destination is temporary. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_DESTINATION_TEMPORARY} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_TEMP_DESTINATION = - booleanKey("messaging.temp_destination"); - - /** - * The name of the transport protocol. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#NET_PROTOCOL_NAME} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_PROTOCOL = stringKey("messaging.protocol"); - - /** - * The version of the transport protocol. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#NET_PROTOCOL_VERSION} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_PROTOCOL_VERSION = - stringKey("messaging.protocol_version"); - - /** - * Connection string. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. There is no replacement. - */ - @Deprecated - public static final AttributeKey MESSAGING_URL = stringKey("messaging.url"); - - /** - * The conversation ID identifying the conversation to which the - * message belongs, represented as a string. Sometimes called "Correlation ID". - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_MESSAGE_CONVERSATION_ID} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_CONVERSATION_ID = - stringKey("messaging.conversation_id"); - - /** - * RabbitMQ message routing key. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_RABBITMQ_ROUTING_KEY = - stringKey("messaging.rabbitmq.routing_key"); - - /** - * Partition the message is received from. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_KAFKA_SOURCE_PARTITION} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_KAFKA_PARTITION = - longKey("messaging.kafka.partition"); - - /** - * A boolean that is true if the message is a tombstone. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_KAFKA_MESSAGE_TOMBSTONE} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_KAFKA_TOMBSTONE = - booleanKey("messaging.kafka.tombstone"); - - /** - * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_ROCKETMQ_DELIVERY_TIMESTAMP = - longKey("messaging.rocketmq.delivery_timestamp"); - - - /** - * The delay time level for delay message, which determines the message delay time. - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_ROCKETMQ_DELAY_TIME_LEVEL = - longKey("messaging.rocketmq.delay_time_level"); - - /** - * The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). - * @deprecated This item has been moved, use {@link io.opentelemetry.semconv.resource.attributes.ResourceAttributes#OTEL_SCOPE_NAME} instead. - */ - @Deprecated - public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); - - /** - * The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). - * @deprecated This item has been moved, use {@link io.opentelemetry.semconv.resource.attributes.ResourceAttributes#OTEL_SCOPE_VERSION} instead. - */ - @Deprecated - public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); - - /** - * The execution ID of the current function execution. - * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. - * Use {@link SemanticAttributes#FAAS_INVOCATION_ID} instead. - */ - @Deprecated - public static final AttributeKey FAAS_EXECUTION = stringKey("faas.execution"); - - /** - * Value of the HTTP - * User-Agent header sent by the client. - * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. - * Use {@link SemanticAttributes#USER_AGENT_ORIGINAL} instead. - */ - @Deprecated - public static final AttributeKey HTTP_USER_AGENT = stringKey("http.user_agent"); - - /** - * Deprecated. - * - * @deprecated Deprecated, use the {@link io.opentelemetry.semconv.resource.attributes.ResourceAttributes#OTEL_SCOPE_NAME} attribute. - */ - @Deprecated - public static final AttributeKey OTEL_LIBRARY_NAME = stringKey("otel.library.name"); - - /** - * Deprecated. - * - * @deprecated Deprecated, use the {@link io.opentelemetry.semconv.resource.attributes.ResourceAttributes#OTEL_SCOPE_VERSION} attribute. - */ - @Deprecated - public static final AttributeKey OTEL_LIBRARY_VERSION = stringKey("otel.library.version"); - - /** - * Kind of HTTP protocol used. - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final AttributeKey HTTP_FLAVOR = stringKey("http.flavor"); - - /** - * Enum definitions for {@link #HTTP_FLAVOR}. - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final class HttpFlavorValues { - /** HTTP/1.0. */ - public static final String HTTP_1_0 = "1.0"; - - /** HTTP/1.1. */ - public static final String HTTP_1_1 = "1.1"; - - /** HTTP/2. */ - public static final String HTTP_2_0 = "2.0"; - - /** HTTP/3. */ - public static final String HTTP_3_0 = "3.0"; - - /** SPDY protocol. */ - public static final String SPDY = "SPDY"; - - /** QUIC protocol. */ - public static final String QUIC = "QUIC"; - - private HttpFlavorValues() {} - } - - /** - * Application layer protocol used. The value SHOULD be normalized to lowercase. - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. Use {@link SemanticAttributes#NET_PROTOCOL_NAME} instead. - */ - @Deprecated - public static final AttributeKey NET_APP_PROTOCOL_NAME = stringKey("net.app.protocol.name"); - - /** - * Version of the application layer protocol used. See note below. - * - *

Notes: - * - *

    - *
  • {@code net.app.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 This item has been removed as of 1.20.0 of the semantic conventions. Use {@link SemanticAttributes#NET_PROTOCOL_VERSION} instead. - */ - @Deprecated - public static final AttributeKey NET_APP_PROTOCOL_VERSION = stringKey("net.app.protocol.version"); - - /** - * The kind of message destination. - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final AttributeKey MESSAGING_DESTINATION_KIND = stringKey("messaging.destination.kind"); - - /** - * Enum values for {@link #MESSAGING_DESTINATION_KIND}. - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final class MessagingDestinationKindValues { - /** A message sent to a queue. */ - public static final String QUEUE = "queue"; - - /** A message sent to a topic. */ - public static final String TOPIC = "topic"; - - private MessagingDestinationKindValues() {} - } - - /** - * The kind of message source. - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final AttributeKey MESSAGING_SOURCE_KIND = stringKey("messaging.source.kind"); - - /** - * Enum values for {@link #MESSAGING_SOURCE_KIND}. - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final class MessagingSourceKindValues { - /** A message received from a queue. */ - public static final String QUEUE = "queue"; - - /** A message received from a topic. */ - public static final String TOPIC = "topic"; - - private MessagingSourceKindValues() {} - } - - {% endif %} - - {%- if class == "ResourceAttributes" %} - - /** - * Red Hat OpenShift on Google Cloud. - * @deprecated This item has been removed as of 1.18.0 of the semantic conventions. Use {@link ResourceAttributes#GCP_OPENSHIFT} instead. - */ - @Deprecated - public static final String GCP_OPENSHIFT = "gcp_openshift"; - - /** - * Full user-agent string provided by the browser - * - *

Notes: - * - *

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

Notes: - * - *

    - *
  • On some cloud providers, it may not be possible to determine the full ID at startup, so - * consider setting {@code faas.id} as a span attribute instead. - *
  • The exact value to use for {@code faas.id} depends on the cloud provider: - *
  • AWS Lambda: The function ARN. - * Take care not to use the "invoked ARN" directly but replace any alias - * suffix with the resolved function version, as the same runtime instance may be - * invokable with multiple different aliases. - *
  • GCP: The URI of the resource - *
  • Azure: The Fully - * Qualified Resource ID of the invoked function, not the function app, having - * the form {@code - * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. - * This means that a span attribute MUST be used, as an Azure function app can host multiple - * functions that would usually share a TracerProvider. - *
- * @deprecated This item has been removed in 1.19.0 version of the semantic conventions. Use {@link ResourceAttributes#CLOUD_RESOURCE_ID} instead. - */ - @Deprecated - public static final AttributeKey FAAS_ID = stringKey("faas.id"); - - {% endif %} - - private {{class}}() {} -} diff --git a/sdk-extensions/autoconfigure/README.md b/sdk-extensions/autoconfigure/README.md index 65dd75ac01f..0653fb38061 100644 --- a/sdk-extensions/autoconfigure/README.md +++ b/sdk-extensions/autoconfigure/README.md @@ -170,7 +170,7 @@ is a representation of the entity producing telemetry. | otel.service.name | OTEL_SERVICE_NAME | Specify logical service name. Takes precedence over `service.name` defined with `otel.resource.attributes` | | otel.experimental.resource.disabled-keys | OTEL_EXPERIMENTAL_RESOURCE_DISABLED_KEYS | Specify resource attribute keys that are filtered. | -You almost always want to specify the [`service.name`](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/resource/semantic_conventions#service) for your application. +You almost always want to specify the [`service.name`](https://opentelemetry.io/docs/specs/semconv/resource/#service) for your application. It corresponds to how you describe the application, for example `authservice` could be an application that authenticates requests, and `cats` could be an application that returns information about [cats](https://en.wikipedia.org/wiki/Cat). You would specify that by setting service name property in one of the following ways: * directly via `OTEL_SERVICE_NAME=authservice` or `-Dotel.service.name=cats` diff --git a/semconv/README.md b/semconv/README.md deleted file mode 100644 index c70c47abe06..00000000000 --- a/semconv/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# OpenTelemetry Semantic Conventions - -* This module contains generated code for the Semantic Conventions defined by the OpenTelemetry specification. -* Scripts for generating the classes live in the `buildscripts/semantic-convention` directory -at the top level of the project. diff --git a/semconv/build.gradle.kts b/semconv/build.gradle.kts deleted file mode 100644 index 6ddee0bd7b2..00000000000 --- a/semconv/build.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -plugins { - id("otel.java-conventions") - id("otel.publish-conventions") - - id("otel.animalsniffer-conventions") -} - -description = "OpenTelemetry Semantic Conventions" -otelJava.moduleName.set("io.opentelemetry.semconv") - -dependencies { - api(project(":api:all")) -} diff --git a/semconv/gradle.properties b/semconv/gradle.properties deleted file mode 100644 index 4476ae57e31..00000000000 --- a/semconv/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -otel.release=alpha diff --git a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java deleted file mode 100644 index af2dccf3274..00000000000 --- a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java +++ /dev/null @@ -1,980 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -package io.opentelemetry.semconv.resource.attributes; - -import static io.opentelemetry.api.common.AttributeKey.booleanKey; -import static io.opentelemetry.api.common.AttributeKey.longKey; -import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; -import static io.opentelemetry.api.common.AttributeKey.stringKey; - -import io.opentelemetry.api.common.AttributeKey; -import java.util.List; - -/** - * @deprecated Use {@code io.opentelemetry.semconv.ResourceAttributes} from io.opentelemetry.semconv:opentelemetry-semconv:{{version}} - * instead. - */ -@Deprecated -// DO NOT EDIT, this is an Auto-generated file from -// buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 -@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.20.0"; - - /** - * 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"); - - /** - * 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"); - - /** - * 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"); - - /** - * 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"); - - /** Name of the cloud provider. */ - public static final AttributeKey CLOUD_PROVIDER = stringKey("cloud.provider"); - - /** The cloud account ID the resource is assigned to. */ - public static final AttributeKey CLOUD_ACCOUNT_ID = stringKey("cloud.account.id"); - - /** - * The geographical region the resource is running. - * - *

Notes: - * - *

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

Notes: - * - *

    - *
  • On some cloud providers, it may not be possible to determine the full ID at startup, so - * it may be necessary to set {@code cloud.resource_id} as a span attribute instead. - *
  • The exact value to use for {@code cloud.resource_id} depends on the cloud provider. The - * following well-known definitions MUST be used if you set this attribute and they apply: - *
  • AWS Lambda: The function ARN. - * Take care not to use the "invoked ARN" directly but replace any alias - * suffix with the resolved function version, as the same runtime instance may be - * invokable with multiple different aliases. - *
  • GCP: The URI of the resource - *
  • Azure: The Fully - * Qualified Resource ID of the invoked function, not the function app, having - * the form {@code - * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. - * This means that a span attribute MUST be used, as an Azure function app can host multiple - * functions that would usually share a TracerProvider. - *
- */ - public static final AttributeKey CLOUD_RESOURCE_ID = stringKey("cloud.resource_id"); - - /** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. - * Availability zone represents the zone where the resource is running. - * - *

Notes: - * - *

    - *
  • Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - *
- */ - public static final AttributeKey CLOUD_AVAILABILITY_ZONE = - stringKey("cloud.availability_zone"); - - /** - * The cloud platform in use. - * - *

Notes: - * - *

    - *
  • The prefix of the service SHOULD match the one specified in {@code cloud.provider}. - *
- */ - public static final AttributeKey CLOUD_PLATFORM = stringKey("cloud.platform"); - - /** - * The Amazon Resource Name (ARN) of an ECS - * container instance. - */ - public static final AttributeKey AWS_ECS_CONTAINER_ARN = - stringKey("aws.ecs.container.arn"); - - /** - * The ARN of an ECS - * cluster. - */ - public static final AttributeKey AWS_ECS_CLUSTER_ARN = stringKey("aws.ecs.cluster.arn"); - - /** - * The launch - * type for an ECS task. - */ - public static final AttributeKey AWS_ECS_LAUNCHTYPE = stringKey("aws.ecs.launchtype"); - - /** - * The ARN of an ECS - * task definition. - */ - public static final AttributeKey AWS_ECS_TASK_ARN = stringKey("aws.ecs.task.arn"); - - /** The task definition family this task definition is a member of. */ - public static final AttributeKey AWS_ECS_TASK_FAMILY = stringKey("aws.ecs.task.family"); - - /** The revision for this task definition. */ - public static final AttributeKey AWS_ECS_TASK_REVISION = - stringKey("aws.ecs.task.revision"); - - /** The ARN of an EKS cluster. */ - public static final AttributeKey AWS_EKS_CLUSTER_ARN = stringKey("aws.eks.cluster.arn"); - - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - *

Notes: - * - *

    - *
  • Multiple log groups must be supported for cases like multi-container applications, where - * a single application has sidecar containers, and each write to their own log group. - *
- */ - public static final AttributeKey> AWS_LOG_GROUP_NAMES = - stringArrayKey("aws.log.group.names"); - - /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - *

Notes: - * - *

- */ - public static final AttributeKey> AWS_LOG_GROUP_ARNS = - stringArrayKey("aws.log.group.arns"); - - /** The name(s) of the AWS log stream(s) an application is writing to. */ - public static final AttributeKey> AWS_LOG_STREAM_NAMES = - stringArrayKey("aws.log.stream.names"); - - /** - * The ARN(s) of the AWS log stream(s). - * - *

Notes: - * - *

- */ - public static final AttributeKey> AWS_LOG_STREAM_ARNS = - stringArrayKey("aws.log.stream.arns"); - - /** Time and date the release was created */ - public static final AttributeKey HEROKU_RELEASE_CREATION_TIMESTAMP = - stringKey("heroku.release.creation_timestamp"); - - /** Commit hash for the current release */ - public static final AttributeKey HEROKU_RELEASE_COMMIT = - stringKey("heroku.release.commit"); - - /** Unique identifier for the application */ - public static final AttributeKey HEROKU_APP_ID = stringKey("heroku.app.id"); - - /** Container name used by container runtime. */ - public static final AttributeKey CONTAINER_NAME = stringKey("container.name"); - - /** - * 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"); - - /** The container runtime managing this container. */ - public static final AttributeKey CONTAINER_RUNTIME = stringKey("container.runtime"); - - /** Name of the image the container was built on. */ - public static final AttributeKey CONTAINER_IMAGE_NAME = stringKey("container.image.name"); - - /** Container image tag. */ - public static final AttributeKey CONTAINER_IMAGE_TAG = stringKey("container.image.tag"); - - /** - * Name of the deployment - * environment (aka deployment tier). - */ - public static final AttributeKey DEPLOYMENT_ENVIRONMENT = - stringKey("deployment.environment"); - - /** - * A unique identifier representing the device - * - *

Notes: - * - *

    - *
  • The device identifier MUST only be defined using the values outlined below. This value is - * not an advertising identifier and MUST NOT be used as such. On iOS (Swift or - * Objective-C), this value MUST be equal to the vendor - * identifier. On Android (Java or Kotlin), this value MUST be equal to the Firebase - * Installation ID or a globally unique UUID which is persisted across sessions in your - * application. More information can be found here on best - * practices and exact implementation details. Caution should be taken when storing personal - * data or anything which can identify a user. GDPR and data protection laws may apply, - * ensure you do your own due diligence. - *
- */ - public static final AttributeKey DEVICE_ID = stringKey("device.id"); - - /** - * The model identifier for the device - * - *

Notes: - * - *

    - *
  • It's recommended this value represents a machine readable version of the model identifier - * rather than the market or consumer-friendly name of the device. - *
- */ - public static final AttributeKey DEVICE_MODEL_IDENTIFIER = - stringKey("device.model.identifier"); - - /** - * The marketing name for the device model - * - *

Notes: - * - *

    - *
  • It's recommended this value represents a human readable version of the device model - * rather than a machine readable alternative. - *
- */ - public static final AttributeKey DEVICE_MODEL_NAME = stringKey("device.model.name"); - - /** - * The name of the device manufacturer - * - *

Notes: - * - *

    - *
  • The Android OS provides this field via Build. - * iOS apps SHOULD hardcode the value {@code Apple}. - *
- */ - public static final AttributeKey DEVICE_MANUFACTURER = stringKey("device.manufacturer"); - - /** - * The name of the single function that this runtime instance executes. - * - *

Notes: - * - *

    - *
  • This is the name of the function as configured/deployed on the FaaS platform and is - * usually different from the name of the callback function (which may be stored in the {@code - * code.namespace}/{@code code.function} span attributes). - *
  • For some cloud providers, the above definition is ambiguous. The following definition of - * function name MUST be used for this attribute (and consequently the span name) for the - * listed cloud providers/products: - *
  • Azure: The full name {@code /}, i.e., function app name - * followed by a forward slash followed by the function name (this form can also be seen in - * the resource JSON for the function). This means that a span attribute MUST be used, as an - * Azure function app can host multiple functions that would usually share a TracerProvider - * (see also the {@code cloud.resource_id} attribute). - *
- */ - public static final AttributeKey FAAS_NAME = stringKey("faas.name"); - - /** - * The immutable version of the function being executed. - * - *

Notes: - * - *

    - *
  • Depending on the cloud provider and platform, use: - *
  • AWS Lambda: The function - * version (an integer represented as a decimal string). - *
  • Google Cloud Run: The revision (i.e., the - * function name plus the revision suffix). - *
  • Google Cloud Functions: The value of the {@code - * K_REVISION} environment variable. - *
  • Azure Functions: Not applicable. Do not set this attribute. - *
- */ - public static final AttributeKey FAAS_VERSION = stringKey("faas.version"); - - /** - * The execution environment ID as a string, that will be potentially reused for other invocations - * to the same function/function version. - * - *

Notes: - * - *

    - *
  • AWS Lambda: Use the (full) log stream name. - *
- */ - public static final AttributeKey FAAS_INSTANCE = stringKey("faas.instance"); - - /** - * The amount of memory available to the serverless function converted to Bytes. - * - *

Notes: - * - *

    - *
  • It's recommended to set this attribute since e.g. too little memory can easily stop a - * Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable - * {@code AWS_LAMBDA_FUNCTION_MEMORY_SIZE} provides this information (which must be - * multiplied by 1,048,576). - *
- */ - public static final AttributeKey FAAS_MAX_MEMORY = longKey("faas.max_memory"); - - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For - * non-containerized systems, this should be the {@code machine-id}. See the table below for the - * sources to use to determine the {@code machine-id} based on operating system. - */ - public static final AttributeKey HOST_ID = stringKey("host.id"); - - /** - * 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. - */ - public static final AttributeKey HOST_NAME = stringKey("host.name"); - - /** Type of host. For Cloud, this must be the machine type. */ - public static final AttributeKey HOST_TYPE = stringKey("host.type"); - - /** The CPU architecture the host system is running on. */ - public static final AttributeKey HOST_ARCH = stringKey("host.arch"); - - /** Name of the VM image or OS install the host was instantiated from. */ - public static final AttributeKey HOST_IMAGE_NAME = stringKey("host.image.name"); - - /** VM image ID. For Cloud, this value is from the provider. */ - public static final AttributeKey HOST_IMAGE_ID = stringKey("host.image.id"); - - /** - * The version string of the VM image as defined in Version - * Attributes. - */ - public static final AttributeKey HOST_IMAGE_VERSION = stringKey("host.image.version"); - - /** The name of the cluster. */ - public static final AttributeKey K8S_CLUSTER_NAME = stringKey("k8s.cluster.name"); - - /** The name of the Node. */ - public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); - - /** The UID of the Node. */ - public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); - - /** The name of the namespace that the pod is running in. */ - public static final AttributeKey K8S_NAMESPACE_NAME = stringKey("k8s.namespace.name"); - - /** The UID of the Pod. */ - public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); - - /** The name of the Pod. */ - public static final AttributeKey K8S_POD_NAME = stringKey("k8s.pod.name"); - - /** - * The name of the Container from Pod specification, must be unique within a Pod. Container - * runtime usually uses different globally unique name ({@code container.name}). - */ - public static final AttributeKey K8S_CONTAINER_NAME = stringKey("k8s.container.name"); - - /** - * Number of times the container was restarted. This attribute can be used to identify a - * particular container (running or stopped) within a container spec. - */ - public static final AttributeKey K8S_CONTAINER_RESTART_COUNT = - longKey("k8s.container.restart_count"); - - /** The UID of the ReplicaSet. */ - public static final AttributeKey K8S_REPLICASET_UID = stringKey("k8s.replicaset.uid"); - - /** The name of the ReplicaSet. */ - public static final AttributeKey K8S_REPLICASET_NAME = stringKey("k8s.replicaset.name"); - - /** The UID of the Deployment. */ - public static final AttributeKey K8S_DEPLOYMENT_UID = stringKey("k8s.deployment.uid"); - - /** The name of the Deployment. */ - public static final AttributeKey K8S_DEPLOYMENT_NAME = stringKey("k8s.deployment.name"); - - /** The UID of the StatefulSet. */ - public static final AttributeKey K8S_STATEFULSET_UID = stringKey("k8s.statefulset.uid"); - - /** The name of the StatefulSet. */ - public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); - - /** The UID of the DaemonSet. */ - public static final AttributeKey K8S_DAEMONSET_UID = stringKey("k8s.daemonset.uid"); - - /** The name of the DaemonSet. */ - public static final AttributeKey K8S_DAEMONSET_NAME = stringKey("k8s.daemonset.name"); - - /** The UID of the Job. */ - public static final AttributeKey K8S_JOB_UID = stringKey("k8s.job.uid"); - - /** The name of the Job. */ - public static final AttributeKey K8S_JOB_NAME = stringKey("k8s.job.name"); - - /** The UID of the CronJob. */ - public static final AttributeKey K8S_CRONJOB_UID = stringKey("k8s.cronjob.uid"); - - /** The name of the CronJob. */ - public static final AttributeKey K8S_CRONJOB_NAME = stringKey("k8s.cronjob.name"); - - /** The operating system type. */ - public static final AttributeKey OS_TYPE = stringKey("os.type"); - - /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by {@code - * ver} or {@code lsb_release -a} commands. - */ - public static final AttributeKey OS_DESCRIPTION = stringKey("os.description"); - - /** Human readable operating system name. */ - public static final AttributeKey OS_NAME = stringKey("os.name"); - - /** - * The version string of the operating system as defined in Version Attributes. - */ - public static final AttributeKey OS_VERSION = stringKey("os.version"); - - /** Process identifier (PID). */ - public static final AttributeKey PROCESS_PID = longKey("process.pid"); - - /** Parent Process identifier (PID). */ - public static final AttributeKey PROCESS_PARENT_PID = longKey("process.parent_pid"); - - /** - * The name of the process executable. On Linux based systems, can be set to the {@code Name} in - * {@code proc/[pid]/status}. On Windows, can be set to the base name of {@code - * GetProcessImageFileNameW}. - */ - public static final AttributeKey PROCESS_EXECUTABLE_NAME = - stringKey("process.executable.name"); - - /** - * The full path to the process executable. On Linux based systems, can be set to the target of - * {@code proc/[pid]/exe}. On Windows, can be set to the result of {@code - * GetProcessImageFileNameW}. - */ - public static final AttributeKey PROCESS_EXECUTABLE_PATH = - stringKey("process.executable.path"); - - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be - * set to the zeroth string in {@code proc/[pid]/cmdline}. On Windows, can be set to the first - * parameter extracted from {@code GetCommandLineW}. - */ - public static final AttributeKey PROCESS_COMMAND = stringKey("process.command"); - - /** - * The full command used to launch the process as a single string representing the full command. - * On Windows, can be set to the result of {@code GetCommandLineW}. Do not set this if you have to - * assemble it just for monitoring; use {@code process.command_args} instead. - */ - public static final AttributeKey PROCESS_COMMAND_LINE = stringKey("process.command_line"); - - /** - * All the command arguments (including the command/executable itself) as received by the process. - * On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according - * to the list of null-delimited strings extracted from {@code proc/[pid]/cmdline}. For libc-based - * executables, this would be the full argv vector passed to {@code main}. - */ - public static final AttributeKey> PROCESS_COMMAND_ARGS = - stringArrayKey("process.command_args"); - - /** The username of the user that owns the process. */ - public static final AttributeKey PROCESS_OWNER = stringKey("process.owner"); - - /** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name - * of the compiler. - */ - public static final AttributeKey PROCESS_RUNTIME_NAME = stringKey("process.runtime.name"); - - /** - * The version of the runtime of this process, as returned by the runtime without modification. - */ - public static final AttributeKey PROCESS_RUNTIME_VERSION = - stringKey("process.runtime.version"); - - /** - * An additional description about the runtime of the process, for example a specific vendor - * customization of the runtime environment. - */ - public static final AttributeKey PROCESS_RUNTIME_DESCRIPTION = - stringKey("process.runtime.description"); - - /** - * Logical name of the service. - * - *

Notes: - * - *

    - *
  • MUST be the same for all instances of horizontally scaled services. If the value was not - * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with {@code process.executable.name}, e.g. {@code - * unknown_service:bash}. If {@code process.executable.name} is not available, the value - * MUST be set to {@code unknown_service}. - *
- */ - public static final AttributeKey SERVICE_NAME = stringKey("service.name"); - - /** - * A namespace for {@code service.name}. - * - *

Notes: - * - *

    - *
  • A string value having a meaning that helps to distinguish a group of services, for - * example the team name that owns a group of services. {@code service.name} is expected to - * be unique within the same namespace. If {@code service.namespace} is not specified in the - * Resource then {@code service.name} is expected to be unique for all services that have no - * explicit namespace defined (so the empty/unspecified namespace is simply one more valid - * namespace). Zero-length namespace string is assumed equal to unspecified namespace. - *
- */ - public static final AttributeKey SERVICE_NAMESPACE = stringKey("service.namespace"); - - /** - * The string ID of the service instance. - * - *

Notes: - * - *

    - *
  • MUST be unique for each instance of the same {@code service.namespace,service.name} pair - * (in other words {@code service.namespace,service.name,service.instance.id} triplet MUST - * be globally unique). The ID helps to distinguish instances of the same service that exist - * at the same time (e.g. instances of a horizontally scaled service). It is preferable for - * the ID to be persistent and stay the same for the lifetime of the service instance, - * however it is acceptable that the ID is ephemeral and changes during important lifetime - * events for the service (e.g. service restarts). If the service has no inherent unique ID - * that can be used as the value of this attribute it is recommended to generate a random - * Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use - * Version 5, see RFC 4122 for more recommendations). - *
- */ - public static final AttributeKey SERVICE_INSTANCE_ID = stringKey("service.instance.id"); - - /** The version string of the service API or implementation. */ - public static final AttributeKey SERVICE_VERSION = stringKey("service.version"); - - /** The name of the telemetry SDK as defined above. */ - public static final AttributeKey TELEMETRY_SDK_NAME = stringKey("telemetry.sdk.name"); - - /** The language of the telemetry SDK. */ - public static final AttributeKey TELEMETRY_SDK_LANGUAGE = - stringKey("telemetry.sdk.language"); - - /** The version string of the telemetry SDK. */ - public static final AttributeKey TELEMETRY_SDK_VERSION = - stringKey("telemetry.sdk.version"); - - /** The version string of the auto instrumentation agent, if used. */ - public static final AttributeKey TELEMETRY_AUTO_VERSION = - stringKey("telemetry.auto.version"); - - /** The name of the web engine. */ - public static final AttributeKey WEBENGINE_NAME = stringKey("webengine.name"); - - /** The version of the web engine. */ - public static final AttributeKey WEBENGINE_VERSION = stringKey("webengine.version"); - - /** Additional description of the web engine (e.g. detailed version and edition information). */ - public static final AttributeKey WEBENGINE_DESCRIPTION = - stringKey("webengine.description"); - - /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ - public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); - - /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ - public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); - - /** - * Deprecated, use the {@code otel.scope.name} attribute. - * - * @deprecated Deprecated, use the `otel.scope.name` attribute. - */ - @Deprecated - public static final AttributeKey OTEL_LIBRARY_NAME = stringKey("otel.library.name"); - - /** - * Deprecated, use the {@code otel.scope.version} attribute. - * - * @deprecated Deprecated, use the `otel.scope.version` attribute. - */ - @Deprecated - public static final AttributeKey OTEL_LIBRARY_VERSION = stringKey("otel.library.version"); - - // Enum definitions - public static final class CloudProviderValues { - /** Alibaba Cloud. */ - public static final String ALIBABA_CLOUD = "alibaba_cloud"; - - /** Amazon Web Services. */ - public static final String AWS = "aws"; - - /** Microsoft Azure. */ - public static final String AZURE = "azure"; - - /** Google Cloud Platform. */ - public static final String GCP = "gcp"; - - /** Heroku Platform as a Service. */ - public static final String HEROKU = "heroku"; - - /** IBM Cloud. */ - public static final String IBM_CLOUD = "ibm_cloud"; - - /** Tencent Cloud. */ - public static final String TENCENT_CLOUD = "tencent_cloud"; - - private CloudProviderValues() {} - } - - public static final class CloudPlatformValues { - /** Alibaba Cloud Elastic Compute Service. */ - public static final String ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs"; - - /** Alibaba Cloud Function Compute. */ - public static final String ALIBABA_CLOUD_FC = "alibaba_cloud_fc"; - - /** Red Hat OpenShift on Alibaba Cloud. */ - public static final String ALIBABA_CLOUD_OPENSHIFT = "alibaba_cloud_openshift"; - - /** AWS Elastic Compute Cloud. */ - public static final String AWS_EC2 = "aws_ec2"; - - /** AWS Elastic Container Service. */ - public static final String AWS_ECS = "aws_ecs"; - - /** AWS Elastic Kubernetes Service. */ - public static final String AWS_EKS = "aws_eks"; - - /** AWS Lambda. */ - public static final String AWS_LAMBDA = "aws_lambda"; - - /** AWS Elastic Beanstalk. */ - public static final String AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk"; - - /** AWS App Runner. */ - public static final String AWS_APP_RUNNER = "aws_app_runner"; - - /** Red Hat OpenShift on AWS (ROSA). */ - public static final String AWS_OPENSHIFT = "aws_openshift"; - - /** Azure Virtual Machines. */ - public static final String AZURE_VM = "azure_vm"; - - /** Azure Container Instances. */ - public static final String AZURE_CONTAINER_INSTANCES = "azure_container_instances"; - - /** Azure Kubernetes Service. */ - public static final String AZURE_AKS = "azure_aks"; - - /** Azure Functions. */ - public static final String AZURE_FUNCTIONS = "azure_functions"; - - /** Azure App Service. */ - public static final String AZURE_APP_SERVICE = "azure_app_service"; - - /** Azure Red Hat OpenShift. */ - public static final String AZURE_OPENSHIFT = "azure_openshift"; - - /** Google Cloud Compute Engine (GCE). */ - public static final String GCP_COMPUTE_ENGINE = "gcp_compute_engine"; - - /** Google Cloud Run. */ - public static final String GCP_CLOUD_RUN = "gcp_cloud_run"; - - /** Google Cloud Kubernetes Engine (GKE). */ - public static final String GCP_KUBERNETES_ENGINE = "gcp_kubernetes_engine"; - - /** Google Cloud Functions (GCF). */ - public static final String GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions"; - - /** Google Cloud App Engine (GAE). */ - public static final String GCP_APP_ENGINE = "gcp_app_engine"; - - /** Red Hat OpenShift on Google Cloud. */ - public static final String GCP_OPENSHIFT = "gcp_openshift"; - - /** Red Hat OpenShift on IBM Cloud. */ - public static final String IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift"; - - /** Tencent Cloud Cloud Virtual Machine (CVM). */ - public static final String TENCENT_CLOUD_CVM = "tencent_cloud_cvm"; - - /** Tencent Cloud Elastic Kubernetes Service (EKS). */ - public static final String TENCENT_CLOUD_EKS = "tencent_cloud_eks"; - - /** Tencent Cloud Serverless Cloud Function (SCF). */ - public static final String TENCENT_CLOUD_SCF = "tencent_cloud_scf"; - - private CloudPlatformValues() {} - } - - public static final class AwsEcsLaunchtypeValues { - /** ec2. */ - public static final String EC2 = "ec2"; - - /** fargate. */ - public static final String FARGATE = "fargate"; - - private AwsEcsLaunchtypeValues() {} - } - - public static final class HostArchValues { - /** AMD64. */ - public static final String AMD64 = "amd64"; - - /** ARM32. */ - public static final String ARM32 = "arm32"; - - /** ARM64. */ - public static final String ARM64 = "arm64"; - - /** Itanium. */ - public static final String IA64 = "ia64"; - - /** 32-bit PowerPC. */ - public static final String PPC32 = "ppc32"; - - /** 64-bit PowerPC. */ - public static final String PPC64 = "ppc64"; - - /** IBM z/Architecture. */ - public static final String S390X = "s390x"; - - /** 32-bit x86. */ - public static final String X86 = "x86"; - - private HostArchValues() {} - } - - public static final class OsTypeValues { - /** Microsoft Windows. */ - public static final String WINDOWS = "windows"; - - /** Linux. */ - public static final String LINUX = "linux"; - - /** Apple Darwin. */ - public static final String DARWIN = "darwin"; - - /** FreeBSD. */ - public static final String FREEBSD = "freebsd"; - - /** NetBSD. */ - public static final String NETBSD = "netbsd"; - - /** OpenBSD. */ - public static final String OPENBSD = "openbsd"; - - /** DragonFly BSD. */ - public static final String DRAGONFLYBSD = "dragonflybsd"; - - /** HP-UX (Hewlett Packard Unix). */ - public static final String HPUX = "hpux"; - - /** AIX (Advanced Interactive eXecutive). */ - public static final String AIX = "aix"; - - /** SunOS, Oracle Solaris. */ - public static final String SOLARIS = "solaris"; - - /** IBM z/OS. */ - public static final String Z_OS = "z_os"; - - private OsTypeValues() {} - } - - public static final class TelemetrySdkLanguageValues { - /** cpp. */ - public static final String CPP = "cpp"; - - /** dotnet. */ - public static final String DOTNET = "dotnet"; - - /** erlang. */ - public static final String ERLANG = "erlang"; - - /** go. */ - public static final String GO = "go"; - - /** java. */ - public static final String JAVA = "java"; - - /** nodejs. */ - public static final String NODEJS = "nodejs"; - - /** php. */ - public static final String PHP = "php"; - - /** python. */ - public static final String PYTHON = "python"; - - /** ruby. */ - public static final String RUBY = "ruby"; - - /** webjs. */ - public static final String WEBJS = "webjs"; - - /** swift. */ - public static final String SWIFT = "swift"; - - private TelemetrySdkLanguageValues() {} - } - - /** - * Red Hat OpenShift on Google Cloud. - * - * @deprecated This item has been removed as of 1.18.0 of the semantic conventions. Use {@link - * ResourceAttributes#GCP_OPENSHIFT} instead. - */ - @Deprecated public static final String GCP_OPENSHIFT = "gcp_openshift"; - - /** - * Full user-agent string provided by the browser - * - *

Notes: - * - *

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

Notes: - * - *

    - *
  • On some cloud providers, it may not be possible to determine the full ID at startup, so - * consider setting {@code faas.id} as a span attribute instead. - *
  • The exact value to use for {@code faas.id} depends on the cloud provider: - *
  • AWS Lambda: The function ARN. - * Take care not to use the "invoked ARN" directly but replace any alias - * suffix with the resolved function version, as the same runtime instance may be - * invokable with multiple different aliases. - *
  • GCP: The URI of the resource - *
  • Azure: The Fully - * Qualified Resource ID of the invoked function, not the function app, having - * the form {@code - * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. - * This means that a span attribute MUST be used, as an Azure function app can host multiple - * functions that would usually share a TracerProvider. - *
- * - * @deprecated This item has been removed in 1.19.0 version of the semantic conventions. Use - * {@link ResourceAttributes#CLOUD_RESOURCE_ID} instead. - */ - @Deprecated public static final AttributeKey FAAS_ID = stringKey("faas.id"); - - private ResourceAttributes() {} -} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/package-info.java b/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/package-info.java deleted file mode 100644 index d893dd794bf..00000000000 --- a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * OpenTelemetry semantic attributes for resources. - * - * @see io.opentelemetry.semconv.resource.attributes.ResourceAttributes - */ -@ParametersAreNonnullByDefault -package io.opentelemetry.semconv.resource.attributes; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java deleted file mode 100644 index d05fbf85ae1..00000000000 --- a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java +++ /dev/null @@ -1,2322 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -package io.opentelemetry.semconv.trace.attributes; - -import static io.opentelemetry.api.common.AttributeKey.booleanKey; -import static io.opentelemetry.api.common.AttributeKey.doubleKey; -import static io.opentelemetry.api.common.AttributeKey.longKey; -import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; -import static io.opentelemetry.api.common.AttributeKey.stringKey; - -import io.opentelemetry.api.common.AttributeKey; -import java.util.List; - -/** - * @deprecated Use {@code io.opentelemetry.semconv.SemanticAttributes} from io.opentelemetry.semconv:opentelemetry-semconv:{{version}} - * instead. - */ -@Deprecated -// DO NOT EDIT, this is an Auto-generated file from -// buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 -@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.20.0"; - - /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of - * the exception should be preferred over the static type in languages that support it. - */ - public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); - - /** The exception message. */ - public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); - - /** - * A stacktrace as a string in the natural representation for the language runtime. The - * representation is to be determined and documented by each language SIG. - */ - public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); - - /** HTTP request method. */ - public static final AttributeKey HTTP_METHOD = stringKey("http.method"); - - /** HTTP response status code. */ - public static final AttributeKey HTTP_STATUS_CODE = longKey("http.status_code"); - - /** The URI scheme identifying the used protocol. */ - public static final AttributeKey HTTP_SCHEME = stringKey("http.scheme"); - - /** - * The matched route (path template in the format used by the respective server framework). See - * note below - * - *

Notes: - * - *

    - *
  • MUST NOT be populated when this is not supported by the HTTP server framework as the - * route attribute should have low-cardinality and the URI path can NOT substitute it. - * SHOULD include the application - * root if there is one. - *
- */ - public static final AttributeKey HTTP_ROUTE = stringKey("http.route"); - - /** The name identifies the event. */ - public static final AttributeKey EVENT_NAME = stringKey("event.name"); - - /** - * The domain identifies the business context for the events. - * - *

Notes: - * - *

    - *
  • Events across different domains may have same {@code event.name}, yet be unrelated - * events. - *
- */ - public static final AttributeKey EVENT_DOMAIN = stringKey("event.domain"); - - /** - * A unique identifier for the Log Record. - * - *

Notes: - * - *

    - *
  • If an id is provided, other log records with the same id will be considered duplicates - * and can be removed safely. This means, that two distinguishable log records MUST have - * different values. The id MAY be an Universally - * Unique Lexicographically Sortable Identifier (ULID), but other identifiers (e.g. - * UUID) may be used as needed. - *
- */ - public static final AttributeKey LOG_RECORD_UID = stringKey("log.record.uid"); - - /** - * The full invoked ARN as provided on the {@code Context} passed to the function ({@code - * Lambda-Runtime-Invoked-Function-Arn} header on the {@code /runtime/invocation/next} - * applicable). - * - *

Notes: - * - *

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

Notes: - * - *

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

Notes: - * - *

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

Notes: - * - *

    - *
  • When setting this to an SQL keyword, it is not recommended to attempt any client-side - * parsing of {@code db.statement} just to get this property, but it should be set if the - * operation name is provided by the library being instrumented. If the SQL statement has an - * ambiguous operation, or performs more than one operation, this value may be omitted. - *
- */ - public static final AttributeKey DB_OPERATION = stringKey("db.operation"); - - /** - * The Microsoft SQL Server instance - * name connecting to. This name is used to determine the port of a named instance. - * - *

Notes: - * - *

    - *
  • If setting a {@code db.mssql.instance_name}, {@code net.peer.port} is no longer required - * (but still recommended if non-standard). - *
- */ - public static final AttributeKey DB_MSSQL_INSTANCE_NAME = - stringKey("db.mssql.instance_name"); - - /** The fetch size used for paging, i.e. how many rows will be returned at once. */ - public static final AttributeKey DB_CASSANDRA_PAGE_SIZE = longKey("db.cassandra.page_size"); - - /** - * The 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 name of the primary table that the operation is acting upon, including the keyspace name - * (if applicable). - * - *

Notes: - * - *

    - *
  • This mirrors the db.sql.table attribute but references cassandra rather than sql. It is - * not recommended to attempt any client-side parsing of {@code db.statement} just to get - * this property, but it should be set if it is provided by the library being instrumented. - * If the operation is acting upon an anonymous table, or more than one table, this value - * MUST NOT be set. - *
- */ - public static final AttributeKey DB_CASSANDRA_TABLE = stringKey("db.cassandra.table"); - - /** Whether or not the query is idempotent. */ - public static final AttributeKey DB_CASSANDRA_IDEMPOTENCE = - booleanKey("db.cassandra.idempotence"); - - /** - * 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 DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = - longKey("db.cassandra.speculative_execution_count"); - - /** The ID of the coordinating node for a query. */ - public static final AttributeKey DB_CASSANDRA_COORDINATOR_ID = - stringKey("db.cassandra.coordinator.id"); - - /** The data center of the coordinating node for a query. */ - public static final AttributeKey DB_CASSANDRA_COORDINATOR_DC = - stringKey("db.cassandra.coordinator.dc"); - - /** - * The 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"); - - /** The collection being accessed within the database stated in {@code db.name}. */ - public static final AttributeKey DB_MONGODB_COLLECTION = - stringKey("db.mongodb.collection"); - - /** - * 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"); - - /** Unique Cosmos client instance id. */ - public static final AttributeKey DB_COSMOSDB_CLIENT_ID = - stringKey("db.cosmosdb.client_id"); - - /** CosmosDB Operation Type. */ - public static final AttributeKey DB_COSMOSDB_OPERATION_TYPE = - stringKey("db.cosmosdb.operation_type"); - - /** Cosmos client connection mode. */ - public static final AttributeKey DB_COSMOSDB_CONNECTION_MODE = - stringKey("db.cosmosdb.connection_mode"); - - /** Cosmos DB container name. */ - public static final AttributeKey DB_COSMOSDB_CONTAINER = - stringKey("db.cosmosdb.container"); - - /** 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"); - - /** RU consumed for that operation */ - public static final AttributeKey DB_COSMOSDB_REQUEST_CHARGE = - doubleKey("db.cosmosdb.request_charge"); - - /** - * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status - * code is UNSET. - */ - 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"); - - /** - * Type of the trigger which caused this function invocation. - * - *

Notes: - * - *

    - *
  • For the server/consumer span on the incoming side, {@code faas.trigger} MUST be set. - *
  • Clients invoking FaaS instances usually cannot set {@code faas.trigger}, since they would - * typically need to look in the payload to determine the event type. If clients set it, it - * should be the same as the trigger that corresponding incoming would have (i.e., this has - * nothing to do with the underlying transport used to make the API call to invoke the - * lambda, which is often HTTP). - *
- */ - public static final AttributeKey FAAS_TRIGGER = stringKey("faas.trigger"); - - /** The invocation ID of the current function invocation. */ - public static final AttributeKey FAAS_INVOCATION_ID = stringKey("faas.invocation_id"); - - /** - * 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"); - - /** Describes the type of the operation that was performed on the data. */ - public static final AttributeKey FAAS_DOCUMENT_OPERATION = - stringKey("faas.document.operation"); - - /** - * 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"); - - /** - * 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"); - - /** - * 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 string containing the schedule period as Cron - * Expression. - */ - public static final AttributeKey FAAS_CRON = stringKey("faas.cron"); - - /** - * A boolean that is true if the serverless function is executed for the first time (aka - * cold-start). - */ - public static final AttributeKey FAAS_COLDSTART = booleanKey("faas.coldstart"); - - /** - * The name of the invoked function. - * - *

Notes: - * - *

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

Notes: - * - *

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

Notes: - * - *

    - *
  • SHOULD be equal to the {@code cloud.region} resource attribute of the invoked function. - *
- */ - public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region"); - - /** The unique identifier of the feature flag. */ - public static final AttributeKey FEATURE_FLAG_KEY = stringKey("feature_flag.key"); - - /** 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"); - - /** Transport protocol used. See note below. */ - public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); - - /** Application layer protocol used. The value SHOULD be normalized to lowercase. */ - public static final AttributeKey NET_PROTOCOL_NAME = stringKey("net.protocol.name"); - - /** - * Version of the application layer protocol used. See note below. - * - *

Notes: - * - *

    - *
  • {@code net.protocol.version} refers to the version of the protocol used and might be - * different from the protocol client's version. If the HTTP client used has a version of - * {@code 0.27.2}, but sends HTTP version {@code 1.1}, this attribute should be set to - * {@code 1.1}. - *
- */ - public static final AttributeKey NET_PROTOCOL_VERSION = stringKey("net.protocol.version"); - - /** Remote socket peer name. */ - public static final AttributeKey NET_SOCK_PEER_NAME = stringKey("net.sock.peer.name"); - - /** - * Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, - * etc. - */ - public static final AttributeKey NET_SOCK_PEER_ADDR = stringKey("net.sock.peer.addr"); - - /** Remote socket peer port. */ - public static final AttributeKey NET_SOCK_PEER_PORT = longKey("net.sock.peer.port"); - - /** - * Protocol address - * family which is used for communication. - */ - public static final AttributeKey NET_SOCK_FAMILY = stringKey("net.sock.family"); - - /** - * Logical remote hostname, see note below. - * - *

Notes: - * - *

    - *
  • {@code net.peer.name} SHOULD NOT be set if capturing it would require an extra DNS - * lookup. - *
- */ - public static final AttributeKey NET_PEER_NAME = stringKey("net.peer.name"); - - /** Logical remote port number */ - public static final AttributeKey NET_PEER_PORT = longKey("net.peer.port"); - - /** Logical local hostname or similar, see note below. */ - public static final AttributeKey NET_HOST_NAME = stringKey("net.host.name"); - - /** Logical local port number, preferably the one that the peer used to connect */ - public static final AttributeKey NET_HOST_PORT = longKey("net.host.port"); - - /** Local socket address. Useful in case of a multi-IP host. */ - public static final AttributeKey NET_SOCK_HOST_ADDR = stringKey("net.sock.host.addr"); - - /** Local socket port number. */ - public static final AttributeKey NET_SOCK_HOST_PORT = longKey("net.sock.host.port"); - - /** The internet connection type currently being used by the host. */ - public static final AttributeKey NET_HOST_CONNECTION_TYPE = - stringKey("net.host.connection.type"); - - /** - * This describes more details regarding the connection.type. It may be the type of cell - * technology connection, but it could be used for describing details about a wifi connection. - */ - public static final AttributeKey NET_HOST_CONNECTION_SUBTYPE = - stringKey("net.host.connection.subtype"); - - /** The name of the mobile carrier. */ - public static final AttributeKey NET_HOST_CARRIER_NAME = - stringKey("net.host.carrier.name"); - - /** The mobile carrier country code. */ - public static final AttributeKey NET_HOST_CARRIER_MCC = stringKey("net.host.carrier.mcc"); - - /** The mobile carrier network code. */ - public static final AttributeKey NET_HOST_CARRIER_MNC = stringKey("net.host.carrier.mnc"); - - /** The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. */ - public static final AttributeKey NET_HOST_CARRIER_ICC = stringKey("net.host.carrier.icc"); - - /** - * The {@code service.name} of - * the remote service. SHOULD be equal to the actual {@code service.name} resource attribute of - * the remote service if any. - */ - public static final AttributeKey PEER_SERVICE = stringKey("peer.service"); - - /** - * Username or client_id extracted from the access token or Authorization header in the inbound - * request from outside the system. - */ - public static final AttributeKey ENDUSER_ID = stringKey("enduser.id"); - - /** - * Actual/assumed role the client is making the request under extracted from token or application - * security context. - */ - public static final AttributeKey ENDUSER_ROLE = stringKey("enduser.role"); - - /** - * Scopes or granted authorities the client currently possesses extracted from token or - * application security context. The value would come from the scope associated with an OAuth 2.0 Access Token or an - * attribute value in a SAML - * 2.0 Assertion. - */ - public static final AttributeKey ENDUSER_SCOPE = stringKey("enduser.scope"); - - /** Current "managed" thread ID (as opposed to OS thread ID). */ - public static final AttributeKey THREAD_ID = longKey("thread.id"); - - /** Current thread name. */ - public static final AttributeKey THREAD_NAME = stringKey("thread.name"); - - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - public static final AttributeKey CODE_FUNCTION = stringKey("code.function"); - - /** - * The "namespace" within which {@code code.function} is defined. Usually the qualified - * class or module name, such that {@code code.namespace} + some separator + {@code code.function} - * form a unique identifier for the code unit. - */ - public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); - - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an - * absolute file path). - */ - public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); - - /** - * The line number in {@code code.filepath} best representing the operation. It SHOULD point - * within the code unit named in {@code code.function}. - */ - public static final AttributeKey CODE_LINENO = longKey("code.lineno"); - - /** - * The column number in {@code code.filepath} best representing the operation. It SHOULD point - * within the code unit named in {@code code.function}. - */ - public static final AttributeKey CODE_COLUMN = longKey("code.column"); - - /** - * The size of the request payload body in bytes. This is the number of bytes transferred - * excluding headers and is often, but not always, present as the Content-Length - * header. For requests using transport encoding, this should be the compressed size. - */ - public static final AttributeKey HTTP_REQUEST_CONTENT_LENGTH = - longKey("http.request_content_length"); - - /** - * The size of the response payload body in bytes. This is the number of bytes transferred - * excluding headers and is often, but not always, present as the Content-Length - * header. For requests using transport encoding, this should be the compressed size. - */ - public static final AttributeKey HTTP_RESPONSE_CONTENT_LENGTH = - longKey("http.response_content_length"); - - /** - * Full HTTP request URL in the form {@code scheme://host[:port]/path?query[#fragment]}. Usually - * the fragment is not transmitted over HTTP, but if it is known, it should be included - * nevertheless. - * - *

Notes: - * - *

    - *
  • {@code http.url} MUST NOT contain credentials passed via URL in form of {@code - * https://username:password@www.example.com/}. In such case the attribute's value should be - * {@code https://www.example.com/}. - *
- */ - public static final AttributeKey HTTP_URL = stringKey("http.url"); - - /** - * The ordinal number of request resending attempt (for any reason, including redirects). - * - *

Notes: - * - *

    - *
  • The resend count SHOULD be updated each time an HTTP request gets resent by the client, - * regardless of what was the cause of the resending (e.g. redirection, authorization - * failure, 503 Server Unavailable, network issues, or any other). - *
- */ - public static final AttributeKey HTTP_RESEND_COUNT = longKey("http.resend_count"); - - /** The full request target as passed in a HTTP request line or equivalent. */ - public static final AttributeKey HTTP_TARGET = stringKey("http.target"); - - /** - * The IP address of the original client behind all proxies, if known (e.g. from X-Forwarded-For). - * - *

Notes: - * - *

    - *
  • This is not necessarily the same as {@code net.sock.peer.addr}, which would identify the - * network-level peer, which may be a proxy. - *
  • This attribute should be set when a source of information different from the one used for - * {@code net.sock.peer.addr}, is available even if that other source just confirms the same - * value as {@code net.sock.peer.addr}. Rationale: For {@code net.sock.peer.addr}, one - * typically does not know if it comes from a proxy, reverse proxy, or the actual client. - * Setting {@code http.client_ip} when it's the same as {@code net.sock.peer.addr} means - * that one is at least somewhat confident that the address is not that of the closest - * proxy. - *
- */ - public static final AttributeKey HTTP_CLIENT_IP = stringKey("http.client_ip"); - - /** - * The AWS request ID as returned in the response headers {@code x-amz-request-id} or {@code - * x-amz-requestid}. - */ - public static final AttributeKey AWS_REQUEST_ID = stringKey("aws.request_id"); - - /** The keys in the {@code RequestItems} object field. */ - public static final AttributeKey> AWS_DYNAMODB_TABLE_NAMES = - stringArrayKey("aws.dynamodb.table_names"); - - /** The 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 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 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 ConsistentRead} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_CONSISTENT_READ = - booleanKey("aws.dynamodb.consistent_read"); - - /** The value of the {@code ProjectionExpression} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_PROJECTION = - stringKey("aws.dynamodb.projection"); - - /** The value of the {@code Limit} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_LIMIT = longKey("aws.dynamodb.limit"); - - /** The value of the {@code AttributesToGet} request parameter. */ - public static final AttributeKey> AWS_DYNAMODB_ATTRIBUTES_TO_GET = - stringArrayKey("aws.dynamodb.attributes_to_get"); - - /** The value of the {@code IndexName} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_INDEX_NAME = - stringKey("aws.dynamodb.index_name"); - - /** The value of the {@code Select} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_SELECT = stringKey("aws.dynamodb.select"); - - /** The 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 Segment} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_SEGMENT = longKey("aws.dynamodb.segment"); - - /** The value of the {@code TotalSegments} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_TOTAL_SEGMENTS = - longKey("aws.dynamodb.total_segments"); - - /** The value of the {@code Count} response parameter. */ - public static final AttributeKey AWS_DYNAMODB_COUNT = longKey("aws.dynamodb.count"); - - /** The value of the {@code ScannedCount} response parameter. */ - public static final AttributeKey AWS_DYNAMODB_SCANNED_COUNT = - longKey("aws.dynamodb.scanned_count"); - - /** 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 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 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"); - - /** - * Upload ID that identifies the multipart upload. - * - *

Notes: - * - *

- */ - public static final AttributeKey AWS_S3_UPLOAD_ID = stringKey("aws.s3.upload_id"); - - /** - * The delete request container that specifies the objects to be deleted. - * - *

Notes: - * - *

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

Notes: - * - *

- */ - public static final AttributeKey AWS_S3_PART_NUMBER = longKey("aws.s3.part_number"); - - /** The name of the operation being executed. */ - public static final AttributeKey GRAPHQL_OPERATION_NAME = - stringKey("graphql.operation.name"); - - /** The type of the operation being executed. */ - public static final AttributeKey GRAPHQL_OPERATION_TYPE = - stringKey("graphql.operation.type"); - - /** - * The GraphQL document being executed. - * - *

Notes: - * - *

    - *
  • The value may be sanitized to exclude sensitive information. - *
- */ - public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); - - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message.id"); - - /** - * The conversation ID identifying the conversation to which the - * message belongs, represented as a string. Sometimes called "Correlation ID". - */ - public static final AttributeKey MESSAGING_MESSAGE_CONVERSATION_ID = - stringKey("messaging.message.conversation_id"); - - /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is - * unknown whether the compressed or uncompressed payload size is reported. - */ - public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = - longKey("messaging.message.payload_size_bytes"); - - /** The compressed size of the message payload in bytes. */ - public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = - longKey("messaging.message.payload_compressed_size_bytes"); - - /** - * 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. - *
- */ - public static final AttributeKey MESSAGING_DESTINATION_NAME = - stringKey("messaging.destination.name"); - - /** - * Low cardinality representation of the messaging destination name - * - *

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. - *
- */ - public static final AttributeKey MESSAGING_DESTINATION_TEMPLATE = - stringKey("messaging.destination.template"); - - /** - * A boolean that is true if the message destination is temporary and might not exist anymore - * after messages are processed. - */ - public static final AttributeKey MESSAGING_DESTINATION_TEMPORARY = - booleanKey("messaging.destination.temporary"); - - /** - * A boolean that is true if the message destination is anonymous (could be unnamed or have - * auto-generated name). - */ - public static final AttributeKey MESSAGING_DESTINATION_ANONYMOUS = - booleanKey("messaging.destination.anonymous"); - - /** - * The message source name - * - *

Notes: - * - *

    - *
  • Source name SHOULD uniquely identify a specific queue, topic, or other entity within the - * broker. If the broker does not have such notion, the source name SHOULD uniquely identify - * the broker. - *
- */ - public static final AttributeKey MESSAGING_SOURCE_NAME = - stringKey("messaging.source.name"); - - /** - * Low cardinality representation of the messaging source name - * - *

Notes: - * - *

    - *
  • Source names could be constructed from templates. An example would be a source name - * involving a user name or product id. Although the source 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 MESSAGING_SOURCE_TEMPLATE = - stringKey("messaging.source.template"); - - /** - * A boolean that is true if the message source is temporary and might not exist anymore after - * messages are processed. - */ - public static final AttributeKey MESSAGING_SOURCE_TEMPORARY = - booleanKey("messaging.source.temporary"); - - /** - * A boolean that is true if the message source is anonymous (could be unnamed or have - * auto-generated name). - */ - public static final AttributeKey MESSAGING_SOURCE_ANONYMOUS = - booleanKey("messaging.source.anonymous"); - - /** A string identifying the messaging system. */ - public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); - - /** - * A string identifying the kind of messaging operation as defined in the Operation names section above. - * - *

Notes: - * - *

    - *
  • If a custom value is used, it MUST be of low cardinality. - *
- */ - public static final AttributeKey MESSAGING_OPERATION = stringKey("messaging.operation"); - - /** - * The number of messages sent, received, or processed in the scope of the batching operation. - * - *

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. - *
- */ - public static final AttributeKey MESSAGING_BATCH_MESSAGE_COUNT = - longKey("messaging.batch.message_count"); - - /** - * The identifier for the consumer receiving a message. For Kafka, set it to {@code - * {messaging.kafka.consumer.group} - {messaging.kafka.client_id}}, if both are present, or only - * {@code messaging.kafka.consumer.group}. For brokers, such as RabbitMQ and Artemis, set it to - * the {@code client_id} of the client consuming the message. - */ - public static final AttributeKey MESSAGING_CONSUMER_ID = - stringKey("messaging.consumer.id"); - - /** RabbitMQ message routing key. */ - public static final AttributeKey MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = - stringKey("messaging.rabbitmq.destination.routing_key"); - - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the - * same partition. They differ from {@code messaging.message.id} in that they're not unique. If - * the key is {@code null}, the attribute MUST NOT be set. - * - *

Notes: - * - *

    - *
  • If the key type is not string, it's string representation has to be supplied for the - * attribute. If the key has no unambiguous, canonical string form, don't include its value. - *
- */ - public static final AttributeKey MESSAGING_KAFKA_MESSAGE_KEY = - stringKey("messaging.kafka.message.key"); - - /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not - * producers. - */ - public static final AttributeKey MESSAGING_KAFKA_CONSUMER_GROUP = - stringKey("messaging.kafka.consumer.group"); - - /** Client Id for the Consumer or Producer that is handling the message. */ - public static final AttributeKey MESSAGING_KAFKA_CLIENT_ID = - stringKey("messaging.kafka.client_id"); - - /** Partition the message is sent to. */ - public static final AttributeKey MESSAGING_KAFKA_DESTINATION_PARTITION = - longKey("messaging.kafka.destination.partition"); - - /** Partition the message is received from. */ - public static final AttributeKey MESSAGING_KAFKA_SOURCE_PARTITION = - longKey("messaging.kafka.source.partition"); - - /** 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"); - - /** Namespace of RocketMQ resources, resources in different namespaces are individual. */ - public static final AttributeKey MESSAGING_ROCKETMQ_NAMESPACE = - stringKey("messaging.rocketmq.namespace"); - - /** - * Name of the RocketMQ producer/consumer group that is handling the message. The client type is - * identified by the SpanKind. - */ - public static final AttributeKey MESSAGING_ROCKETMQ_CLIENT_GROUP = - stringKey("messaging.rocketmq.client_group"); - - /** The unique identifier for each client. */ - public static final AttributeKey MESSAGING_ROCKETMQ_CLIENT_ID = - stringKey("messaging.rocketmq.client_id"); - - /** - * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. - */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = - longKey("messaging.rocketmq.message.delivery_timestamp"); - - /** The delay time level for delay message, which determines the message delay time. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = - longKey("messaging.rocketmq.message.delay_time_level"); - - /** - * It is essential for FIFO message. Messages that belong to the same message group are always - * processed one by one within the same consumer group. - */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_GROUP = - stringKey("messaging.rocketmq.message.group"); - - /** Type of message. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TYPE = - stringKey("messaging.rocketmq.message.type"); - - /** The secondary classifier of message besides topic. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TAG = - stringKey("messaging.rocketmq.message.tag"); - - /** Key(s) of message, another way to mark message besides message id. */ - public static final AttributeKey> MESSAGING_ROCKETMQ_MESSAGE_KEYS = - stringArrayKey("messaging.rocketmq.message.keys"); - - /** Model of message consumption. This only applies to consumer spans. */ - public static final AttributeKey MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = - stringKey("messaging.rocketmq.consumption_model"); - - /** A string identifying the remoting system. See below for a list of well-known identifiers. */ - public static final AttributeKey RPC_SYSTEM = stringKey("rpc.system"); - - /** - * The full (logical) name of the service being called, including its package name, if applicable. - * - *

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). - *
- */ - public static final AttributeKey RPC_SERVICE = stringKey("rpc.service"); - - /** - * The name of the (logical) method being called, must be equal to the $method part in the span - * name. - * - *

Notes: - * - *

    - *
  • This is the logical name of the method from the RPC interface perspective, which can be - * different from the name of any implementing method/function. The {@code code.function} - * attribute may be used to store the latter (e.g., method actually executing the call on - * the server side, RPC client stub method on the client side). - *
- */ - public static final AttributeKey RPC_METHOD = stringKey("rpc.method"); - - /** - * The numeric status - * code of the gRPC request. - */ - public static final AttributeKey RPC_GRPC_STATUS_CODE = longKey("rpc.grpc.status_code"); - - /** - * Protocol version as in {@code jsonrpc} property of request/response. Since JSON-RPC 1.0 does - * not specify this, the value can be omitted. - */ - public static final AttributeKey RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version"); - - /** - * {@code 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"); - - /** {@code error.code} property of response if it is an error response. */ - public static final AttributeKey RPC_JSONRPC_ERROR_CODE = longKey("rpc.jsonrpc.error_code"); - - /** {@code error.message} property of response if it is an error response. */ - public static final AttributeKey RPC_JSONRPC_ERROR_MESSAGE = - stringKey("rpc.jsonrpc.error_message"); - - /** Whether this is a received or sent message. */ - public static final AttributeKey MESSAGE_TYPE = stringKey("message.type"); - - /** - * MUST be calculated as two different counters starting from {@code 1} one for sent messages and - * one for received message. - * - *

Notes: - * - *

    - *
  • This way we guarantee that the values will be consistent between different - * implementations. - *
- */ - public static final AttributeKey MESSAGE_ID = longKey("message.id"); - - /** Compressed size of the message in bytes. */ - public static final AttributeKey MESSAGE_COMPRESSED_SIZE = - longKey("message.compressed_size"); - - /** Uncompressed size of the message in bytes. */ - 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. - * - *

Notes: - * - *

    - *
  • An exception is considered to have escaped (or left) the scope of a span, if that span is - * ended while the exception is still logically "in flight". This may be actually - * "in flight" in some languages (e.g. if the exception is passed to a Context - * manager's {@code __exit__} method in Python) but will usually be caught at the point of - * recording the exception in most languages. - *
  • It is usually not possible to determine at the point where an exception is thrown whether - * it will escape the scope of a span. However, it is trivial to know that an exception will - * escape, if one checks for an active exception just before ending the span, as done in the - * example above. - *
  • It follows that an exception may still escape the scope of the span even if the {@code - * exception.escaped} attribute was not set or set to false, since the event might have been - * recorded at a time where it was not clear whether the exception will escape. - *
- */ - public static final AttributeKey EXCEPTION_ESCAPED = booleanKey("exception.escaped"); - - /** - * Value of the HTTP - * User-Agent header sent by the client. - */ - public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); - - // Enum definitions - public static final class EventDomainValues { - /** Events from browser apps. */ - public static final String BROWSER = "browser"; - - /** Events from mobile apps. */ - public static final String DEVICE = "device"; - - /** Events from Kubernetes. */ - public static final String K8S = "k8s"; - - private EventDomainValues() {} - } - - public static final class 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. */ - public static final String FOLLOWS_FROM = "follows_from"; - - private OpentracingRefTypeValues() {} - } - - public static final class DbSystemValues { - /** Some other SQL database. Fallback only. See notes. */ - public static final String OTHER_SQL = "other_sql"; - - /** Microsoft SQL Server. */ - public static final String MSSQL = "mssql"; - - /** Microsoft SQL Server Compact. */ - public static final String MSSQLCOMPACT = "mssqlcompact"; - - /** MySQL. */ - public static final String MYSQL = "mysql"; - - /** Oracle Database. */ - public static final String ORACLE = "oracle"; - - /** IBM Db2. */ - public static final String DB2 = "db2"; - - /** PostgreSQL. */ - public static final String POSTGRESQL = "postgresql"; - - /** Amazon Redshift. */ - public static final String REDSHIFT = "redshift"; - - /** Apache Hive. */ - public static final String HIVE = "hive"; - - /** Cloudscape. */ - public static final String CLOUDSCAPE = "cloudscape"; - - /** HyperSQL DataBase. */ - public static final String HSQLDB = "hsqldb"; - - /** Progress Database. */ - public static final String PROGRESS = "progress"; - - /** SAP MaxDB. */ - public static final String MAXDB = "maxdb"; - - /** SAP HANA. */ - public static final String HANADB = "hanadb"; - - /** Ingres. */ - public static final String INGRES = "ingres"; - - /** FirstSQL. */ - public static final String FIRSTSQL = "firstsql"; - - /** EnterpriseDB. */ - public static final String EDB = "edb"; - - /** InterSystems Caché. */ - public static final String CACHE = "cache"; - - /** Adabas (Adaptable Database System). */ - public static final String ADABAS = "adabas"; - - /** Firebird. */ - public static final String FIREBIRD = "firebird"; - - /** Apache Derby. */ - public static final String DERBY = "derby"; - - /** FileMaker. */ - public static final String FILEMAKER = "filemaker"; - - /** Informix. */ - public static final String INFORMIX = "informix"; - - /** InstantDB. */ - public static final String INSTANTDB = "instantdb"; - - /** InterBase. */ - public static final String INTERBASE = "interbase"; - - /** MariaDB. */ - public static final String MARIADB = "mariadb"; - - /** Netezza. */ - public static final String NETEZZA = "netezza"; - - /** Pervasive PSQL. */ - public static final String PERVASIVE = "pervasive"; - - /** PointBase. */ - public static final String POINTBASE = "pointbase"; - - /** SQLite. */ - public static final String SQLITE = "sqlite"; - - /** Sybase. */ - public static final String SYBASE = "sybase"; - - /** Teradata. */ - public static final String TERADATA = "teradata"; - - /** Vertica. */ - public static final String VERTICA = "vertica"; - - /** H2. */ - public static final String H2 = "h2"; - - /** ColdFusion IMQ. */ - public static final String COLDFUSION = "coldfusion"; - - /** Apache Cassandra. */ - public static final String CASSANDRA = "cassandra"; - - /** Apache HBase. */ - public static final String HBASE = "hbase"; - - /** MongoDB. */ - public static final String MONGODB = "mongodb"; - - /** Redis. */ - public static final String REDIS = "redis"; - - /** Couchbase. */ - public static final String COUCHBASE = "couchbase"; - - /** CouchDB. */ - public static final String COUCHDB = "couchdb"; - - /** Microsoft Azure Cosmos DB. */ - public static final String COSMOSDB = "cosmosdb"; - - /** Amazon DynamoDB. */ - public static final String DYNAMODB = "dynamodb"; - - /** Neo4j. */ - public static final String NEO4J = "neo4j"; - - /** Apache Geode. */ - public static final String GEODE = "geode"; - - /** Elasticsearch. */ - public static final String ELASTICSEARCH = "elasticsearch"; - - /** Memcached. */ - public static final String MEMCACHED = "memcached"; - - /** CockroachDB. */ - public static final String COCKROACHDB = "cockroachdb"; - - /** OpenSearch. */ - public static final String OPENSEARCH = "opensearch"; - - /** ClickHouse. */ - public static final String CLICKHOUSE = "clickhouse"; - - /** Cloud Spanner. */ - public static final String SPANNER = "spanner"; - - /** Trino. */ - public static final String TRINO = "trino"; - - private DbSystemValues() {} - } - - public static final class DbCassandraConsistencyLevelValues { - /** all. */ - public static final String ALL = "all"; - - /** each_quorum. */ - public static final String EACH_QUORUM = "each_quorum"; - - /** quorum. */ - public static final String QUORUM = "quorum"; - - /** local_quorum. */ - public static final String LOCAL_QUORUM = "local_quorum"; - - /** one. */ - public static final String ONE = "one"; - - /** two. */ - public static final String TWO = "two"; - - /** three. */ - public static final String THREE = "three"; - - /** local_one. */ - public static final String LOCAL_ONE = "local_one"; - - /** any. */ - public static final String ANY = "any"; - - /** serial. */ - public static final String SERIAL = "serial"; - - /** local_serial. */ - public static final String LOCAL_SERIAL = "local_serial"; - - private DbCassandraConsistencyLevelValues() {} - } - - public static final class DbCosmosdbOperationTypeValues { - /** invalid. */ - public static final String INVALID = "Invalid"; - - /** create. */ - public static final String CREATE = "Create"; - - /** patch. */ - public static final String PATCH = "Patch"; - - /** read. */ - public static final String READ = "Read"; - - /** read_feed. */ - public static final String READ_FEED = "ReadFeed"; - - /** delete. */ - public static final String DELETE = "Delete"; - - /** replace. */ - public static final String REPLACE = "Replace"; - - /** execute. */ - public static final String EXECUTE = "Execute"; - - /** query. */ - public static final String QUERY = "Query"; - - /** head. */ - public static final String HEAD = "Head"; - - /** head_feed. */ - public static final String HEAD_FEED = "HeadFeed"; - - /** upsert. */ - public static final String UPSERT = "Upsert"; - - /** batch. */ - public static final String BATCH = "Batch"; - - /** query_plan. */ - public static final String QUERY_PLAN = "QueryPlan"; - - /** execute_javascript. */ - public static final String EXECUTE_JAVASCRIPT = "ExecuteJavaScript"; - - private DbCosmosdbOperationTypeValues() {} - } - - public static final class DbCosmosdbConnectionModeValues { - /** Gateway (HTTP) connections mode. */ - public static final String GATEWAY = "gateway"; - - /** Direct connection. */ - public static final String DIRECT = "direct"; - - private DbCosmosdbConnectionModeValues() {} - } - - public static final class OtelStatusCodeValues { - /** - * The operation has been validated by an Application developer or Operator to have completed - * successfully. - */ - public static final String OK = "OK"; - - /** The operation contains an error. */ - public static final String ERROR = "ERROR"; - - private OtelStatusCodeValues() {} - } - - public static final class FaasTriggerValues { - /** A response to some data source operation such as a database or filesystem read/write. */ - public static final String DATASOURCE = "datasource"; - - /** To provide an answer to an inbound HTTP request. */ - public static final String HTTP = "http"; - - /** A function is set to be executed when messages are sent to a messaging system. */ - public static final String PUBSUB = "pubsub"; - - /** A function is scheduled to be executed regularly. */ - public static final String TIMER = "timer"; - - /** If none of the others apply. */ - public static final String OTHER = "other"; - - private FaasTriggerValues() {} - } - - public static final class FaasDocumentOperationValues { - /** When a new object is created. */ - public static final String INSERT = "insert"; - - /** When an object is modified. */ - public static final String EDIT = "edit"; - - /** When an object is deleted. */ - public static final String DELETE = "delete"; - - private FaasDocumentOperationValues() {} - } - - public static final class FaasInvokedProviderValues { - /** Alibaba Cloud. */ - public static final String ALIBABA_CLOUD = "alibaba_cloud"; - - /** Amazon Web Services. */ - public static final String AWS = "aws"; - - /** Microsoft Azure. */ - public static final String AZURE = "azure"; - - /** Google Cloud Platform. */ - public static final String GCP = "gcp"; - - /** Tencent Cloud. */ - public static final String TENCENT_CLOUD = "tencent_cloud"; - - private FaasInvokedProviderValues() {} - } - - public static final class 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. */ - 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"; - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. - */ - @Deprecated public static final String IP = "ip"; - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. - */ - @Deprecated public static final String UNIX = "unix"; - - private NetTransportValues() {} - } - - 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 NetHostConnectionTypeValues { - /** 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 NetHostConnectionTypeValues() {} - } - - public static final class NetHostConnectionSubtypeValues { - /** GPRS. */ - public static final String GPRS = "gprs"; - - /** EDGE. */ - public static final String EDGE = "edge"; - - /** UMTS. */ - public static final String UMTS = "umts"; - - /** CDMA. */ - public static final String CDMA = "cdma"; - - /** EVDO Rel. 0. */ - public static final String EVDO_0 = "evdo_0"; - - /** EVDO Rev. A. */ - public static final String EVDO_A = "evdo_a"; - - /** CDMA2000 1XRTT. */ - public static final String CDMA2000_1XRTT = "cdma2000_1xrtt"; - - /** HSDPA. */ - public static final String HSDPA = "hsdpa"; - - /** HSUPA. */ - public static final String HSUPA = "hsupa"; - - /** HSPA. */ - public static final String HSPA = "hspa"; - - /** IDEN. */ - public static final String IDEN = "iden"; - - /** EVDO Rev. B. */ - public static final String EVDO_B = "evdo_b"; - - /** LTE. */ - public static final String LTE = "lte"; - - /** EHRPD. */ - public static final String EHRPD = "ehrpd"; - - /** HSPAP. */ - public static final String HSPAP = "hspap"; - - /** GSM. */ - public static final String GSM = "gsm"; - - /** TD-SCDMA. */ - public static final String TD_SCDMA = "td_scdma"; - - /** IWLAN. */ - public static final String IWLAN = "iwlan"; - - /** 5G NR (New Radio). */ - public static final String NR = "nr"; - - /** 5G NRNSA (New Radio Non-Standalone). */ - public static final String NRNSA = "nrnsa"; - - /** LTE CA. */ - public static final String LTE_CA = "lte_ca"; - - private NetHostConnectionSubtypeValues() {} - } - - public static final class GraphqlOperationTypeValues { - /** GraphQL query. */ - public static final String QUERY = "query"; - - /** GraphQL mutation. */ - public static final String MUTATION = "mutation"; - - /** GraphQL subscription. */ - public static final String SUBSCRIPTION = "subscription"; - - 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 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 MessagingRocketmqConsumptionModelValues { - /** Clustering consumption model. */ - public static final String CLUSTERING = "clustering"; - - /** Broadcasting consumption model. */ - public static final String BROADCASTING = "broadcasting"; - - private MessagingRocketmqConsumptionModelValues() {} - } - - public static final class RpcSystemValues { - /** gRPC. */ - public static final String GRPC = "grpc"; - - /** 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"; - - /** received. */ - public static final String RECEIVED = "RECEIVED"; - - 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. - * - *

Typically an event with that name should not be manually created. Instead {@link - * io.opentelemetry.api.trace.Span#recordException(Throwable)} should be used. - */ - public static final String EXCEPTION_EVENT_NAME = "exception"; - - /** - * The name of the keyspace being accessed. - * - * @deprecated this item has been removed as of 1.8.0 of the semantic conventions. Please use - * {@link SemanticAttributes#DB_NAME} instead. - */ - @Deprecated - public static final AttributeKey DB_CASSANDRA_KEYSPACE = - stringKey("db.cassandra.keyspace"); - - /** - * The HBase namespace being accessed. - * - * @deprecated this item has been removed as of 1.8.0 of the semantic conventions. Please use - * {@link SemanticAttributes#DB_NAME} instead. - */ - @Deprecated - public static final AttributeKey DB_HBASE_NAMESPACE = stringKey("db.hbase.namespace"); - - /** - * The size of the uncompressed request payload body after transport decoding. Not set if - * transport encoding not used. - * - * @deprecated this item has been removed as of 1.13.0 of the semantic conventions. Please use - * {@link SemanticAttributes#HTTP_REQUEST_CONTENT_LENGTH} instead. - */ - @Deprecated - public static final AttributeKey HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = - longKey("http.request_content_length_uncompressed"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use - * {@link SemanticAttributes#HTTP_RESPONSE_CONTENT_LENGTH} instead. - */ - @Deprecated - public static final AttributeKey HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = - longKey("http.response_content_length_uncompressed"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use - * {@link SemanticAttributes#NET_HOST_NAME} instead. - */ - @Deprecated - public static final AttributeKey HTTP_SERVER_NAME = stringKey("http.server_name"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use - * {@link SemanticAttributes#NET_HOST_NAME} instead. - */ - @Deprecated public static final AttributeKey HTTP_HOST = stringKey("http.host"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use - * {@link SemanticAttributes#NET_SOCK_PEER_ADDR} instead. - */ - @Deprecated public static final AttributeKey NET_PEER_IP = stringKey("net.peer.ip"); - - /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use - * {@link SemanticAttributes#NET_SOCK_HOST_ADDR} instead. - */ - @Deprecated public static final AttributeKey NET_HOST_IP = stringKey("net.host.ip"); - - /** - * The ordinal number of request re-sending attempt. - * - * @deprecated This item has been removed as of 1.15.0 of the semantic conventions. Use {@link - * SemanticAttributes#HTTP_RESEND_COUNT} instead. - */ - @Deprecated public static final AttributeKey HTTP_RETRY_COUNT = longKey("http.retry_count"); - - /** - * A string identifying the messaging system. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#MESSAGING_DESTINATION_NAME} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_DESTINATION = - stringKey("messaging.destination"); - - /** - * A boolean that is true if the message destination is temporary. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#MESSAGING_DESTINATION_TEMPORARY} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_TEMP_DESTINATION = - booleanKey("messaging.temp_destination"); - - /** - * The name of the transport protocol. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#NET_PROTOCOL_NAME} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_PROTOCOL = stringKey("messaging.protocol"); - - /** - * The version of the transport protocol. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#NET_PROTOCOL_VERSION} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_PROTOCOL_VERSION = - stringKey("messaging.protocol_version"); - - /** - * Connection string. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. There is no - * replacement. - */ - @Deprecated public static final AttributeKey MESSAGING_URL = stringKey("messaging.url"); - - /** - * The conversation ID identifying the conversation to which the - * message belongs, represented as a string. Sometimes called "Correlation ID". - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#MESSAGING_MESSAGE_CONVERSATION_ID} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_CONVERSATION_ID = - stringKey("messaging.conversation_id"); - - /** - * RabbitMQ message routing key. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_RABBITMQ_ROUTING_KEY = - stringKey("messaging.rabbitmq.routing_key"); - - /** - * Partition the message is received from. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#MESSAGING_KAFKA_SOURCE_PARTITION} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_KAFKA_PARTITION = - longKey("messaging.kafka.partition"); - - /** - * A boolean that is true if the message is a tombstone. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#MESSAGING_KAFKA_MESSAGE_TOMBSTONE} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_KAFKA_TOMBSTONE = - booleanKey("messaging.kafka.tombstone"); - - /** - * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_ROCKETMQ_DELIVERY_TIMESTAMP = - longKey("messaging.rocketmq.delivery_timestamp"); - - /** - * The delay time level for delay message, which determines the message delay time. - * - * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link - * SemanticAttributes#MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL} instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_ROCKETMQ_DELAY_TIME_LEVEL = - longKey("messaging.rocketmq.delay_time_level"); - - /** - * The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). - * - * @deprecated This item has been moved, use {@link - * io.opentelemetry.semconv.resource.attributes.ResourceAttributes#OTEL_SCOPE_NAME} instead. - */ - @Deprecated - public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); - - /** - * The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). - * - * @deprecated This item has been moved, use {@link - * io.opentelemetry.semconv.resource.attributes.ResourceAttributes#OTEL_SCOPE_VERSION} - * instead. - */ - @Deprecated - public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); - - /** - * The execution ID of the current function execution. - * - * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use - * {@link SemanticAttributes#FAAS_INVOCATION_ID} instead. - */ - @Deprecated public static final AttributeKey FAAS_EXECUTION = stringKey("faas.execution"); - - /** - * Value of the HTTP - * User-Agent header sent by the client. - * - * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use - * {@link SemanticAttributes#USER_AGENT_ORIGINAL} instead. - */ - @Deprecated - public static final AttributeKey HTTP_USER_AGENT = stringKey("http.user_agent"); - - /** - * Deprecated. - * - * @deprecated Deprecated, use the {@link - * io.opentelemetry.semconv.resource.attributes.ResourceAttributes#OTEL_SCOPE_NAME} attribute. - */ - @Deprecated - public static final AttributeKey OTEL_LIBRARY_NAME = stringKey("otel.library.name"); - - /** - * Deprecated. - * - * @deprecated Deprecated, use the {@link - * io.opentelemetry.semconv.resource.attributes.ResourceAttributes#OTEL_SCOPE_VERSION} - * attribute. - */ - @Deprecated - public static final AttributeKey OTEL_LIBRARY_VERSION = stringKey("otel.library.version"); - - /** - * Kind of HTTP protocol used. - * - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated public static final AttributeKey HTTP_FLAVOR = stringKey("http.flavor"); - - /** - * Enum definitions for {@link #HTTP_FLAVOR}. - * - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final class HttpFlavorValues { - /** HTTP/1.0. */ - public static final String HTTP_1_0 = "1.0"; - - /** HTTP/1.1. */ - public static final String HTTP_1_1 = "1.1"; - - /** HTTP/2. */ - public static final String HTTP_2_0 = "2.0"; - - /** HTTP/3. */ - public static final String HTTP_3_0 = "3.0"; - - /** SPDY protocol. */ - public static final String SPDY = "SPDY"; - - /** QUIC protocol. */ - public static final String QUIC = "QUIC"; - - private HttpFlavorValues() {} - } - - /** - * Application layer protocol used. The value SHOULD be normalized to lowercase. - * - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. Use {@link - * SemanticAttributes#NET_PROTOCOL_NAME} instead. - */ - @Deprecated - public static final AttributeKey NET_APP_PROTOCOL_NAME = - stringKey("net.app.protocol.name"); - - /** - * Version of the application layer protocol used. See note below. - * - *

Notes: - * - *

    - *
  • {@code net.app.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 This item has been removed as of 1.20.0 of the semantic conventions. Use {@link - * SemanticAttributes#NET_PROTOCOL_VERSION} instead. - */ - @Deprecated - public static final AttributeKey NET_APP_PROTOCOL_VERSION = - stringKey("net.app.protocol.version"); - - /** - * The kind of message destination. - * - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final AttributeKey MESSAGING_DESTINATION_KIND = - stringKey("messaging.destination.kind"); - - /** - * Enum values for {@link #MESSAGING_DESTINATION_KIND}. - * - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final class MessagingDestinationKindValues { - /** A message sent to a queue. */ - public static final String QUEUE = "queue"; - - /** A message sent to a topic. */ - public static final String TOPIC = "topic"; - - private MessagingDestinationKindValues() {} - } - - /** - * The kind of message source. - * - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final AttributeKey MESSAGING_SOURCE_KIND = - stringKey("messaging.source.kind"); - - /** - * Enum values for {@link #MESSAGING_SOURCE_KIND}. - * - * @deprecated This item has been removed as of 1.20.0 of the semantic conventions. - */ - @Deprecated - public static final class MessagingSourceKindValues { - /** A message received from a queue. */ - public static final String QUEUE = "queue"; - - /** A message received from a topic. */ - public static final String TOPIC = "topic"; - - private MessagingSourceKindValues() {} - } - - private SemanticAttributes() {} -} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/package-info.java b/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/package-info.java deleted file mode 100644 index 15f7b0cb460..00000000000 --- a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * OpenTelemetry semantic attributes for traces. - * - * @see io.opentelemetry.semconv.trace.attributes.SemanticAttributes - */ -@ParametersAreNonnullByDefault -package io.opentelemetry.semconv.trace.attributes; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/settings.gradle.kts b/settings.gradle.kts index cc4903adc9c..f1108d9e0c9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -24,7 +24,6 @@ rootProject.name = "opentelemetry-java" include(":all") include(":api:all") include(":api:events") -include(":semconv") include(":bom") include(":bom-alpha") include(":context")