Skip to content

Commit 9d8efaf

Browse files
authored
Upgraded semantic conventions to 1.18.0 (#1974)
1 parent 6d9c4ca commit 9d8efaf

4 files changed

Lines changed: 28 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Increment the:
1818
* Convert Prometheus Exporter to Pull MetricReader [#1953](https://github.com/open-telemetry/opentelemetry-cpp/pull/1953)
1919
* Upgrade prometheus-cpp to v1.1.0 [#1954](https://github.com/open-telemetry/opentelemetry-cpp/pull/1954)
2020
* [CI] Enforce copyright check in CI [#1965](https://github.com/open-telemetry/opentelemetry-cpp/pull/1965)
21+
* [SEMANTIC CONVENTIONS] Upgrade to version 1.18.0
22+
[#1974](https://github.com/open-telemetry/opentelemetry-cpp/pull/1974)
2123

2224
## [1.8.2] 2023-01-31
2325

api/include/opentelemetry/trace/semantic_conventions.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace SemanticConventions
2121
/**
2222
* The URL of the OpenTelemetry schema for these keys and values.
2323
*/
24-
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.17.0";
24+
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.18.0";
2525

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

596596
/**
597597
* The matched route (path template in the format used by the respective server framework). See note
598-
below
598+
below
599599
*
600600
* <p>Notes:
601-
<ul> <li>'http.route' MUST NOT be populated when this is not supported by the HTTP server
602-
framework as the route attribute should have low-cardinality and the URI path can NOT substitute
603-
it.</li> </ul>
601+
<ul> <li>MUST NOT be populated when this is not supported by the HTTP server framework as the
602+
route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD include
603+
the <a href="#http-server-definitions">application root</a> if there is one.</li> </ul>
604604
*/
605605
static constexpr const char *kHttpRoute = "http.route";
606606

@@ -1079,6 +1079,8 @@ namespace DbSystemValues
10791079
static constexpr const char *kOtherSql = "other_sql";
10801080
/** Microsoft SQL Server. */
10811081
static constexpr const char *kMssql = "mssql";
1082+
/** Microsoft SQL Server Compact. */
1083+
static constexpr const char *kMssqlcompact = "mssqlcompact";
10821084
/** MySQL. */
10831085
static constexpr const char *kMysql = "mysql";
10841086
/** Oracle Database. */
@@ -1173,6 +1175,8 @@ static constexpr const char *kCockroachdb = "cockroachdb";
11731175
static constexpr const char *kOpensearch = "opensearch";
11741176
/** ClickHouse. */
11751177
static constexpr const char *kClickhouse = "clickhouse";
1178+
/** Cloud Spanner. */
1179+
static constexpr const char *kSpanner = "spanner";
11761180
} // namespace DbSystemValues
11771181

11781182
namespace DbCassandraConsistencyLevelValues

buildscripts/semantic-convention/generate.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1313
ROOT_DIR="${SCRIPT_DIR}/../../"
1414

1515
# freeze the spec & generator tools versions to make SemanticAttributes generation reproducible
16-
SEMCONV_VERSION=1.17.0
16+
17+
# repository: https://github.com/open-telemetry/opentelemetry-specification
18+
SEMCONV_VERSION=1.18.0
19+
20+
# repository: https://github.com/open-telemetry/build-tools
21+
GENERATOR_VERSION=0.15.1
22+
1723
SPEC_VERSION=v$SEMCONV_VERSION
1824
SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION
19-
GENERATOR_VERSION=0.14.0
2025

2126
cd ${SCRIPT_DIR}
2227

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

38+
# echo "Help ..."
39+
40+
# docker run --rm otel/semconvgen:$GENERATOR_VERSION -h
41+
42+
echo "Generating semantic conventions for traces ..."
43+
3344
docker run --rm \
3445
-v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \
3546
-v ${SCRIPT_DIR}/templates:/templates \
@@ -45,6 +56,8 @@ docker run --rm \
4556
-Dnamespace_open="namespace trace {" \
4657
-Dnamespace_close="}"
4758

59+
echo "Generating semantic conventions for resources ..."
60+
4861
docker run --rm \
4962
-v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \
5063
-v ${SCRIPT_DIR}/templates:/templates \

sdk/include/opentelemetry/sdk/resource/semantic_conventions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace SemanticConventions
2323
/**
2424
* The URL of the OpenTelemetry schema for these keys and values.
2525
*/
26-
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.17.0";
26+
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.18.0";
2727

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

0 commit comments

Comments
 (0)