From 94b8ed2039797daa4dc6a407f11f28539effd377 Mon Sep 17 00:00:00 2001 From: otelbot <197425009+otelbot@users.noreply.github.com> Date: Fri, 12 Jun 2026 21:21:12 +0000 Subject: [PATCH 1/2] Update the semantic conventions version to 1.42.0 --- CHANGELOG.md | 3 + build.gradle.kts | 3 +- .../opentelemetry-semconv.txt | 58 ++- .../AndroidIncubatingAttributes.java | 2 +- .../incubating/AppIncubatingAttributes.java | 12 + .../BrowserIncubatingAttributes.java | 7 + .../incubating/CicdIncubatingAttributes.java | 20 +- .../ContainerIncubatingAttributes.java | 21 +- .../incubating/CpuIncubatingAttributes.java | 8 +- .../incubating/FileIncubatingAttributes.java | 30 ++ .../incubating/GcpIncubatingAttributes.java | 14 + .../incubating/GenAiIncubatingAttributes.java | 403 +++++++++++++-- .../incubating/K8sIncubatingAttributes.java | 307 +++++++++-- .../incubating/McpIncubatingAttributes.java | 34 +- .../OpenaiIncubatingAttributes.java | 54 +- .../ProfileIncubatingAttributes.java | 3 + .../incubating/UrlIncubatingAttributes.java | 22 +- .../semconv/ContainerAttributes.java | 52 ++ .../opentelemetry/semconv/K8sAttributes.java | 488 ++++++++++++++++++ .../io/opentelemetry/semconv/SchemaUrls.java | 1 + .../opentelemetry/semconv/UrlAttributes.java | 22 +- 21 files changed, 1430 insertions(+), 134 deletions(-) create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/ContainerAttributes.java create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/K8sAttributes.java diff --git a/CHANGELOG.md b/CHANGELOG.md index c27d27ca..c09b61e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Bump to semconv v1.42.0 + ([#PRNUM](https://github.com/open-telemetry/semantic-conventions-java/pull/PRNUM)) + ## Version 1.41.1 (2026-05-12) * Bump to semconv v1.41.1 diff --git a/build.gradle.kts b/build.gradle.kts index 5dd5c30e..21a9dcb6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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.41.1" +var semanticConventionsVersion = "1.42.0" val schemaUrlVersions = listOf( semanticConventionsVersion, + "1.41.1", "1.41.0", "1.40.0", "1.39.0", diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt index 3a7439da..d6745222 100644 --- a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt +++ b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt @@ -1,2 +1,56 @@ -Comparing source compatibility of opentelemetry-semconv-1.41.1-SNAPSHOT.jar against opentelemetry-semconv-1.41.1.jar -No changes. \ No newline at end of file +Comparing source compatibility of opentelemetry-semconv-1.42.0-SNAPSHOT.jar against opentelemetry-semconv-1.41.1.jar ++++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.ContainerAttributes (not serializable) + +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. + +++ NEW SUPERCLASS: java.lang.Object + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey CONTAINER_IMAGE_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey> CONTAINER_IMAGE_TAGS + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey> CONTAINER_IMAGE_REPO_DIGESTS + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey CONTAINER_ID ++++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.K8sAttributes (not serializable) + +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. + +++ NEW SUPERCLASS: java.lang.Object + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_CONTAINER_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_POD_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_REPLICASET_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_POD_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_CRONJOB_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_DAEMONSET_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_JOB_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_REPLICASET_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_STATEFULSET_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_DEPLOYMENT_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_NAMESPACE_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_JOB_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_NODE_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_POD_HOSTNAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_JOB_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_DAEMONSET_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_POD_IP + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_DEPLOYMENT_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_CRONJOB_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_NODE_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_CRONJOB_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_POD_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_CLUSTER_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_CRONJOB_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_DAEMONSET_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_DEPLOYMENT_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_NODE_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_DEPLOYMENT_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_JOB_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_NAMESPACE_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_REPLICASET_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_STATEFULSET_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_POD_START_TIME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_NODE_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_STATEFULSET_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_STATEFULSET_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_NAMESPACE_ANNOTATION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate K8S_POD_LABEL + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_REPLICASET_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_DAEMONSET_UID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_CONTAINER_RESTART_COUNT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey K8S_CLUSTER_NAME +*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.SchemaUrls (not serializable) + === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_42_0 diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java index 28040189..99a97caa 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java @@ -19,7 +19,7 @@ public final class AndroidIncubatingAttributes { *

Notes: * *

The Android lifecycle states are defined in Activity + * href="https://developer.android.com/guide/components/activities/activity-lifecycle#lifecycle-callbacks">Activity * lifecycle callbacks, and from which the {@code OS identifiers} are derived. */ public static final AttributeKey ANDROID_APP_STATE = stringKey("android.app.state"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java index be0c1058..e756f2e1 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java @@ -18,6 +18,18 @@ public final class AppIncubatingAttributes { /** Unique identifier for a particular build or compilation of the application. */ public static final AttributeKey APP_BUILD_ID = stringKey("app.build_id"); + /** + * A unique identifier representing an instance of an end-user facing app crash. + * + *

Notes: + * + *

Its value MAY be meaningful and be used as a reference for telemetry and metadata recorded + * by the same instrumentation (e.g. it is an ID generated by an external source that captured the + * crash). It MAY come from a source external to the instrumentation such that it can be used to + * look up additional data from other sources as well as facilitate deduplication. + */ + public static final AttributeKey APP_CRASH_ID = stringKey("app.crash.id"); + /** * A unique identifier representing the installation of an application on a specific device * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java index 8c7ab842..3b0ed968 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java @@ -27,6 +27,13 @@ public final class BrowserIncubatingAttributes { */ public static final AttributeKey> BROWSER_BRANDS = stringArrayKey("browser.brands"); + /** + * Absolute URL of the current browser document according to RFC3986. + */ + public static final AttributeKey BROWSER_DOCUMENT_URL_FULL = + stringKey("browser.document.url.full"); + /** * Preferred language of the user using the browser * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java index 18f74392..d1a96e7c 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java @@ -73,17 +73,17 @@ public final class CicdIncubatingAttributes { public static final AttributeKey CICD_PIPELINE_TASK_TYPE = stringKey("cicd.pipeline.task.type"); - /** The name of a component of the CICD system. */ + /** The name of a component of the CI/CD system. */ public static final AttributeKey CICD_SYSTEM_COMPONENT = stringKey("cicd.system.component"); - /** The unique identifier of a worker within a CICD system. */ + /** The unique identifier of a worker within a CI/CD system. */ public static final AttributeKey CICD_WORKER_ID = stringKey("cicd.worker.id"); - /** The name of a worker within a CICD system. */ + /** The name of a worker within a CI/CD system. */ public static final AttributeKey CICD_WORKER_NAME = stringKey("cicd.worker.name"); - /** The state of a CICD worker / agent. */ + /** The state of a CI/CD worker / agent. */ public static final AttributeKey CICD_WORKER_STATE = stringKey("cicd.worker.state"); /** @@ -121,7 +121,7 @@ public static final class CicdPipelineResultIncubatingValues { public static final String FAILURE = "failure"; /** - * The pipeline run failed due to an error in the CICD system, eg. due to the worker being + * The pipeline run failed due to an error in the CI/CD system, eg. due to the worker being * killed. */ public static final String ERROR = "error"; @@ -170,7 +170,7 @@ public static final class CicdPipelineTaskRunResultIncubatingValues { public static final String FAILURE = "failure"; /** - * The task run failed due to an error in the CICD system, eg. due to the worker being killed. + * The task run failed due to an error in the CI/CD system, eg. due to the worker being killed. */ public static final String ERROR = "error"; @@ -203,15 +203,15 @@ private CicdPipelineTaskTypeIncubatingValues() {} /** Values for {@link #CICD_WORKER_STATE}. */ public static final class CicdWorkerStateIncubatingValues { /** - * The worker is not performing work for the CICD system. It is available to the CICD system to - * perform work on (online / idle). + * The worker is not performing work for the CI/CD system. It is available to the CI/CD system + * to perform work on (online / idle). */ public static final String AVAILABLE = "available"; - /** The worker is performing work for the CICD system. */ + /** The worker is performing work for the CI/CD system. */ public static final String BUSY = "busy"; - /** The worker is not available to the CICD system (disconnected / down). */ + /** The worker is not available to the CI/CD system (disconnected / down). */ public static final String OFFLINE = "offline"; private CicdWorkerStateIncubatingValues() {} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java index 39512682..f165c0f1 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java @@ -72,8 +72,11 @@ public final class ContainerIncubatingAttributes { * Container ID. Usually a UUID, as for example used to identify Docker * containers. The UUID might be abbreviated. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.ContainerAttributes#CONTAINER_ID} attribute. */ - public static final AttributeKey CONTAINER_ID = stringKey("container.id"); + @Deprecated public static final AttributeKey CONTAINER_ID = stringKey("container.id"); /** * Runtime specific image identifier. Usually a hash algorithm followed by a UUID. @@ -92,7 +95,13 @@ public final class ContainerIncubatingAttributes { */ public static final AttributeKey CONTAINER_IMAGE_ID = stringKey("container.image.id"); - /** Name of the image the container was built on. */ + /** + * Name of the image the container was built on. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.ContainerAttributes#CONTAINER_IMAGE_NAME} attribute. + */ + @Deprecated public static final AttributeKey CONTAINER_IMAGE_NAME = stringKey("container.image.name"); /** @@ -105,7 +114,11 @@ public final class ContainerIncubatingAttributes { * and CRI * report those under the {@code RepoDigests} field. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.ContainerAttributes#CONTAINER_IMAGE_REPO_DIGESTS} attribute. */ + @Deprecated public static final AttributeKey> CONTAINER_IMAGE_REPO_DIGESTS = stringArrayKey("container.image.repo_digests"); @@ -114,7 +127,11 @@ public final class ContainerIncubatingAttributes { * href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect">Docker * Image Inspect. Should be only the {@code } section of the full name for example from * {@code registry.example.com/my-org/my-image:}. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.ContainerAttributes#CONTAINER_IMAGE_TAGS} attribute. */ + @Deprecated public static final AttributeKey> CONTAINER_IMAGE_TAGS = stringArrayKey("container.image.tags"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java index e28d1797..38e4fa99 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java @@ -45,8 +45,12 @@ public static final class CpuModeIncubatingValues { /** Steal */ public static final String STEAL = "steal"; - /** Kernel */ - public static final String KERNEL = "kernel"; + /** + * Deprecated. Use {@code system} instead. + * + * @deprecated Replaced by {@code system}. + */ + @Deprecated public static final String KERNEL = "kernel"; private CpuModeIncubatingValues() {} } diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FileIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FileIncubatingAttributes.java index a4d9e71c..37507808 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FileIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FileIncubatingAttributes.java @@ -100,6 +100,25 @@ public final class FileIncubatingAttributes { /** Inode representing the file in the filesystem. */ public static final AttributeKey FILE_INODE = stringKey("file.inode"); + /** + * The lock mechanism such as noted by POSIX + */ + public static final AttributeKey FILE_LOCK_MECHANISM = stringKey("file.lock.mechanism"); + + /** + * Mode of lock or operation such as documented by POSIX + */ + public static final AttributeKey FILE_LOCK_MODE = stringKey("file.lock.mode"); + + /** + * The lock type as represented by i.e. POSIX's + * l_type. + */ + public static final AttributeKey FILE_LOCK_TYPE = stringKey("file.lock.type"); + /** Mode of the file in octal representation. */ public static final AttributeKey FILE_MODE = stringKey("file.mode"); @@ -136,5 +155,16 @@ public final class FileIncubatingAttributes { // Enum definitions + /** Values for {@link #FILE_LOCK_TYPE}. */ + public static final class FileLockTypeIncubatingValues { + /** read. */ + public static final String READ = "read"; + + /** write. */ + public static final String WRITE = "write"; + + private FileLockTypeIncubatingValues() {} + } + private FileIncubatingAttributes() {} } diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java index 802217f3..4358785a 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java @@ -7,8 +7,10 @@ import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; +import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.semconv.AttributeKeyTemplate; // DO NOT EDIT, this is an Auto-generated file from // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @@ -166,6 +168,18 @@ public final class GcpIncubatingAttributes { public static final AttributeKey GCP_GCE_INSTANCE_HOSTNAME = stringKey("gcp.gce.instance.hostname"); + /** + * GCE instance labels, {@code } being the label name and the value being the label value. + * + *

Notes: + * + *

For example, a GCE instance label {@code team} with value {@code observability} SHOULD be + * recorded as the {@code gcp.gce.instance.labels.team} attribute with value {@code + * "observability"}. The {@code } MUST be the exact GCE instance label key. + */ + public static final AttributeKeyTemplate GCP_GCE_INSTANCE_LABELS = + stringKeyTemplate("gcp.gce.instance.labels"); + /** * The instance name of a GCE instance. This is the value provided by {@code host.name}, the * visible name of the instance in the Cloud Console UI, and the prefix for the default hostname diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java index 8ae45e9f..9f400577 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java @@ -18,17 +18,45 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class GenAiIncubatingAttributes { - /** Free-form description of the GenAI agent provided by the application. */ + /** + * Free-form description of the GenAI agent provided by the application. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_AGENT_DESCRIPTION = stringKey("gen_ai.agent.description"); - /** The unique identifier of the GenAI agent. */ + /** + * The unique identifier of the GenAI agent. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_AGENT_ID = stringKey("gen_ai.agent.id"); - /** Human-readable name of the GenAI agent provided by the application. */ + /** + * Human-readable name of the GenAI agent provided by the application. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_AGENT_NAME = stringKey("gen_ai.agent.name"); - /** The version of the GenAI agent. */ + /** + * The version of the GenAI agent. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_AGENT_VERSION = stringKey("gen_ai.agent.version"); /** @@ -42,7 +70,12 @@ public final class GenAiIncubatingAttributes { /** * The unique identifier for a conversation (session, thread), used to store and correlate * messages within this conversation. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_CONVERSATION_ID = stringKey("gen_ai.conversation.id"); @@ -58,19 +91,45 @@ public final class GenAiIncubatingAttributes { * storage, such as a database or object store. Semantic conventions referencing {@code * gen_ai.data_source.id} MAY also leverage additional attributes, such as {@code db.*}, to * further identify and describe the data source. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_DATA_SOURCE_ID = stringKey("gen_ai.data_source.id"); - /** The number of dimensions the resulting output embeddings should have. */ + /** + * The number of dimensions the resulting output embeddings should have. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_EMBEDDINGS_DIMENSION_COUNT = longKey("gen_ai.embeddings.dimension.count"); - /** A free-form explanation for the assigned score provided by the evaluator. */ + /** + * A free-form explanation for the assigned score provided by the evaluator. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_EVALUATION_EXPLANATION = stringKey("gen_ai.evaluation.explanation"); - /** The name of the evaluation metric used for the GenAI response. */ + /** + * The name of the evaluation metric used for the GenAI response. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_EVALUATION_NAME = stringKey("gen_ai.evaluation.name"); @@ -84,18 +143,32 @@ public final class GenAiIncubatingAttributes { * and "not relevant" in another, depending on the scoring range and evaluator. The label SHOULD * have low cardinality. Possible values depend on the evaluation metric and evaluator used; * implementations SHOULD document the possible values. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_EVALUATION_SCORE_LABEL = stringKey("gen_ai.evaluation.score.label"); - /** The evaluation score returned by the evaluator. */ + /** + * The evaluation score returned by the evaluator. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_EVALUATION_SCORE_VALUE = doubleKey("gen_ai.evaluation.score.value"); /** * Deprecated, use {@code gen_ai.output.type}. * - * @deprecated Replaced by {@code gen_ai.output.type}. + * @deprecated Replaced by {@code gen_ai.output.type}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final AttributeKey GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT = @@ -104,7 +177,9 @@ public final class GenAiIncubatingAttributes { /** * Deprecated, use {@code gen_ai.request.seed}. * - * @deprecated Replaced by {@code gen_ai.request.seed}. + * @deprecated Replaced by {@code gen_ai.request.seed}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final AttributeKey GEN_AI_OPENAI_REQUEST_SEED = @@ -113,7 +188,9 @@ public final class GenAiIncubatingAttributes { /** * Deprecated, use {@code openai.request.service_tier}. * - * @deprecated Replaced by {@code openai.request.service_tier}. + * @deprecated Replaced by {@code openai.request.service_tier}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final AttributeKey GEN_AI_OPENAI_REQUEST_SERVICE_TIER = @@ -122,7 +199,9 @@ public final class GenAiIncubatingAttributes { /** * Deprecated, use {@code openai.response.service_tier}. * - * @deprecated Replaced by {@code openai.response.service_tier}. + * @deprecated Replaced by {@code openai.response.service_tier}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final AttributeKey GEN_AI_OPENAI_RESPONSE_SERVICE_TIER = @@ -131,7 +210,9 @@ public final class GenAiIncubatingAttributes { /** * Deprecated, use {@code openai.response.system_fingerprint}. * - * @deprecated Replaced by {@code openai.response.system_fingerprint}. + * @deprecated Replaced by {@code openai.response.system_fingerprint}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final AttributeKey GEN_AI_OPENAI_RESPONSE_SYSTEM_FINGERPRINT = @@ -146,7 +227,12 @@ public final class GenAiIncubatingAttributes { * RECOMMENDED to document it in the semantic conventions for specific GenAI system and use * system-specific name in the instrumentation. If a different name is not documented, * instrumentation libraries SHOULD use applicable predefined value. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_OPERATION_NAME = stringKey("gen_ai.operation.name"); @@ -160,7 +246,12 @@ public final class GenAiIncubatingAttributes { * not the actual output format. For example, if an image is requested, the actual output could be * a URL pointing to an image file. Additional output format details may be recorded in the future * in the {@code gen_ai.output.{type}.*} attributes. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_OUTPUT_TYPE = stringKey("gen_ai.output.type"); /** @@ -170,7 +261,14 @@ public final class GenAiIncubatingAttributes { */ @Deprecated public static final AttributeKey GEN_AI_PROMPT = stringKey("gen_ai.prompt"); - /** The name of the prompt that uniquely identifies it. */ + /** + * The name of the prompt that uniquely identifies it. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_PROMPT_NAME = stringKey("gen_ai.prompt.name"); /** @@ -194,10 +292,22 @@ public final class GenAiIncubatingAttributes { * metrics, and events related to AWS Bedrock should have the {@code gen_ai.provider.name} set to * {@code aws.bedrock} and include applicable {@code aws.bedrock.*} attributes and are not * expected to include {@code openai.*} attributes. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_PROVIDER_NAME = stringKey("gen_ai.provider.name"); - /** The target number of candidate completions to return. */ + /** + * The target number of candidate completions to return. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_CHOICE_COUNT = longKey("gen_ai.request.choice.count"); @@ -208,57 +318,151 @@ public final class GenAiIncubatingAttributes { * *

In some GenAI systems the encoding formats are called embedding types. Also, some GenAI * systems only accept a single format per request. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey> GEN_AI_REQUEST_ENCODING_FORMATS = stringArrayKey("gen_ai.request.encoding_formats"); - /** The frequency penalty setting for the GenAI request. */ + /** + * The frequency penalty setting for the GenAI request. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_FREQUENCY_PENALTY = doubleKey("gen_ai.request.frequency_penalty"); - /** The maximum number of tokens the model generates for a request. */ + /** + * The maximum number of tokens the model generates for a request. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_MAX_TOKENS = longKey("gen_ai.request.max_tokens"); - /** The name of the GenAI model a request is being made to. */ + /** + * The name of the GenAI model a request is being made to. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_MODEL = stringKey("gen_ai.request.model"); - /** The presence penalty setting for the GenAI request. */ + /** + * The presence penalty setting for the GenAI request. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_PRESENCE_PENALTY = doubleKey("gen_ai.request.presence_penalty"); - /** Requests with same seed value more likely to return same result. */ + /** + * Requests with same seed value more likely to return same result. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_SEED = longKey("gen_ai.request.seed"); - /** List of sequences that the model will use to stop generating further tokens. */ + /** + * List of sequences that the model will use to stop generating further tokens. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey> GEN_AI_REQUEST_STOP_SEQUENCES = stringArrayKey("gen_ai.request.stop_sequences"); - /** Indicates whether the GenAI request was made in streaming mode. */ + /** + * Indicates whether the GenAI request was made in streaming mode. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_STREAM = booleanKey("gen_ai.request.stream"); - /** The temperature setting for the GenAI request. */ + /** + * The temperature setting for the GenAI request. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_TEMPERATURE = doubleKey("gen_ai.request.temperature"); - /** The top_k sampling setting for the GenAI request. */ + /** + * The top_k sampling setting for the GenAI request. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_TOP_K = doubleKey("gen_ai.request.top_k"); - /** The top_p sampling setting for the GenAI request. */ + /** + * The top_p sampling setting for the GenAI request. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_REQUEST_TOP_P = doubleKey("gen_ai.request.top_p"); /** * Array of reasons the model stopped generating tokens, corresponding to each generation * received. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey> GEN_AI_RESPONSE_FINISH_REASONS = stringArrayKey("gen_ai.response.finish_reasons"); - /** The unique identifier for the completion. */ + /** + * The unique identifier for the completion. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_RESPONSE_ID = stringKey("gen_ai.response.id"); - /** The name of the model that generated the response. */ + /** + * The name of the model that generated the response. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_RESPONSE_MODEL = stringKey("gen_ai.response.model"); @@ -266,7 +470,12 @@ public final class GenAiIncubatingAttributes { * Time to first chunk in a streaming response, measured from request issuance, in seconds. The * value is measured from when the client issues the generation request to when the first chunk is * received in the response stream. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK = doubleKey("gen_ai.response.time_to_first_chunk"); @@ -280,28 +489,63 @@ public final class GenAiIncubatingAttributes { * [!Warning] This attribute may contain sensitive information. * * + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_RETRIEVAL_QUERY_TEXT = stringKey("gen_ai.retrieval.query.text"); /** * Deprecated, use {@code gen_ai.provider.name} instead. * - * @deprecated Replaced by {@code gen_ai.provider.name}. + * @deprecated Replaced by {@code gen_ai.provider.name}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final AttributeKey GEN_AI_SYSTEM = stringKey("gen_ai.system"); - /** The type of token being counted. */ + /** + * The type of token being counted. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_TOKEN_TYPE = stringKey("gen_ai.token.type"); - /** The tool call identifier. */ + /** + * The tool call identifier. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_TOOL_CALL_ID = stringKey("gen_ai.tool.call.id"); - /** The tool description. */ + /** + * The tool description. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_TOOL_DESCRIPTION = stringKey("gen_ai.tool.description"); - /** Name of the tool utilized by the agent. */ + /** + * Name of the tool utilized by the agent. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_TOOL_NAME = stringKey("gen_ai.tool.name"); /** @@ -317,7 +561,12 @@ public final class GenAiIncubatingAttributes { * user's end or within the client application. Datastore: A tool used by the agent to access and * query structured or unstructured external data for retrieval-augmented tasks or knowledge * updates. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_TOOL_TYPE = stringKey("gen_ai.tool.type"); /** @@ -326,7 +575,12 @@ public final class GenAiIncubatingAttributes { *

Notes: * *

The value SHOULD be included in {@code gen_ai.usage.input_tokens}. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS = longKey("gen_ai.usage.cache_creation.input_tokens"); @@ -336,14 +590,21 @@ public final class GenAiIncubatingAttributes { *

Notes: * *

The value SHOULD be included in {@code gen_ai.usage.input_tokens}. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS = longKey("gen_ai.usage.cache_read.input_tokens"); /** * Deprecated, use {@code gen_ai.usage.output_tokens} instead. * - * @deprecated Replaced by {@code gen_ai.usage.output_tokens}. + * @deprecated Replaced by {@code gen_ai.usage.output_tokens}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final AttributeKey GEN_AI_USAGE_COMPLETION_TOKENS = @@ -358,18 +619,32 @@ public final class GenAiIncubatingAttributes { * Instrumentations SHOULD make a best effort to populate this value, using a total provided by * the provider when available or, depending on the provider API, by summing different token types * parsed from the provider output. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_USAGE_INPUT_TOKENS = longKey("gen_ai.usage.input_tokens"); - /** The number of tokens used in the GenAI response (completion). */ + /** + * The number of tokens used in the GenAI response (completion). + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey GEN_AI_USAGE_OUTPUT_TOKENS = longKey("gen_ai.usage.output_tokens"); /** * Deprecated, use {@code gen_ai.usage.input_tokens} instead. * - * @deprecated Replaced by {@code gen_ai.usage.input_tokens}. + * @deprecated Replaced by {@code gen_ai.usage.input_tokens}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final AttributeKey GEN_AI_USAGE_PROMPT_TOKENS = @@ -381,7 +656,12 @@ public final class GenAiIncubatingAttributes { *

Notes: * *

The value SHOULD be included in {@code gen_ai.usage.output_tokens}. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_USAGE_REASONING_OUTPUT_TOKENS = longKey("gen_ai.usage.reasoning.output_tokens"); @@ -392,7 +672,12 @@ public final class GenAiIncubatingAttributes { * *

This attribute can be populated in different frameworks eg: name of the first chain in * LangChain OR name of the crew in CrewAI. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey GEN_AI_WORKFLOW_NAME = stringKey("gen_ai.workflow.name"); // Enum definitions @@ -400,7 +685,9 @@ public final class GenAiIncubatingAttributes { /** * Values for {@link #GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT} * - * @deprecated Replaced by {@code gen_ai.output.type}. + * @deprecated Replaced by {@code gen_ai.output.type}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final class GenAiOpenaiRequestResponseFormatIncubatingValues { @@ -419,7 +706,9 @@ private GenAiOpenaiRequestResponseFormatIncubatingValues() {} /** * Values for {@link #GEN_AI_OPENAI_REQUEST_SERVICE_TIER} * - * @deprecated Replaced by {@code openai.request.service_tier}. + * @deprecated Replaced by {@code openai.request.service_tier}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final class GenAiOpenaiRequestServiceTierIncubatingValues { @@ -432,7 +721,14 @@ public static final class GenAiOpenaiRequestServiceTierIncubatingValues { private GenAiOpenaiRequestServiceTierIncubatingValues() {} } - /** Values for {@link #GEN_AI_OPERATION_NAME}. */ + /** + * Values for {@link #GEN_AI_OPERATION_NAME} + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final class GenAiOperationNameIncubatingValues { /** * Chat completion operation such as OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final class GenAiOutputTypeIncubatingValues { /** Plain text */ public static final String TEXT = "text"; @@ -499,7 +802,14 @@ public static final class GenAiOutputTypeIncubatingValues { private GenAiOutputTypeIncubatingValues() {} } - /** Values for {@link #GEN_AI_PROVIDER_NAME}. */ + /** + * Values for {@link #GEN_AI_PROVIDER_NAME} + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final class GenAiProviderNameIncubatingValues { /** OpenAI */ public static final String OPENAI = "openai"; @@ -555,7 +865,9 @@ private GenAiProviderNameIncubatingValues() {} /** * Values for {@link #GEN_AI_SYSTEM} * - * @deprecated Replaced by {@code gen_ai.provider.name}. + * @deprecated Replaced by {@code gen_ai.provider.name}, which has moved to the OpenTelemetry GenAI + * semantic conventions repository. */ @Deprecated public static final class GenAiSystemIncubatingValues { @@ -635,7 +947,14 @@ public static final class GenAiSystemIncubatingValues { private GenAiSystemIncubatingValues() {} } - /** Values for {@link #GEN_AI_TOKEN_TYPE}. */ + /** + * Values for {@link #GEN_AI_TOKEN_TYPE} + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final class GenAiTokenTypeIncubatingValues { /** Input tokens (prompt, input, etc.) */ public static final String INPUT = "input"; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java index b9ec83fb..b6b19db8 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java @@ -17,7 +17,13 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class K8sIncubatingAttributes { - /** The name of the cluster. */ + /** + * The name of the cluster. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_CLUSTER_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_CLUSTER_NAME = stringKey("k8s.cluster.name"); /** @@ -46,19 +52,42 @@ public final class K8sIncubatingAttributes { * * *

Therefore, UIDs between clusters should be extremely unlikely to conflict. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_CLUSTER_UID} attribute. */ + @Deprecated public static final AttributeKey K8S_CLUSTER_UID = stringKey("k8s.cluster.uid"); + /** + * The type of file system component for ephemeral storage. + * + *

Notes: + * + *

Eviction decisions based on ephemeral-storage resource limits are made based on the total + * container usage. + */ + public static final AttributeKey K8S_CONTAINER_EPHEMERAL_STORAGE_FS_TYPE = + stringKey("k8s.container.ephemeral_storage.fs_type"); + /** * The name of the Container from Pod specification, must be unique within a Pod. Container * runtime usually uses different globally unique name ({@code container.name}). + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_CONTAINER_NAME} attribute. */ + @Deprecated public static final AttributeKey K8S_CONTAINER_NAME = stringKey("k8s.container.name"); /** * Number of times the container was restarted. This attribute can be used to identify a * particular container (running or stopped) within a container spec. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_CONTAINER_RESTART_COUNT} attribute. */ + @Deprecated public static final AttributeKey K8S_CONTAINER_RESTART_COUNT = longKey("k8s.container.restart_count"); @@ -68,9 +97,9 @@ public final class K8sIncubatingAttributes { /** * The reason for the container state. Corresponds to the {@code reason} field of the: K8s + * href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstatewaiting-v1-core">K8s * ContainerStateWaiting or K8s + * href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstateterminated-v1-core">K8s * ContainerStateTerminated */ public static final AttributeKey K8S_CONTAINER_STATUS_REASON = @@ -78,7 +107,7 @@ public final class K8sIncubatingAttributes { /** * The state of the container. K8s + * href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstate-v1-core">K8s * ContainerState */ public static final AttributeKey K8S_CONTAINER_STATUS_STATE = @@ -98,7 +127,11 @@ public final class K8sIncubatingAttributes { *

  • An annotation {@code data} with empty string value SHOULD be recorded as the {@code * k8s.cronjob.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_CRONJOB_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_CRONJOB_ANNOTATION = stringKeyTemplate("k8s.cronjob.annotation"); @@ -116,14 +149,30 @@ public final class K8sIncubatingAttributes { *
  • A label {@code automated} with empty string value SHOULD be recorded as the {@code * k8s.cronjob.label.automated} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_CRONJOB_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_CRONJOB_LABEL = stringKeyTemplate("k8s.cronjob.label"); - /** The name of the CronJob. */ + /** + * The name of the CronJob. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_CRONJOB_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_CRONJOB_NAME = stringKey("k8s.cronjob.name"); - /** The UID of the CronJob. */ + /** + * The UID of the CronJob. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_CRONJOB_UID} attribute. + */ + @Deprecated public static final AttributeKey K8S_CRONJOB_UID = stringKey("k8s.cronjob.uid"); /** @@ -140,7 +189,11 @@ public final class K8sIncubatingAttributes { *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.daemonset.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_DAEMONSET_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_DAEMONSET_ANNOTATION = stringKeyTemplate("k8s.daemonset.annotation"); @@ -158,14 +211,30 @@ public final class K8sIncubatingAttributes { *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.daemonset.label.injected} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_DAEMONSET_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_DAEMONSET_LABEL = stringKeyTemplate("k8s.daemonset.label"); - /** The name of the DaemonSet. */ + /** + * The name of the DaemonSet. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_DAEMONSET_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_DAEMONSET_NAME = stringKey("k8s.daemonset.name"); - /** The UID of the DaemonSet. */ + /** + * The UID of the DaemonSet. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_DAEMONSET_UID} attribute. + */ + @Deprecated public static final AttributeKey K8S_DAEMONSET_UID = stringKey("k8s.daemonset.uid"); /** @@ -182,7 +251,11 @@ public final class K8sIncubatingAttributes { *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.deployment.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_DEPLOYMENT_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_DEPLOYMENT_ANNOTATION = stringKeyTemplate("k8s.deployment.annotation"); @@ -200,14 +273,30 @@ public final class K8sIncubatingAttributes { *
  • A label {@code injected} with empty string value SHOULD be recorded as the {@code * k8s.deployment.label.injected} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_DEPLOYMENT_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_DEPLOYMENT_LABEL = stringKeyTemplate("k8s.deployment.label"); - /** The name of the Deployment. */ + /** + * The name of the Deployment. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_DEPLOYMENT_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_DEPLOYMENT_NAME = stringKey("k8s.deployment.name"); - /** The UID of the Deployment. */ + /** + * The UID of the Deployment. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_DEPLOYMENT_UID} attribute. + */ + @Deprecated public static final AttributeKey K8S_DEPLOYMENT_UID = stringKey("k8s.deployment.uid"); /** @@ -272,7 +361,11 @@ public final class K8sIncubatingAttributes { *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.job.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_JOB_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_JOB_ANNOTATION = stringKeyTemplate("k8s.job.annotation"); @@ -290,15 +383,29 @@ public final class K8sIncubatingAttributes { *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.job.label.automated} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_JOB_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_JOB_LABEL = stringKeyTemplate("k8s.job.label"); - /** The name of the Job. */ - public static final AttributeKey K8S_JOB_NAME = stringKey("k8s.job.name"); + /** + * The name of the Job. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_JOB_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_JOB_NAME = stringKey("k8s.job.name"); - /** The UID of the Job. */ - public static final AttributeKey K8S_JOB_UID = stringKey("k8s.job.uid"); + /** + * The UID of the Job. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_JOB_UID} attribute. + */ + @Deprecated public static final AttributeKey K8S_JOB_UID = stringKey("k8s.job.uid"); /** * The annotation placed on the Namespace, the {@code } being the annotation name, the value @@ -314,7 +421,11 @@ public final class K8sIncubatingAttributes { *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.namespace.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_NAMESPACE_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_NAMESPACE_ANNOTATION = stringKeyTemplate("k8s.namespace.annotation"); @@ -333,11 +444,21 @@ public final class K8sIncubatingAttributes { *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.namespace.label.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_NAMESPACE_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_NAMESPACE_LABEL = stringKeyTemplate("k8s.namespace.label"); - /** The name of the namespace that the pod is running in. */ + /** + * The name of the namespace that the pod is running in. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_NAMESPACE_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_NAMESPACE_NAME = stringKey("k8s.namespace.name"); /** @@ -346,7 +467,7 @@ public final class K8sIncubatingAttributes { *

    Notes: * *

    This attribute aligns with the {@code phase} field of the K8s + * href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#namespacestatus-v1-core">K8s * NamespaceStatus */ public static final AttributeKey K8S_NAMESPACE_PHASE = stringKey("k8s.namespace.phase"); @@ -366,7 +487,11 @@ public final class K8sIncubatingAttributes { *

  • An annotation {@code data} with empty string value SHOULD be recorded as the {@code * k8s.node.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_NODE_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_NODE_ANNOTATION = stringKeyTemplate("k8s.node.annotation"); @@ -376,7 +501,7 @@ public final class K8sIncubatingAttributes { *

    Notes: * *

    This attribute aligns with the {@code status} field of the NodeCondition + * href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#nodecondition-v1-core">NodeCondition */ public static final AttributeKey K8S_NODE_CONDITION_STATUS = stringKey("k8s.node.condition.status"); @@ -387,11 +512,10 @@ public final class K8sIncubatingAttributes { *

    Notes: * *

    K8s Node conditions as described by K8s - * documentation. + * href="https://kubernetes.io/docs/reference/node/node-status/#condition">K8s documentation. * *

    This attribute aligns with the {@code type} field of the NodeCondition + * href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#nodecondition-v1-core">NodeCondition * *

    The set of possible values is not limited to those listed here. Managed Kubernetes * environments, or custom controllers MAY introduce additional node condition types. When this @@ -414,19 +538,33 @@ public final class K8sIncubatingAttributes { *

  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.node.label.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_NODE_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_NODE_LABEL = stringKeyTemplate("k8s.node.label"); - /** The name of the Node. */ - public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); + /** + * The name of the Node. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_NODE_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); /** The name of the system container running on the K8s Node. */ public static final AttributeKey K8S_NODE_SYSTEM_CONTAINER_NAME = stringKey("k8s.node.system_container.name"); - /** The UID of the Node. */ - public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); + /** + * The UID of the Node. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_NODE_UID} attribute. + */ + @Deprecated public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); /** * The annotation placed on the PersistentVolume, the {@code } being the annotation name, the @@ -574,7 +712,11 @@ public final class K8sIncubatingAttributes { *
  • An annotation {@code data} with empty string value SHOULD be recorded as the {@code * k8s.pod.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_POD_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_POD_ANNOTATION = stringKeyTemplate("k8s.pod.annotation"); @@ -591,7 +733,11 @@ public final class K8sIncubatingAttributes { *

    This attribute aligns with the {@code hostname} field of the K8s * PodSpec. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_POD_HOSTNAME} attribute. */ + @Deprecated public static final AttributeKey K8S_POD_HOSTNAME = stringKey("k8s.pod.hostname"); /** @@ -602,8 +748,11 @@ public final class K8sIncubatingAttributes { *

    This attribute aligns with the {@code podIP} field of the K8s * PodStatus. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_POD_IP} attribute. */ - public static final AttributeKey K8S_POD_IP = stringKey("k8s.pod.ip"); + @Deprecated public static final AttributeKey K8S_POD_IP = stringKey("k8s.pod.ip"); /** * The label placed on the Pod, the {@code } being the label name, the value being the label @@ -621,7 +770,11 @@ public final class K8sIncubatingAttributes { *

  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.pod.label.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_POD_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_POD_LABEL = stringKeyTemplate("k8s.pod.label"); @@ -634,8 +787,13 @@ public final class K8sIncubatingAttributes { public static final AttributeKeyTemplate K8S_POD_LABELS = stringKeyTemplate("k8s.pod.labels"); - /** The name of the Pod. */ - public static final AttributeKey K8S_POD_NAME = stringKey("k8s.pod.name"); + /** + * The name of the Pod. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_POD_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_POD_NAME = stringKey("k8s.pod.name"); /** * The start timestamp of the Pod. @@ -648,7 +806,11 @@ public final class K8sIncubatingAttributes { *

    This attribute aligns with the {@code startTime} field of the K8s * PodStatus, in ISO 8601 (RFC 3339 compatible) format. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_POD_START_TIME} attribute. */ + @Deprecated public static final AttributeKey K8S_POD_START_TIME = stringKey("k8s.pod.start_time"); /** @@ -666,8 +828,13 @@ public final class K8sIncubatingAttributes { public static final AttributeKey K8S_POD_STATUS_REASON = stringKey("k8s.pod.status.reason"); - /** The UID of the Pod. */ - public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); + /** + * The UID of the Pod. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_POD_UID} attribute. + */ + @Deprecated public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); /** * The annotation placed on the ReplicaSet, the {@code } being the annotation name, the value @@ -683,7 +850,11 @@ public final class K8sIncubatingAttributes { *

  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.replicaset.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_REPLICASET_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_REPLICASET_ANNOTATION = stringKeyTemplate("k8s.replicaset.annotation"); @@ -701,14 +872,30 @@ public final class K8sIncubatingAttributes { *
  • A label {@code injected} with empty string value SHOULD be recorded as the {@code * k8s.replicaset.label.injected} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_REPLICASET_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_REPLICASET_LABEL = stringKeyTemplate("k8s.replicaset.label"); - /** The name of the ReplicaSet. */ + /** + * The name of the ReplicaSet. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_REPLICASET_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_REPLICASET_NAME = stringKey("k8s.replicaset.name"); - /** The UID of the ReplicaSet. */ + /** + * The UID of the ReplicaSet. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_REPLICASET_UID} attribute. + */ + @Deprecated public static final AttributeKey K8S_REPLICASET_UID = stringKey("k8s.replicaset.uid"); /** The name of the replication controller. */ @@ -909,7 +1096,11 @@ public final class K8sIncubatingAttributes { *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code * k8s.statefulset.annotation.data} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_STATEFULSET_ANNOTATION} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_STATEFULSET_ANNOTATION = stringKeyTemplate("k8s.statefulset.annotation"); @@ -927,19 +1118,35 @@ public final class K8sIncubatingAttributes { *
  • A label {@code injected} with empty string value SHOULD be recorded as the {@code * k8s.statefulset.label.injected} attribute with value {@code ""}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_STATEFULSET_LABEL} attribute. */ + @Deprecated public static final AttributeKeyTemplate K8S_STATEFULSET_LABEL = stringKeyTemplate("k8s.statefulset.label"); - /** The name of the StatefulSet. */ + /** + * The name of the StatefulSet. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_STATEFULSET_NAME} attribute. + */ + @Deprecated public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); - /** The UID of the StatefulSet. */ + /** + * The UID of the StatefulSet. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.K8sAttributes#K8S_STATEFULSET_UID} attribute. + */ + @Deprecated public static final AttributeKey K8S_STATEFULSET_UID = stringKey("k8s.statefulset.uid"); /** * The name of K8s StorageClass + * href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#storageclass-v1-storage-k8s-io">StorageClass * object. */ public static final AttributeKey K8S_STORAGECLASS_NAME = @@ -953,6 +1160,17 @@ public final class K8sIncubatingAttributes { // Enum definitions + /** Values for {@link #K8S_CONTAINER_EPHEMERAL_STORAGE_FS_TYPE}. */ + public static final class K8sContainerEphemeralStorageFsTypeIncubatingValues { + /** For the container's writable layer usage. */ + public static final String ROOTFS = "rootfs"; + + /** For the container's log files usage (stdout/stderr). */ + public static final String LOGS = "logs"; + + private K8sContainerEphemeralStorageFsTypeIncubatingValues() {} + } + /** Values for {@link #K8S_CONTAINER_STATUS_REASON}. */ public static final class K8sContainerStatusReasonIncubatingValues { /** The container is being created. */ @@ -1209,42 +1427,33 @@ private K8sServiceTypeIncubatingValues() {} public static final class K8sVolumeTypeIncubatingValues { /** * A persistentVolumeClaim + * href="https://kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim">persistentVolumeClaim * volume */ public static final String PERSISTENT_VOLUME_CLAIM = "persistentVolumeClaim"; /** - * A configMap + * A configMap * volume */ public static final String CONFIG_MAP = "configMap"; /** - * A downwardAPI + * A downwardAPI * volume */ public static final String DOWNWARD_API = "downwardAPI"; /** - * An emptyDir + * An emptyDir * volume */ public static final String EMPTY_DIR = "emptyDir"; - /** - * A secret - * volume - */ + /** A secret volume */ public static final String SECRET = "secret"; - /** - * A local - * volume - */ + /** A local volume */ public static final String LOCAL = "local"; private K8sVolumeTypeIncubatingValues() {} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/McpIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/McpIncubatingAttributes.java index 59e1994c..b988a95b 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/McpIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/McpIncubatingAttributes.java @@ -13,13 +13,25 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class McpIncubatingAttributes { - /** The name of the request or notification method. */ + /** + * The name of the request or notification method. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey MCP_METHOD_NAME = stringKey("mcp.method.name"); /** * The version of the Model * Context Protocol used. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey MCP_PROTOCOL_VERSION = stringKey("mcp.protocol.version"); /** @@ -30,19 +42,35 @@ public final class McpIncubatingAttributes { *

    This is a URI of the resource provided in the following requests or notifications: {@code * resources/read}, {@code resources/subscribe}, {@code resources/unsubscribe}, or {@code * notifications/resources/updated}. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ + @Deprecated public static final AttributeKey MCP_RESOURCE_URI = stringKey("mcp.resource.uri"); /** * Identifies MCP * session. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. */ - public static final AttributeKey MCP_SESSION_ID = stringKey("mcp.session.id"); + @Deprecated public static final AttributeKey MCP_SESSION_ID = stringKey("mcp.session.id"); // Enum definitions - /** Values for {@link #MCP_METHOD_NAME}. */ + /** + * Values for {@link #MCP_METHOD_NAME} + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final class McpMethodNameIncubatingValues { /** Notification cancelling a previously-issued request. */ public static final String NOTIFICATIONS_CANCELLED = "notifications/cancelled"; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpenaiIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpenaiIncubatingAttributes.java index fc90f049..077a0d1b 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpenaiIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpenaiIncubatingAttributes.java @@ -13,24 +13,59 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class OpenaiIncubatingAttributes { - /** The type of OpenAI API being used. */ + /** + * The type of OpenAI API being used. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey OPENAI_API_TYPE = stringKey("openai.api.type"); - /** The service tier requested. May be a specific tier, default, or auto. */ + /** + * The service tier requested. May be a specific tier, default, or auto. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey OPENAI_REQUEST_SERVICE_TIER = stringKey("openai.request.service_tier"); - /** The service tier used for the response. */ + /** + * The service tier used for the response. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey OPENAI_RESPONSE_SERVICE_TIER = stringKey("openai.response.service_tier"); - /** A fingerprint to track any eventual change in the Generative AI environment. */ + /** + * A fingerprint to track any eventual change in the Generative AI environment. + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final AttributeKey OPENAI_RESPONSE_SYSTEM_FINGERPRINT = stringKey("openai.response.system_fingerprint"); // Enum definitions - /** Values for {@link #OPENAI_API_TYPE}. */ + /** + * Values for {@link #OPENAI_API_TYPE} + * + * @deprecated Moved to the OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final class OpenaiApiTypeIncubatingValues { /** * The OpenAI OpenTelemetry GenAI + * semantic conventions repository. + */ + @Deprecated public static final class OpenaiRequestServiceTierIncubatingValues { /** The system will utilize scale tier credits until they are exhausted. */ public static final String AUTO = "auto"; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java index 196ce13e..d40b435b 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java @@ -63,6 +63,9 @@ public static final class ProfileFrameTypeIncubatingValues { /** Rust */ public static final String RUST = "rust"; + /** LuaJIT */ + public static final String LUAJIT = "luajit"; + private ProfileFrameTypeIncubatingValues() {} } diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java index a318e947..6e3524a0 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java @@ -71,11 +71,14 @@ public final class UrlIncubatingAttributes { * *

      *
    • {@code - * AWSAccessKeyId} + * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html">{@code + * X-Amz-Signature} *
    • {@code - * Signature} + * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html">{@code + * X-Amz-Credential} + *
    • {@code + * X-Amz-Security-Token} *
    • {@code * sig} @@ -143,11 +146,14 @@ public final class UrlIncubatingAttributes { * *
        *
      • {@code - * AWSAccessKeyId} + * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html">{@code + * X-Amz-Signature} + *
      • {@code + * X-Amz-Credential} *
      • {@code - * Signature} + * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html">{@code + * X-Amz-Security-Token} *
      • {@code * sig} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ContainerAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ContainerAttributes.java new file mode 100644 index 00000000..4030b965 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/ContainerAttributes.java @@ -0,0 +1,52 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv; + +import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; +import java.util.List; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/registry/java/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ContainerAttributes { + /** + * Container ID. Usually a UUID, as for example used to identify Docker + * containers. The UUID might be abbreviated. + */ + public static final AttributeKey CONTAINER_ID = stringKey("container.id"); + + /** Name of the image the container was built on. */ + public static final AttributeKey CONTAINER_IMAGE_NAME = stringKey("container.image.name"); + + /** + * Repo digests of the container image as provided by the container runtime. + * + *

        Notes: + * + *

        Docker + * and CRI + * report those under the {@code RepoDigests} field. + */ + public static final AttributeKey> CONTAINER_IMAGE_REPO_DIGESTS = + stringArrayKey("container.image.repo_digests"); + + /** + * Container image tags. An example can be found in Docker + * Image Inspect. Should be only the {@code } section of the full name for example from + * {@code registry.example.com/my-org/my-image:}. + */ + public static final AttributeKey> CONTAINER_IMAGE_TAGS = + stringArrayKey("container.image.tags"); + + private ContainerAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/K8sAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/K8sAttributes.java new file mode 100644 index 00000000..42f3abde --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/K8sAttributes.java @@ -0,0 +1,488 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv; + +import static io.opentelemetry.api.common.AttributeKey.longKey; +import static io.opentelemetry.api.common.AttributeKey.stringKey; +import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; + +import io.opentelemetry.api.common.AttributeKey; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/registry/java/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class K8sAttributes { + /** The name of the cluster. */ + public static final AttributeKey K8S_CLUSTER_NAME = stringKey("k8s.cluster.name"); + + /** + * A pseudo-ID for the cluster, set to the UID of the {@code kube-system} namespace. + * + *

        Notes: + * + *

        K8s doesn't have support for obtaining a cluster ID. If this is ever added, we will + * recommend collecting the {@code k8s.cluster.uid} through the official APIs. In the meantime, we + * are able to use the {@code uid} of the {@code kube-system} namespace as a proxy for cluster ID. + * Read on for the rationale. + * + *

        Every object created in a K8s cluster is assigned a distinct UID. The {@code kube-system} + * namespace is used by Kubernetes itself and will exist for the lifetime of the cluster. Using + * the {@code uid} of the {@code kube-system} namespace is a reasonable proxy for the K8s + * ClusterID as it will only change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are + * UUIDs as standardized by ISO/IEC + * 9834-8 and ITU-T X.667. Which states: + * + *

        + * + * If generated according to one of the mechanisms defined in Rec. ITU-T X.667 | ISO/IEC 9834-8, a + * UUID is either guaranteed to be different from all other UUIDs generated before 3603 A.D., or + * is extremely likely to be different (depending on the mechanism chosen). + * + *
        + * + *

        Therefore, UIDs between clusters should be extremely unlikely to conflict. + */ + public static final AttributeKey K8S_CLUSTER_UID = stringKey("k8s.cluster.uid"); + + /** + * The name of the Container from Pod specification, must be unique within a Pod. Container + * runtime usually uses different globally unique name ({@code container.name}). + */ + public static final AttributeKey K8S_CONTAINER_NAME = stringKey("k8s.container.name"); + + /** + * Number of times the container was restarted. This attribute can be used to identify a + * particular container (running or stopped) within a container spec. + */ + public static final AttributeKey K8S_CONTAINER_RESTART_COUNT = + longKey("k8s.container.restart_count"); + + /** + * The cronjob annotation placed on the CronJob, the {@code } being the annotation name, the + * value being the annotation value. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • An annotation {@code retries} with value {@code 4} SHOULD be recorded as the {@code + * k8s.cronjob.annotation.retries} attribute with value {@code "4"}. + *
        • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.cronjob.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_CRONJOB_ANNOTATION = + stringKeyTemplate("k8s.cronjob.annotation"); + + /** + * The label placed on the CronJob, the {@code } being the label name, the value being the + * label value. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code type} with value {@code weekly} SHOULD be recorded as the {@code + * k8s.cronjob.label.type} attribute with value {@code "weekly"}. + *
        • A label {@code automated} with empty string value SHOULD be recorded as the {@code + * k8s.cronjob.label.automated} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_CRONJOB_LABEL = + stringKeyTemplate("k8s.cronjob.label"); + + /** The name of the CronJob. */ + public static final AttributeKey K8S_CRONJOB_NAME = stringKey("k8s.cronjob.name"); + + /** The UID of the CronJob. */ + public static final AttributeKey K8S_CRONJOB_UID = stringKey("k8s.cronjob.uid"); + + /** + * The annotation placed on the DaemonSet, the {@code } being the annotation name, the value + * being the annotation value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code replicas} with value {@code 1} SHOULD be recorded as the {@code + * k8s.daemonset.annotation.replicas} attribute with value {@code "1"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.daemonset.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_DAEMONSET_ANNOTATION = + stringKeyTemplate("k8s.daemonset.annotation"); + + /** + * The label placed on the DaemonSet, the {@code } being the label name, the value being the + * label value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code app} with value {@code guestbook} SHOULD be recorded as the {@code + * k8s.daemonset.label.app} attribute with value {@code "guestbook"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.daemonset.label.injected} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_DAEMONSET_LABEL = + stringKeyTemplate("k8s.daemonset.label"); + + /** The name of the DaemonSet. */ + public static final AttributeKey K8S_DAEMONSET_NAME = stringKey("k8s.daemonset.name"); + + /** The UID of the DaemonSet. */ + public static final AttributeKey K8S_DAEMONSET_UID = stringKey("k8s.daemonset.uid"); + + /** + * The annotation placed on the Deployment, the {@code } being the annotation name, the value + * being the annotation value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code replicas} with value {@code 1} SHOULD be recorded as the {@code + * k8s.deployment.annotation.replicas} attribute with value {@code "1"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.deployment.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_DEPLOYMENT_ANNOTATION = + stringKeyTemplate("k8s.deployment.annotation"); + + /** + * The label placed on the Deployment, the {@code } being the label name, the value being the + * label value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code replicas} with value {@code 0} SHOULD be recorded as the {@code + * k8s.deployment.label.app} attribute with value {@code "guestbook"}. + *
        • A label {@code injected} with empty string value SHOULD be recorded as the {@code + * k8s.deployment.label.injected} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_DEPLOYMENT_LABEL = + stringKeyTemplate("k8s.deployment.label"); + + /** The name of the Deployment. */ + public static final AttributeKey K8S_DEPLOYMENT_NAME = stringKey("k8s.deployment.name"); + + /** The UID of the Deployment. */ + public static final AttributeKey K8S_DEPLOYMENT_UID = stringKey("k8s.deployment.uid"); + + /** + * The annotation placed on the Job, the {@code } being the annotation name, the value being + * the annotation value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code number} with value {@code 1} SHOULD be recorded as the {@code + * k8s.job.annotation.number} attribute with value {@code "1"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.job.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_JOB_ANNOTATION = + stringKeyTemplate("k8s.job.annotation"); + + /** + * The label placed on the Job, the {@code } being the label name, the value being the label + * value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code jobtype} with value {@code ci} SHOULD be recorded as the {@code + * k8s.job.label.jobtype} attribute with value {@code "ci"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.job.label.automated} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_JOB_LABEL = + stringKeyTemplate("k8s.job.label"); + + /** The name of the Job. */ + public static final AttributeKey K8S_JOB_NAME = stringKey("k8s.job.name"); + + /** The UID of the Job. */ + public static final AttributeKey K8S_JOB_UID = stringKey("k8s.job.uid"); + + /** + * The annotation placed on the Namespace, the {@code } being the annotation name, the value + * being the annotation value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code ttl} with value {@code 0} SHOULD be recorded as the {@code + * k8s.namespace.annotation.ttl} attribute with value {@code "0"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.namespace.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_NAMESPACE_ANNOTATION = + stringKeyTemplate("k8s.namespace.annotation"); + + /** + * The label placed on the Namespace, the {@code } being the label name, the value being the + * label value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code kubernetes.io/metadata.name} with value {@code default} SHOULD be recorded + * as the {@code k8s.namespace.label.kubernetes.io/metadata.name} attribute with value + * {@code "default"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.namespace.label.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_NAMESPACE_LABEL = + stringKeyTemplate("k8s.namespace.label"); + + /** The name of the namespace that the pod is running in. */ + public static final AttributeKey K8S_NAMESPACE_NAME = stringKey("k8s.namespace.name"); + + /** + * The annotation placed on the Node, the {@code } being the annotation name, the value being + * the annotation value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • An annotation {@code node.alpha.kubernetes.io/ttl} with value {@code 0} SHOULD be + * recorded as the {@code k8s.node.annotation.node.alpha.kubernetes.io/ttl} attribute with + * value {@code "0"}. + *
        • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.node.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_NODE_ANNOTATION = + stringKeyTemplate("k8s.node.annotation"); + + /** + * The label placed on the Node, the {@code } being the label name, the value being the label + * value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code kubernetes.io/arch} with value {@code arm64} SHOULD be recorded as the + * {@code k8s.node.label.kubernetes.io/arch} attribute with value {@code "arm64"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.node.label.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_NODE_LABEL = + stringKeyTemplate("k8s.node.label"); + + /** The name of the Node. */ + public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); + + /** The UID of the Node. */ + public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); + + /** + * The annotation placed on the Pod, the {@code } being the annotation name, the value being + * the annotation value. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • An annotation {@code kubernetes.io/enforce-mountable-secrets} with value {@code true} + * SHOULD be recorded as the {@code + * k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets} attribute with value {@code + * "true"}. + *
        • An annotation {@code mycompany.io/arch} with value {@code x64} SHOULD be recorded as the + * {@code k8s.pod.annotation.mycompany.io/arch} attribute with value {@code "x64"}. + *
        • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.pod.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_POD_ANNOTATION = + stringKeyTemplate("k8s.pod.annotation"); + + /** + * Specifies the hostname of the Pod. + * + *

        Notes: + * + *

        The K8s Pod spec has an optional hostname field, which can be used to specify a hostname. + * Refer to K8s + * docs for more information about this field. + * + *

        This attribute aligns with the {@code hostname} field of the K8s + * PodSpec. + */ + public static final AttributeKey K8S_POD_HOSTNAME = stringKey("k8s.pod.hostname"); + + /** + * IP address allocated to the Pod. + * + *

        Notes: + * + *

        This attribute aligns with the {@code podIP} field of the K8s + * PodStatus. + */ + public static final AttributeKey K8S_POD_IP = stringKey("k8s.pod.ip"); + + /** + * The label placed on the Pod, the {@code } being the label name, the value being the label + * value. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code app} with value {@code my-app} SHOULD be recorded as the {@code + * k8s.pod.label.app} attribute with value {@code "my-app"}. + *
        • A label {@code mycompany.io/arch} with value {@code x64} SHOULD be recorded as the {@code + * k8s.pod.label.mycompany.io/arch} attribute with value {@code "x64"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.pod.label.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_POD_LABEL = + stringKeyTemplate("k8s.pod.label"); + + /** The name of the Pod. */ + public static final AttributeKey K8S_POD_NAME = stringKey("k8s.pod.name"); + + /** + * The start timestamp of the Pod. + * + *

        Notes: + * + *

        Date and time at which the object was acknowledged by the Kubelet. This is before the + * Kubelet pulled the container image(s) for the pod. + * + *

        This attribute aligns with the {@code startTime} field of the K8s + * PodStatus, in ISO 8601 (RFC 3339 compatible) format. + */ + public static final AttributeKey K8S_POD_START_TIME = stringKey("k8s.pod.start_time"); + + /** The UID of the Pod. */ + public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); + + /** + * The annotation placed on the ReplicaSet, the {@code } being the annotation name, the value + * being the annotation value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code replicas} with value {@code 0} SHOULD be recorded as the {@code + * k8s.replicaset.annotation.replicas} attribute with value {@code "0"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.replicaset.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_REPLICASET_ANNOTATION = + stringKeyTemplate("k8s.replicaset.annotation"); + + /** + * The label placed on the ReplicaSet, the {@code } being the label name, the value being the + * label value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code app} with value {@code guestbook} SHOULD be recorded as the {@code + * k8s.replicaset.label.app} attribute with value {@code "guestbook"}. + *
        • A label {@code injected} with empty string value SHOULD be recorded as the {@code + * k8s.replicaset.label.injected} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_REPLICASET_LABEL = + stringKeyTemplate("k8s.replicaset.label"); + + /** The name of the ReplicaSet. */ + public static final AttributeKey K8S_REPLICASET_NAME = stringKey("k8s.replicaset.name"); + + /** The UID of the ReplicaSet. */ + public static final AttributeKey K8S_REPLICASET_UID = stringKey("k8s.replicaset.uid"); + + /** + * The annotation placed on the StatefulSet, the {@code } being the annotation name, the + * value being the annotation value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code replicas} with value {@code 1} SHOULD be recorded as the {@code + * k8s.statefulset.annotation.replicas} attribute with value {@code "1"}. + *
        • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.statefulset.annotation.data} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_STATEFULSET_ANNOTATION = + stringKeyTemplate("k8s.statefulset.annotation"); + + /** + * The label placed on the StatefulSet, the {@code } being the label name, the value being + * the label value, even if the value is empty. + * + *

        Notes: + * + *

        Examples: + * + *

          + *
        • A label {@code replicas} with value {@code 0} SHOULD be recorded as the {@code + * k8s.statefulset.label.app} attribute with value {@code "guestbook"}. + *
        • A label {@code injected} with empty string value SHOULD be recorded as the {@code + * k8s.statefulset.label.injected} attribute with value {@code ""}. + *
        + */ + public static final AttributeKeyTemplate K8S_STATEFULSET_LABEL = + stringKeyTemplate("k8s.statefulset.label"); + + /** The name of the StatefulSet. */ + public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); + + /** The UID of the StatefulSet. */ + public static final AttributeKey K8S_STATEFULSET_UID = stringKey("k8s.statefulset.uid"); + + private K8sAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java index aabf65bd..23a845b4 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java @@ -6,6 +6,7 @@ package io.opentelemetry.semconv; public final class SchemaUrls { + public static final String V1_42_0 = "https://opentelemetry.io/schemas/1.42.0"; public static final String V1_41_1 = "https://opentelemetry.io/schemas/1.41.1"; public static final String V1_41_0 = "https://opentelemetry.io/schemas/1.41.0"; public static final String V1_40_0 = "https://opentelemetry.io/schemas/1.40.0"; diff --git a/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java index b8eaba99..dbf48947 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java @@ -41,11 +41,14 @@ public final class UrlAttributes { * *
          *
        • {@code - * AWSAccessKeyId} + * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html">{@code + * X-Amz-Signature} *
        • {@code - * Signature} + * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html">{@code + * X-Amz-Credential} + *
        • {@code + * X-Amz-Security-Token} *
        • {@code * sig} @@ -91,11 +94,14 @@ public final class UrlAttributes { * *
            *
          • {@code - * AWSAccessKeyId} + * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html">{@code + * X-Amz-Signature} + *
          • {@code + * X-Amz-Credential} *
          • {@code - * Signature} + * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html">{@code + * X-Amz-Security-Token} *
          • {@code * sig} From 608c717768b00165fb432a055647b4f495c4f1bc Mon Sep 17 00:00:00 2001 From: otelbot <197425009+otelbot@users.noreply.github.com> Date: Fri, 12 Jun 2026 21:21:17 +0000 Subject: [PATCH 2/2] Update changelog PR link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c09b61e0..53f6b4a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unreleased * Bump to semconv v1.42.0 - ([#PRNUM](https://github.com/open-telemetry/semantic-conventions-java/pull/PRNUM)) + ([#497](https://github.com/open-telemetry/semantic-conventions-java/pull/497)) ## Version 1.41.1 (2026-05-12)