From 5eb4fa74507398c9b09d4529019e487dea93ffd7 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 10 Nov 2022 14:01:45 +0100 Subject: [PATCH] Fix #1758 --- .../trace/semantic_conventions.h | 49 +++++++++++++++++-- buildscripts/semantic-convention/generate.sh | 2 +- .../sdk/resource/semantic_conventions.h | 22 ++++++++- 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/api/include/opentelemetry/trace/semantic_conventions.h b/api/include/opentelemetry/trace/semantic_conventions.h index 063b49cf97..504e64270e 100644 --- a/api/include/opentelemetry/trace/semantic_conventions.h +++ b/api/include/opentelemetry/trace/semantic_conventions.h @@ -33,7 +33,7 @@ namespace SemanticConventions /** * The URL of the OpenTelemetry schema for these keys and values. */ -static constexpr const char *SCHEMA_URL = "https://opentelemetry.io/schemas/1.14.0"; +static constexpr const char *SCHEMA_URL = "https://opentelemetry.io/schemas/1.15.0"; /** * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of @@ -257,6 +257,17 @@ static constexpr const char *DB_MONGODB_COLLECTION = "db.mongodb.collection"; */ static constexpr const char *DB_SQL_TABLE = "db.sql.table"; +/** + * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code + * is UNSET. + */ +static constexpr const char *OTEL_STATUS_CODE = "otel.status_code"; + +/** + * Description of the Status if it has a value, otherwise not set. + */ +static constexpr const char *OTEL_STATUS_DESCRIPTION = "otel.status_description"; + /** * Type of the trigger which caused this function execution. * @@ -571,9 +582,14 @@ static constexpr const char *HTTP_RESPONSE_CONTENT_LENGTH = "http.response_conte static constexpr const char *HTTP_URL = "http.url"; /** - * The ordinal number of request re-sending attempt. + * The ordinal number of request resending attempt (for any reason, including redirects). + * + *

Notes: +

*/ -static constexpr const char *HTTP_RETRY_COUNT = "http.retry_count"; +static constexpr const char *HTTP_RESEND_COUNT = "http.resend_count"; /** * The URI scheme identifying the used protocol. @@ -879,6 +895,24 @@ static constexpr const char *MESSAGING_ROCKETMQ_CLIENT_GROUP = "messaging.rocket */ static constexpr const char *MESSAGING_ROCKETMQ_CLIENT_ID = "messaging.rocketmq.client_id"; +/** + * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. + */ +static constexpr const char *MESSAGING_ROCKETMQ_DELIVERY_TIMESTAMP = + "messaging.rocketmq.delivery_timestamp"; + +/** + * The delay time level for delay message, which determines the message delay time. + */ +static constexpr const char *MESSAGING_ROCKETMQ_DELAY_TIME_LEVEL = + "messaging.rocketmq.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. + */ +static constexpr const char *MESSAGING_ROCKETMQ_MESSAGE_GROUP = "messaging.rocketmq.message_group"; + /** * Type of message. */ @@ -1103,6 +1137,15 @@ static constexpr const char *SERIAL = "serial"; static constexpr const char *LOCAL_SERIAL = "local_serial"; } // namespace DbCassandraConsistencyLevelValues +namespace OtelStatusCodeValues +{ +/** The operation has been validated by an Application developer or Operator to have completed + * successfully. */ +static constexpr const char *OK = "OK"; +/** The operation contains an error. */ +static constexpr const char *ERROR = "ERROR"; +} // namespace OtelStatusCodeValues + namespace FaasTriggerValues { /** A response to some data source operation such as a database or filesystem read/write. */ diff --git a/buildscripts/semantic-convention/generate.sh b/buildscripts/semantic-convention/generate.sh index ba8470e36d..d518e8aabf 100755 --- a/buildscripts/semantic-convention/generate.sh +++ b/buildscripts/semantic-convention/generate.sh @@ -10,7 +10,7 @@ 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.14.0 +SEMCONV_VERSION=1.15.0 SPEC_VERSION=v$SEMCONV_VERSION SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION GENERATOR_VERSION=0.14.0 diff --git a/sdk/include/opentelemetry/sdk/resource/semantic_conventions.h b/sdk/include/opentelemetry/sdk/resource/semantic_conventions.h index a018e28422..aa7b28bc4d 100644 --- a/sdk/include/opentelemetry/sdk/resource/semantic_conventions.h +++ b/sdk/include/opentelemetry/sdk/resource/semantic_conventions.h @@ -23,7 +23,7 @@ namespace SemanticConventions /** * The URL of the OpenTelemetry schema for these keys and values. */ -static constexpr const char *SCHEMA_URL = "https://opentelemetry.io/schemas/1.14.0"; +static constexpr const char *SCHEMA_URL = "https://opentelemetry.io/schemas/1.15.0"; /** * Array of brand name and version separated by a space @@ -670,6 +670,26 @@ static constexpr const char *WEBENGINE_VERSION = "webengine.version"; */ static constexpr const char *WEBENGINE_DESCRIPTION = "webengine.description"; +/** + * The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). + */ +static constexpr const char *OTEL_SCOPE_NAME = "otel.scope.name"; + +/** + * The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). + */ +static constexpr const char *OTEL_SCOPE_VERSION = "otel.scope.version"; + +/** + * Deprecated, use the {@code otel.scope.name} attribute. + */ +static constexpr const char *OTEL_LIBRARY_NAME = "otel.library.name"; + +/** + * Deprecated, use the {@code otel.scope.version} attribute. + */ +static constexpr const char *OTEL_LIBRARY_VERSION = "otel.library.version"; + // Enum definitions namespace CloudProviderValues {