Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Bump to semantic-conventions v1.32.0
([#192](https://github.com/open-telemetry/semantic-conventions-java/pull/192)))

## Version 1.31.0 (2025-04-01)

* Bump to semantic-conventions v1.31.0
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ val snapshot = true
// end

// The release version of https://github.com/open-telemetry/semantic-conventions used to generate classes
var semanticConventionsVersion = "1.31.0"
var semanticConventionsVersion = "1.32.0"
val schemaUrlVersions = listOf(
semanticConventionsVersion,
"1.31.0",
"1.30.0",
"1.29.0",
"1.28.0",
Expand Down
3 changes: 2 additions & 1 deletion docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Comparing source compatibility of opentelemetry-semconv-1.31.0-SNAPSHOT.jar against
Comparing source compatibility of opentelemetry-semconv-1.32.0-SNAPSHOT.jar against
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
GENERIC TEMPLATES: +++ T:java.lang.Object
Expand Down Expand Up @@ -120,6 +120,7 @@ Comparing source compatibility of opentelemetry-semconv-1.31.0-SNAPSHOT.jar agai
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_30_0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_31_0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_29_0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_32_0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_28_0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_27_0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_26_0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.semconv.incubating;

import static io.opentelemetry.api.common.AttributeKey.stringKey;

import io.opentelemetry.api.common.AttributeKey;

// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
@SuppressWarnings("unused")
public final class AppIncubatingAttributes {
/**
* A unique identifier representing the installation of an application on a specific device
*
* <p>Notes:
*
* <p>Its value SHOULD persist across launches of the same application installation, including
* through application upgrades. It SHOULD change if the application is uninstalled or if all
* applications of the vendor are uninstalled. Additionally, users might be able to reset this
* value (e.g. by clearing application data). If an app is installed multiple times on the same
* device (e.g. in different accounts on Android), each {@code app.installation.id} SHOULD have a
* different value. If multiple OpenTelemetry SDKs are used within the same application, they
* SHOULD use the same value for {@code app.installation.id}. Hardware IDs (e.g. serial number,
* IMEI, MAC address) MUST NOT be used as the {@code app.installation.id}.
*
* <p>For iOS, this value SHOULD be equal to the <a
* href="https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor">vendor
* identifier</a>.
*
* <p>For Android, examples of {@code app.installation.id} implementations include:
*
* <ul>
* <li><a href="https://firebase.google.com/docs/projects/manage-installations">Firebase
* Installation ID</a>.
* <li>A globally unique UUID which is persisted across sessions in your application.
* <li><a href="https://developer.android.com/identity/app-set-id">App set ID</a>.
* <li><a
* href="https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID">{@code
* Settings.getString(Settings.Secure.ANDROID_ID)}</a>.
* </ul>
*
* <p>More information about Android identifier best practices can be found <a
* href="https://developer.android.com/training/articles/user-data-ids">here</a>.
*/
public static final AttributeKey<String> APP_INSTALLATION_ID = stringKey("app.installation.id");

// Enum definitions

private AppIncubatingAttributes() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public final class CodeIncubatingAttributes {
* <li>Java method: {@code com.example.MyHttpService.serveRequest}
* <li>Java anonymous class method: {@code com.mycompany.Main$1.myMethod}
* <li>Java lambda method: {@code com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod}
* <li>PHP function: `GuzzleHttp\Client::transfer
* <li>PHP function: {@code GuzzleHttp\Client::transfer}
* <li>Go function: {@code github.com/my/repo/pkg.foo.func5}
* <li>Elixir: {@code OpenTelemetry.Ctx.new}
* <li>Erlang: {@code opentelemetry_ctx:new}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.semconv.incubating;

import static io.opentelemetry.api.common.AttributeKey.longKey;

import io.opentelemetry.api.common.AttributeKey;

// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
@SuppressWarnings("unused")
public final class CpythonIncubatingAttributes {
/** Value of the garbage collector collection generation. */
public static final AttributeKey<Long> CPYTHON_GC_GENERATION = longKey("cpython.gc.generation");

// Enum definitions
/** Values for {@link #CPYTHON_GC_GENERATION}. */
public static final class CpythonGcGenerationIncubatingValues {
/** Generation 0 */
public static final long GENERATION_0 = 0;

/** Generation 1 */
public static final long GENERATION_1 = 1;

/** Generation 2 */
public static final long GENERATION_2 = 2;

private CpythonGcGenerationIncubatingValues() {}
}

private CpythonIncubatingAttributes() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ public final class DbIncubatingAttributes {
* <p>The operation name SHOULD NOT be extracted from {@code db.query.text}, when the database
* system supports cross-table queries in non-batch operations.
*
* <p>If spaces can occur in the operation name, multiple consecutive spaces SHOULD be normalized
* to a single space.
*
* <p>For batch operations, if the individual operations are known to have the same operation name
* then that operation name SHOULD be used prepended by {@code BATCH }, otherwise {@code
* db.operation.name} SHOULD be {@code BATCH} or some other database system specific term if more
Expand All @@ -358,7 +361,8 @@ public final class DbIncubatingAttributes {
* <p>If a parameter has no name and instead is referenced only by index, then {@code <key>}
* SHOULD be the 0-based index. If {@code db.query.text} is also captured, then {@code
* db.operation.parameter.<key>} SHOULD match up with the parameterized placeholders present in
* {@code db.query.text}.
* {@code db.query.text}. {@code db.operation.parameter.<key>} SHOULD NOT be captured on batch
* operations.
*/
public static final AttributeKeyTemplate<String> DB_OPERATION_PARAMETER =
stringKeyTemplate("db.operation.parameter");
Expand Down Expand Up @@ -432,9 +436,11 @@ public final class DbIncubatingAttributes {
stringKey("db.response.status_code");

/**
* Deprecated, use {@code db.collection.name} instead.
* Deprecated, use {@code db.collection.name} instead, but only if not extracting the value from
* {@code db.query.text}.
*
* @deprecated Replaced by {@code db.collection.name}.
* @deprecated Replaced by {@code db.collection.name}, but only if not extracting the value from
* {@code db.query.text}.
*/
@Deprecated public static final AttributeKey<String> DB_SQL_TABLE = stringKey("db.sql.table");

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

/**
* The name of a stored procedure within the database.
*
* <p>Notes:
*
* <p>It is RECOMMENDED to capture the value as provided by the application without attempting to
* do any case normalization.
*
* <p>For batch operations, if the individual operations are known to have the same stored
* procedure name then that stored procedure name SHOULD be used.
*/
public static final AttributeKey<String> DB_STORED_PROCEDURE_NAME =
stringKey("db.stored_procedure.name");

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
@SuppressWarnings("unused")
public final class ErrorIncubatingAttributes {
/**
* A message providing more detail about an error in human-readable form.
*
* <p>Notes:
*
* <p>{@code error.message} should provide additional context and detail about an error. It is NOT
* RECOMMENDED to duplicate the value of {@code error.type} in {@code error.message}. It is also
* NOT RECOMMENDED to duplicate the value of {@code exception.message} in {@code error.message}.
*
* <p>{@code error.message} is NOT RECOMMENDED for metrics or spans due to its unbounded
* cardinality and overlap with span status.
*/
public static final AttributeKey<String> ERROR_MESSAGE = stringKey("error.message");

/**
* Describes a class of error the operation ended with.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ public final class FeatureFlagIncubatingAttributes {
public static final AttributeKey<String> FEATURE_FLAG_EVALUATION_ERROR_MESSAGE =
stringKey("feature_flag.evaluation.error.message");

/** The reason code which shows how a feature flag value was determined. */
/**
* Deprecated, use {@code feature_flag.result.reason} instead.
*
* @deprecated Replaced by {@code feature_flag.result.reason}.
*/
@Deprecated
public static final AttributeKey<String> FEATURE_FLAG_EVALUATION_REASON =
stringKey("feature_flag.evaluation.reason");

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

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

/**
* A semantic identifier for an evaluated flag value.
Expand All @@ -48,6 +51,21 @@ public final class FeatureFlagIncubatingAttributes {
* understanding the meaning behind a value. For example, the variant {@code red} maybe be used
* for the value {@code #c05543}.
*/
public static final AttributeKey<String> FEATURE_FLAG_RESULT_VARIANT =
stringKey("feature_flag.result.variant");

/**
* The identifier of the <a href="https://openfeature.dev/specification/glossary/#flag-set">flag
* set</a> to which the feature flag belongs.
*/
public static final AttributeKey<String> FEATURE_FLAG_SET_ID = stringKey("feature_flag.set.id");

/**
* Deprecated, use {@code feature_flag.result.variant} instead.
*
* @deprecated Replaced by {@code feature_flag.result.variant}.
*/
@Deprecated
public static final AttributeKey<String> FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant");

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

// Enum definitions
/** Values for {@link #FEATURE_FLAG_EVALUATION_REASON}. */
/**
* Values for {@link #FEATURE_FLAG_EVALUATION_REASON}
*
* @deprecated Replaced by {@code feature_flag.result.reason}.
*/
@Deprecated
public static final class FeatureFlagEvaluationReasonIncubatingValues {
/** The resolved value is static (no dynamic evaluation). */
public static final String STATIC = "static";
Expand Down Expand Up @@ -95,5 +118,43 @@ public static final class FeatureFlagEvaluationReasonIncubatingValues {
private FeatureFlagEvaluationReasonIncubatingValues() {}
}

/** Values for {@link #FEATURE_FLAG_RESULT_REASON}. */
public static final class FeatureFlagResultReasonIncubatingValues {
/** The resolved value is static (no dynamic evaluation). */
public static final String STATIC = "static";

/**
* The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or
* dynamic evaluation yielded no result).
*/
public static final String DEFAULT = "default";

/**
* The resolved value was the result of a dynamic evaluation, such as a rule or specific
* user-targeting.
*/
public static final String TARGETING_MATCH = "targeting_match";

/** The resolved value was the result of pseudorandom assignment. */
public static final String SPLIT = "split";

/** The resolved value was retrieved from cache. */
public static final String CACHED = "cached";

/** The resolved value was the result of the flag being disabled in the management system. */
public static final String DISABLED = "disabled";

/** The reason for the resolved value could not be determined. */
public static final String UNKNOWN = "unknown";

/** The resolved value is non-authoritative or possibly out of date */
public static final String STALE = "stale";

/** The resolved value was the result of an error. */
public static final String ERROR = "error";

private FeatureFlagResultReasonIncubatingValues() {}
}

private FeatureFlagIncubatingAttributes() {}
}
Loading
Loading