Skip to content

Commit 300f8e5

Browse files
authored
[SEMANTIC CONVENTIONS] Upgrade to version 1.26.0 (#1851)
1 parent 82fa485 commit 300f8e5

File tree

4 files changed

+2377
-1227
lines changed

4 files changed

+2377
-1227
lines changed

opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55
CRATE_DIR="${SCRIPT_DIR}/../"
66

77
# freeze the spec version and generator version to make generation reproducible
8-
SPEC_VERSION=1.25.0
8+
SPEC_VERSION=1.26.0
99
SEMCOVGEN_VERSION=0.24.0
1010

1111
cd "$CRATE_DIR"
@@ -53,4 +53,14 @@ fi
5353
# handle doc generation failures
5454
"${SED[@]}" 's/\[2\]\.$//' src/resource.rs src/trace.rs # remove trailing [2] from few of the doc comments
5555

56+
# Remove the messaging.client_id definition along with its comments from the generated files
57+
# - semconv "messaging.client_id" is deprecated
58+
# - semconv "messaging.client.id" is to be used instead
59+
# - Now because we use:
60+
# pub const {{attribute.fqn | to_const_name}}: &str = "{{attribute.fqn}}";
61+
# to generate the consts, where to_const_name replaces '.' with '_', we need to remove the old definition
62+
# to avoid conflicts with the new one. Refer - https://github.com/open-telemetry/semantic-conventions/issues/1031
63+
"${SED[@]}" '/\/\/\/ Deprecated, use `messaging.client.id` instead\./{N;N;N;N;d;}' src/trace.rs src/resource.rs
64+
"${SED[@]}" '/pub const MESSAGING_CLIENT_ID: &str = "messaging.client_id";/{N;d;}' src/trace.rs src/resource.rs
65+
5666
cargo fmt

opentelemetry-semantic-conventions/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ pub mod trace;
2020

2121
/// The schema URL that matches the version of the semantic conventions that
2222
/// this crate defines.
23-
pub const SCHEMA_URL: &str = "https://opentelemetry.io/schemas/1.25.0";
23+
pub const SCHEMA_URL: &str = "https://opentelemetry.io/schemas/1.26.0";

0 commit comments

Comments
 (0)