Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded semantic conventions to 1.18.0 #1974

Merged
merged 4 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions api/include/opentelemetry/trace/semantic_conventions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace SemanticConventions
/**
* The URL of the OpenTelemetry schema for these keys and values.
*/
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.17.0";
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.18.0";

/**
* The type of the exception (its fully-qualified class name, if applicable). The dynamic type of
Expand Down Expand Up @@ -595,12 +595,12 @@ static constexpr const char *kHttpTarget = "http.target";

/**
* The matched route (path template in the format used by the respective server framework). See note
below
below
*
* <p>Notes:
<ul> <li>'http.route' 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.</li> </ul>
<ul> <li>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 <a href="#http-server-definitions">application root</a> if there is one.</li> </ul>
*/
static constexpr const char *kHttpRoute = "http.route";

Expand Down Expand Up @@ -1079,6 +1079,8 @@ namespace DbSystemValues
static constexpr const char *kOtherSql = "other_sql";
/** Microsoft SQL Server. */
static constexpr const char *kMssql = "mssql";
/** Microsoft SQL Server Compact. */
static constexpr const char *kMssqlcompact = "mssqlcompact";
/** MySQL. */
static constexpr const char *kMysql = "mysql";
/** Oracle Database. */
Expand Down Expand Up @@ -1173,6 +1175,8 @@ static constexpr const char *kCockroachdb = "cockroachdb";
static constexpr const char *kOpensearch = "opensearch";
/** ClickHouse. */
static constexpr const char *kClickhouse = "clickhouse";
/** Cloud Spanner. */
static constexpr const char *kSpanner = "spanner";
} // namespace DbSystemValues

namespace DbCassandraConsistencyLevelValues
Expand Down
17 changes: 15 additions & 2 deletions buildscripts/semantic-convention/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ 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.17.0

# repository: https://github.com/open-telemetry/opentelemetry-specification
SEMCONV_VERSION=1.18.0

# repository: https://github.com/open-telemetry/build-tools
GENERATOR_VERSION=0.15.1

SPEC_VERSION=v$SEMCONV_VERSION
SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION
GENERATOR_VERSION=0.14.0

cd ${SCRIPT_DIR}

Expand All @@ -30,6 +35,12 @@ git fetch origin "$SPEC_VERSION"
git reset --hard FETCH_HEAD
cd ${SCRIPT_DIR}

# echo "Help ..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this some temporary code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for maintainers, to get the command line help of the tool itself, if needed.


# docker run --rm otel/semconvgen:$GENERATOR_VERSION -h

echo "Generating semantic conventions for traces ..."

docker run --rm \
-v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \
-v ${SCRIPT_DIR}/templates:/templates \
Expand All @@ -45,6 +56,8 @@ docker run --rm \
-Dnamespace_open="namespace trace {" \
-Dnamespace_close="}"

echo "Generating semantic conventions for resources ..."

docker run --rm \
-v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \
-v ${SCRIPT_DIR}/templates:/templates \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace SemanticConventions
/**
* The URL of the OpenTelemetry schema for these keys and values.
*/
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.17.0";
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.18.0";

/**
* Array of brand name and version separated by a space
Expand Down Expand Up @@ -754,7 +754,7 @@ static constexpr const char *kGcpCloudFunctions = "gcp_cloud_functions";
/** Google Cloud App Engine (GAE). */
static constexpr const char *kGcpAppEngine = "gcp_app_engine";
/** Red Hat OpenShift on Google Cloud. */
static constexpr const char *kGoogleCloudOpenshift = "google_cloud_openshift";
static constexpr const char *kGcpOpenshift = "gcp_openshift";
/** Red Hat OpenShift on IBM Cloud. */
static constexpr const char *kIbmCloudOpenshift = "ibm_cloud_openshift";
/** Tencent Cloud Cloud Virtual Machine (CVM). */
Expand Down