Skip to content

Commit 9cf7925

Browse files
authored
Update to semantic-conventions 1.32.0 (#192)
* Update to semantic-conventions 1.32.0 * Update changelog for 1.32.0
1 parent 59512eb commit 9cf7925

File tree

16 files changed

+411
-27
lines changed

16 files changed

+411
-27
lines changed

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 semantic-conventions v1.32.0
6+
([#192](https://github.com/open-telemetry/semantic-conventions-java/pull/192)))
7+
58
## Version 1.31.0 (2025-04-01)
69

710
* Bump to semantic-conventions v1.31.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.31.0"
14+
var semanticConventionsVersion = "1.32.0"
1515
val schemaUrlVersions = listOf(
1616
semanticConventionsVersion,
17+
"1.31.0",
1718
"1.30.0",
1819
"1.29.0",
1920
"1.28.0",

docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Comparing source compatibility of opentelemetry-semconv-1.31.0-SNAPSHOT.jar against
1+
Comparing source compatibility of opentelemetry-semconv-1.32.0-SNAPSHOT.jar against
22
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate (not serializable)
33
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
44
GENERIC TEMPLATES: +++ T:java.lang.Object
@@ -120,6 +120,7 @@ Comparing source compatibility of opentelemetry-semconv-1.31.0-SNAPSHOT.jar agai
120120
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_30_0
121121
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_31_0
122122
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_29_0
123+
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_32_0
123124
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_28_0
124125
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_27_0
125126
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_26_0
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package io.opentelemetry.semconv.incubating;
7+
8+
import static io.opentelemetry.api.common.AttributeKey.stringKey;
9+
10+
import io.opentelemetry.api.common.AttributeKey;
11+
12+
// DO NOT EDIT, this is an Auto-generated file from
13+
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
14+
@SuppressWarnings("unused")
15+
public final class AppIncubatingAttributes {
16+
/**
17+
* A unique identifier representing the installation of an application on a specific device
18+
*
19+
* <p>Notes:
20+
*
21+
* <p>Its value SHOULD persist across launches of the same application installation, including
22+
* through application upgrades. It SHOULD change if the application is uninstalled or if all
23+
* applications of the vendor are uninstalled. Additionally, users might be able to reset this
24+
* value (e.g. by clearing application data). If an app is installed multiple times on the same
25+
* device (e.g. in different accounts on Android), each {@code app.installation.id} SHOULD have a
26+
* different value. If multiple OpenTelemetry SDKs are used within the same application, they
27+
* SHOULD use the same value for {@code app.installation.id}. Hardware IDs (e.g. serial number,
28+
* IMEI, MAC address) MUST NOT be used as the {@code app.installation.id}.
29+
*
30+
* <p>For iOS, this value SHOULD be equal to the <a
31+
* href="https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor">vendor
32+
* identifier</a>.
33+
*
34+
* <p>For Android, examples of {@code app.installation.id} implementations include:
35+
*
36+
* <ul>
37+
* <li><a href="https://firebase.google.com/docs/projects/manage-installations">Firebase
38+
* Installation ID</a>.
39+
* <li>A globally unique UUID which is persisted across sessions in your application.
40+
* <li><a href="https://developer.android.com/identity/app-set-id">App set ID</a>.
41+
* <li><a
42+
* href="https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID">{@code
43+
* Settings.getString(Settings.Secure.ANDROID_ID)}</a>.
44+
* </ul>
45+
*
46+
* <p>More information about Android identifier best practices can be found <a
47+
* href="https://developer.android.com/training/articles/user-data-ids">here</a>.
48+
*/
49+
public static final AttributeKey<String> APP_INSTALLATION_ID = stringKey("app.installation.id");
50+
51+
// Enum definitions
52+
53+
private AppIncubatingAttributes() {}
54+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public final class CodeIncubatingAttributes {
6565
* <li>Java method: {@code com.example.MyHttpService.serveRequest}
6666
* <li>Java anonymous class method: {@code com.mycompany.Main$1.myMethod}
6767
* <li>Java lambda method: {@code com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod}
68-
* <li>PHP function: `GuzzleHttp\Client::transfer
68+
* <li>PHP function: {@code GuzzleHttp\Client::transfer}
6969
* <li>Go function: {@code github.com/my/repo/pkg.foo.func5}
7070
* <li>Elixir: {@code OpenTelemetry.Ctx.new}
7171
* <li>Erlang: {@code opentelemetry_ctx:new}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package io.opentelemetry.semconv.incubating;
7+
8+
import static io.opentelemetry.api.common.AttributeKey.longKey;
9+
10+
import io.opentelemetry.api.common.AttributeKey;
11+
12+
// DO NOT EDIT, this is an Auto-generated file from
13+
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
14+
@SuppressWarnings("unused")
15+
public final class CpythonIncubatingAttributes {
16+
/** Value of the garbage collector collection generation. */
17+
public static final AttributeKey<Long> CPYTHON_GC_GENERATION = longKey("cpython.gc.generation");
18+
19+
// Enum definitions
20+
/** Values for {@link #CPYTHON_GC_GENERATION}. */
21+
public static final class CpythonGcGenerationIncubatingValues {
22+
/** Generation 0 */
23+
public static final long GENERATION_0 = 0;
24+
25+
/** Generation 1 */
26+
public static final long GENERATION_1 = 1;
27+
28+
/** Generation 2 */
29+
public static final long GENERATION_2 = 2;
30+
31+
private CpythonGcGenerationIncubatingValues() {}
32+
}
33+
34+
private CpythonIncubatingAttributes() {}
35+
}

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

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ public final class DbIncubatingAttributes {
342342
* <p>The operation name SHOULD NOT be extracted from {@code db.query.text}, when the database
343343
* system supports cross-table queries in non-batch operations.
344344
*
345+
* <p>If spaces can occur in the operation name, multiple consecutive spaces SHOULD be normalized
346+
* to a single space.
347+
*
345348
* <p>For batch operations, if the individual operations are known to have the same operation name
346349
* then that operation name SHOULD be used prepended by {@code BATCH }, otherwise {@code
347350
* db.operation.name} SHOULD be {@code BATCH} or some other database system specific term if more
@@ -358,7 +361,8 @@ public final class DbIncubatingAttributes {
358361
* <p>If a parameter has no name and instead is referenced only by index, then {@code <key>}
359362
* SHOULD be the 0-based index. If {@code db.query.text} is also captured, then {@code
360363
* db.operation.parameter.<key>} SHOULD match up with the parameterized placeholders present in
361-
* {@code db.query.text}.
364+
* {@code db.query.text}. {@code db.operation.parameter.<key>} SHOULD NOT be captured on batch
365+
* operations.
362366
*/
363367
public static final AttributeKeyTemplate<String> DB_OPERATION_PARAMETER =
364368
stringKeyTemplate("db.operation.parameter");
@@ -432,9 +436,11 @@ public final class DbIncubatingAttributes {
432436
stringKey("db.response.status_code");
433437

434438
/**
435-
* Deprecated, use {@code db.collection.name} instead.
439+
* Deprecated, use {@code db.collection.name} instead, but only if not extracting the value from
440+
* {@code db.query.text}.
436441
*
437-
* @deprecated Replaced by {@code db.collection.name}.
442+
* @deprecated Replaced by {@code db.collection.name}, but only if not extracting the value from
443+
* {@code db.query.text}.
438444
*/
439445
@Deprecated public static final AttributeKey<String> DB_SQL_TABLE = stringKey("db.sql.table");
440446

@@ -445,6 +451,20 @@ public final class DbIncubatingAttributes {
445451
*/
446452
@Deprecated public static final AttributeKey<String> DB_STATEMENT = stringKey("db.statement");
447453

454+
/**
455+
* The name of a stored procedure within the database.
456+
*
457+
* <p>Notes:
458+
*
459+
* <p>It is RECOMMENDED to capture the value as provided by the application without attempting to
460+
* do any case normalization.
461+
*
462+
* <p>For batch operations, if the individual operations are known to have the same stored
463+
* procedure name then that stored procedure name SHOULD be used.
464+
*/
465+
public static final AttributeKey<String> DB_STORED_PROCEDURE_NAME =
466+
stringKey("db.stored_procedure.name");
467+
448468
/**
449469
* Deprecated, use {@code db.system.name} instead.
450470
*

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

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,32 @@ public final class DeviceIncubatingAttributes {
1818
*
1919
* <p>Notes:
2020
*
21-
* <p>The device identifier MUST only be defined using the values outlined below. This value is
22-
* not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this
23-
* value MUST be equal to the <a
24-
* href="https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor">vendor
25-
* identifier</a>. On Android (Java or Kotlin), this value MUST be equal to the Firebase
26-
* Installation ID or a globally unique UUID which is persisted across sessions in your
27-
* application. More information can be found <a
28-
* href="https://developer.android.com/training/articles/user-data-ids">here</a> on best practices
29-
* and exact implementation details. Caution should be taken when storing personal data or
30-
* anything which can identify a user. GDPR and data protection laws may apply, ensure you do your
31-
* own due diligence.
21+
* <p>Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is
22+
* uninstalled and re-installed. However, it might be resettable by the user for all apps on a
23+
* device. Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as
24+
* values.
25+
*
26+
* <p>More information about Android identifier best practices can be found <a
27+
* href="https://developer.android.com/training/articles/user-data-ids">here</a>.
28+
*
29+
* <blockquote>
30+
*
31+
* [!WARNING]
32+
*
33+
* <p>This attribute may contain sensitive (PII) information. Caution should be taken when storing
34+
* personal data or anything which can identify a user. GDPR and data protection laws may apply,
35+
* ensure you do your own due diligence.
36+
*
37+
* <p>Due to these reasons, this identifier is not recommended for consumer applications and will
38+
* likely result in rejection from both Google Play and App Store. However, it may be appropriate
39+
* for specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with
40+
* appropriate compliance clearance. Any instrumentation providing this identifier MUST implement
41+
* it as an opt-in feature.
42+
*
43+
* <p>See <a href="/docs/attributes-registry/app.md#app-installation-id">{@code
44+
* app.installation.id}</a> for a more privacy-preserving alternative.
45+
*
46+
* </blockquote>
3247
*/
3348
public static final AttributeKey<String> DEVICE_ID = stringKey("device.id");
3449

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@
1313
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
1414
@SuppressWarnings("unused")
1515
public final class ErrorIncubatingAttributes {
16+
/**
17+
* A message providing more detail about an error in human-readable form.
18+
*
19+
* <p>Notes:
20+
*
21+
* <p>{@code error.message} should provide additional context and detail about an error. It is NOT
22+
* RECOMMENDED to duplicate the value of {@code error.type} in {@code error.message}. It is also
23+
* NOT RECOMMENDED to duplicate the value of {@code exception.message} in {@code error.message}.
24+
*
25+
* <p>{@code error.message} is NOT RECOMMENDED for metrics or spans due to its unbounded
26+
* cardinality and overlap with span status.
27+
*/
28+
public static final AttributeKey<String> ERROR_MESSAGE = stringKey("error.message");
29+
1630
/**
1731
* Describes a class of error the operation ended with.
1832
*

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

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ public final class FeatureFlagIncubatingAttributes {
2121
public static final AttributeKey<String> FEATURE_FLAG_EVALUATION_ERROR_MESSAGE =
2222
stringKey("feature_flag.evaluation.error.message");
2323

24-
/** The reason code which shows how a feature flag value was determined. */
24+
/**
25+
* Deprecated, use {@code feature_flag.result.reason} instead.
26+
*
27+
* @deprecated Replaced by {@code feature_flag.result.reason}.
28+
*/
29+
@Deprecated
2530
public static final AttributeKey<String> FEATURE_FLAG_EVALUATION_REASON =
2631
stringKey("feature_flag.evaluation.reason");
2732

@@ -32,11 +37,9 @@ public final class FeatureFlagIncubatingAttributes {
3237
public static final AttributeKey<String> FEATURE_FLAG_PROVIDER_NAME =
3338
stringKey("feature_flag.provider_name");
3439

35-
/**
36-
* The identifier of the <a href="https://openfeature.dev/specification/glossary/#flag-set">flag
37-
* set</a> to which the feature flag belongs.
38-
*/
39-
public static final AttributeKey<String> FEATURE_FLAG_SET_ID = stringKey("feature_flag.set.id");
40+
/** The reason code which shows how a feature flag value was determined. */
41+
public static final AttributeKey<String> FEATURE_FLAG_RESULT_REASON =
42+
stringKey("feature_flag.result.reason");
4043

4144
/**
4245
* A semantic identifier for an evaluated flag value.
@@ -48,6 +51,21 @@ public final class FeatureFlagIncubatingAttributes {
4851
* understanding the meaning behind a value. For example, the variant {@code red} maybe be used
4952
* for the value {@code #c05543}.
5053
*/
54+
public static final AttributeKey<String> FEATURE_FLAG_RESULT_VARIANT =
55+
stringKey("feature_flag.result.variant");
56+
57+
/**
58+
* The identifier of the <a href="https://openfeature.dev/specification/glossary/#flag-set">flag
59+
* set</a> to which the feature flag belongs.
60+
*/
61+
public static final AttributeKey<String> FEATURE_FLAG_SET_ID = stringKey("feature_flag.set.id");
62+
63+
/**
64+
* Deprecated, use {@code feature_flag.result.variant} instead.
65+
*
66+
* @deprecated Replaced by {@code feature_flag.result.variant}.
67+
*/
68+
@Deprecated
5169
public static final AttributeKey<String> FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant");
5270

5371
/**
@@ -57,7 +75,12 @@ public final class FeatureFlagIncubatingAttributes {
5775
public static final AttributeKey<String> FEATURE_FLAG_VERSION = stringKey("feature_flag.version");
5876

5977
// Enum definitions
60-
/** Values for {@link #FEATURE_FLAG_EVALUATION_REASON}. */
78+
/**
79+
* Values for {@link #FEATURE_FLAG_EVALUATION_REASON}
80+
*
81+
* @deprecated Replaced by {@code feature_flag.result.reason}.
82+
*/
83+
@Deprecated
6184
public static final class FeatureFlagEvaluationReasonIncubatingValues {
6285
/** The resolved value is static (no dynamic evaluation). */
6386
public static final String STATIC = "static";
@@ -95,5 +118,43 @@ public static final class FeatureFlagEvaluationReasonIncubatingValues {
95118
private FeatureFlagEvaluationReasonIncubatingValues() {}
96119
}
97120

121+
/** Values for {@link #FEATURE_FLAG_RESULT_REASON}. */
122+
public static final class FeatureFlagResultReasonIncubatingValues {
123+
/** The resolved value is static (no dynamic evaluation). */
124+
public static final String STATIC = "static";
125+
126+
/**
127+
* The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or
128+
* dynamic evaluation yielded no result).
129+
*/
130+
public static final String DEFAULT = "default";
131+
132+
/**
133+
* The resolved value was the result of a dynamic evaluation, such as a rule or specific
134+
* user-targeting.
135+
*/
136+
public static final String TARGETING_MATCH = "targeting_match";
137+
138+
/** The resolved value was the result of pseudorandom assignment. */
139+
public static final String SPLIT = "split";
140+
141+
/** The resolved value was retrieved from cache. */
142+
public static final String CACHED = "cached";
143+
144+
/** The resolved value was the result of the flag being disabled in the management system. */
145+
public static final String DISABLED = "disabled";
146+
147+
/** The reason for the resolved value could not be determined. */
148+
public static final String UNKNOWN = "unknown";
149+
150+
/** The resolved value is non-authoritative or possibly out of date */
151+
public static final String STALE = "stale";
152+
153+
/** The resolved value was the result of an error. */
154+
public static final String ERROR = "error";
155+
156+
private FeatureFlagResultReasonIncubatingValues() {}
157+
}
158+
98159
private FeatureFlagIncubatingAttributes() {}
99160
}

0 commit comments

Comments
 (0)