Skip to content

Commit 3086d67

Browse files
otelbot-semantic-conventions-java[bot]otelbot[bot]trask
authored
Update the semantic conventions version to 1.40.0 (#418)
* Update the semantic conventions version to 1.40.0 * Update changelog PR link * fixes * spacing --------- Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
1 parent e9dd703 commit 3086d67

30 files changed

+679
-34
lines changed

.github/scripts/update-semconv-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ sed -Ei "s/( semanticConventionsVersion,)/\1\n \"$old_version\",/" build.g
1515

1616
# Add new version constant to SchemaUrls.java
1717
version_underscore=${version//./_}
18-
sed -Ei "s/(public final class SchemaUrls \{)/\1\n\n public static final String V${version_underscore} = \"https:\/\/opentelemetry.io\/schemas\/${version}\";/" \
18+
sed -Ei "s/(public final class SchemaUrls \{)/\1\n public static final String V${version_underscore} = \"https:\/\/opentelemetry.io\/schemas\/${version}\";/" \
1919
semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java
2020

2121
# Add changelog entry

.github/workflows/auto-update-semconv.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ jobs:
8282
- name: Apply formatting
8383
run: ./gradlew spotlessApply
8484

85+
- name: Generate API diffs
86+
run: ./gradlew jApiCmp
87+
8588
- name: Use CLA approved bot
8689
run: .github/scripts/use-cla-approved-bot.sh
8790

@@ -99,6 +102,7 @@ jobs:
99102
git checkout -b $branch
100103
git add -u
101104
git add semconv**/src/main/java
105+
git add docs/apidiffs/
102106
git commit -m "$message"
103107
git push --set-upstream origin $branch
104108
pr_url=$(gh pr create --title "$message" \

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
* Bump to semconv v1.40.0
6+
([#418](https://github.com/open-telemetry/semantic-conventions-java/pull/418))
7+
58
## Version 1.39.0 (2026-01-28)
69

710
* Bump to semconv v1.39.0

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ val snapshot = true
1111
// end
1212

1313
// The release version of https://github.com/open-telemetry/semantic-conventions used to generate classes
14-
var semanticConventionsVersion = "1.39.0"
14+
var semanticConventionsVersion = "1.40.0"
1515
val schemaUrlVersions = listOf(
1616
semanticConventionsVersion,
17+
"1.39.0",
1718
"1.38.0",
1819
"1.37.0",
1920
"1.36.0",

buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@
2323
*/
2424
package io.opentelemetry.semconv.incubating;
2525

26+
import static io.opentelemetry.api.common.AttributeKey.booleanArrayKey;
2627
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
28+
import static io.opentelemetry.api.common.AttributeKey.doubleArrayKey;
2729
import static io.opentelemetry.api.common.AttributeKey.doubleKey;
30+
import static io.opentelemetry.api.common.AttributeKey.longArrayKey;
2831
import static io.opentelemetry.api.common.AttributeKey.longKey;
29-
import static io.opentelemetry.api.common.AttributeKey.stringKey;
3032
import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
33+
import static io.opentelemetry.api.common.AttributeKey.stringKey;
3134

3235
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate;
3336
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate;

buildscripts/templates/registry/java/SemanticAttributes.java.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@
2222
*/
2323
package io.opentelemetry.semconv;
2424

25+
import static io.opentelemetry.api.common.AttributeKey.booleanArrayKey;
2526
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
27+
import static io.opentelemetry.api.common.AttributeKey.doubleArrayKey;
2628
import static io.opentelemetry.api.common.AttributeKey.doubleKey;
29+
import static io.opentelemetry.api.common.AttributeKey.longArrayKey;
2730
import static io.opentelemetry.api.common.AttributeKey.longKey;
28-
import static io.opentelemetry.api.common.AttributeKey.stringKey;
2931
import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
32+
import static io.opentelemetry.api.common.AttributeKey.stringKey;
3033

3134
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate;
3235
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate;
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
Comparing source compatibility of opentelemetry-semconv-1.39.0-SNAPSHOT.jar against opentelemetry-semconv-1.39.0.jar
2-
No changes.
1+
Comparing source compatibility of opentelemetry-semconv-1.40.0-SNAPSHOT.jar against opentelemetry-semconv-1.39.0.jar
2+
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.SchemaUrls (not serializable)
3+
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
4+
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_40_0
5+
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.ServiceAttributes (not serializable)
6+
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
7+
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey<java.lang.String> SERVICE_INSTANCE_ID
8+
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey<java.lang.String> SERVICE_NAMESPACE

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,11 @@ public final class DbIncubatingAttributes {
425425
* href="/docs/db/database-spans.md#generating-a-summary-of-the-query">Generating query
426426
* summary</a> section.
427427
*
428+
* <p>For batch operations, if the individual operations are known to have the same query summary
429+
* then that query summary SHOULD be used prepended by {@code BATCH }, otherwise {@code
430+
* db.query.summary} SHOULD be {@code BATCH} or some other database system specific term if more
431+
* applicable.
432+
*
428433
* @deprecated deprecated in favor of stable {@link
429434
* io.opentelemetry.semconv.DbAttributes#DB_QUERY_SUMMARY} attribute.
430435
*/

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ public final class ErrorIncubatingAttributes {
2424
*
2525
* <p>{@code error.message} is NOT RECOMMENDED for metrics or spans due to its unbounded
2626
* cardinality and overlap with span status.
27+
*
28+
* @deprecated Use domain-specific error message attribute. For example, use {@code
29+
* feature_flag.error.message} for feature flag errors.
2730
*/
28-
public static final AttributeKey<String> ERROR_MESSAGE = stringKey("error.message");
31+
@Deprecated public static final AttributeKey<String> ERROR_MESSAGE = stringKey("error.message");
2932

3033
/**
3134
* Describes a class of error the operation ended with.

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ public final class ExceptionIncubatingAttributes {
1616
/**
1717
* The exception message.
1818
*
19+
* <p>Notes:
20+
*
21+
* <blockquote>
22+
*
23+
* [!WARNING]
24+
*
25+
* <p>This attribute may contain sensitive information.
26+
*
27+
* </blockquote>
28+
*
1929
* @deprecated deprecated in favor of stable {@link
2030
* io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_MESSAGE} attribute.
2131
*/

0 commit comments

Comments
 (0)