Skip to content

Commit

Permalink
Merge branch 'main' into fix_1976
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Feb 10, 2023
2 parents 3d5f6f0 + 9d8efaf commit 5722d77
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Increment the:
* Convert Prometheus Exporter to Pull MetricReader [#1953](https://github.com/open-telemetry/opentelemetry-cpp/pull/1953)
* Upgrade prometheus-cpp to v1.1.0 [#1954](https://github.com/open-telemetry/opentelemetry-cpp/pull/1954)
* [CI] Enforce copyright check in CI [#1965](https://github.com/open-telemetry/opentelemetry-cpp/pull/1965)
* [SEMANTIC CONVENTIONS] Upgrade to version 1.18.0
[#1974](https://github.com/open-telemetry/opentelemetry-cpp/pull/1974)

## [1.8.2] 2023-01-31

Expand Down
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 ..."

# 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
4 changes: 2 additions & 2 deletions sdk/include/opentelemetry/sdk/resource/semantic_conventions.h
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

0 comments on commit 5722d77

Please sign in to comment.